/* HEKI SEARCH v35 — iPhone-stable, search-first, preview-first */
html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  max-width:100%;
  overflow-x:hidden;
}
body{
  max-width:100%;
  overflow-x:hidden;
}
button,a,input,select,textarea{
  touch-action:manipulation;
}
img,iframe{
  max-width:100%;
}
.site-brand img,.footer-brand img,.age-brand-logo{
  object-fit:contain!important;
}
#headerSearchForm{display:none!important}

.heki35-genres{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:10px 0 0;
}
.heki35-genres>span{
  font-size:.78rem;
  opacity:.62;
  margin-right:2px;
}
.heki35-genres button,
.heki35-head button,
#heki35More{
  min-height:42px;
  border:1px solid rgba(255,77,166,.36);
  background:rgba(255,77,166,.09);
  color:#fff;
  border-radius:999px;
  padding:.65rem .9rem;
  font:inherit;
  font-weight:750;
  cursor:pointer;
}
.heki35-feed{
  width:min(1440px,calc(100% - 32px));
  margin:22px auto 44px;
}
.heki35-head{
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:20px;
  margin:0 0 18px;
}
.heki35-head b{
  font-size:.72rem;
  letter-spacing:.12em;
  opacity:.62;
}
.heki35-head h2{
  margin:.3rem 0 .35rem;
  font-size:clamp(1.5rem,3vw,2.2rem);
  line-height:1.15;
}
.heki35-head p{
  margin:0;
  max-width:760px;
  opacity:.68;
  line-height:1.6;
}
.heki35-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}
.heki35-card{
  min-width:0;
  border:1px solid rgba(255,255,255,.09);
  border-radius:18px;
  overflow:hidden;
  background:rgba(255,255,255,.035);
  contain:layout paint;
}
.heki35-media{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  background:#0b0b0f;
  overflow:hidden;
}
.heki35-media iframe,
.heki35-media img{
  display:block;
  width:100%;
  height:100%;
  border:0;
  object-fit:cover;
}
.heki35-media>span{
  position:absolute;
  left:9px;
  bottom:9px;
  z-index:2;
  padding:.32rem .5rem;
  border-radius:999px;
  background:rgba(0,0,0,.76);
  font-size:.68rem;
  font-weight:800;
  pointer-events:none;
}
.heki35-body{padding:14px}
.heki35-platform{
  font-size:.72rem;
  font-weight:800;
  opacity:.62;
  margin-bottom:5px;
}
.heki35-body h3{
  font-size:.98rem;
  line-height:1.45;
  margin:0 0 10px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.heki35-tags{
  display:flex;
  gap:5px;
  flex-wrap:wrap;
  min-height:24px;
  margin-bottom:12px;
}
.heki35-tags small{
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  padding:.25rem .45rem;
  opacity:.75;
}
.heki35-cta{
  display:block;
  min-height:44px;
  line-height:44px;
  text-align:center;
  text-decoration:none!important;
  border-radius:12px;
  background:#fff;
  color:#111!important;
  font-weight:850;
}
.heki35-pr{
  margin-top:6px;
  text-align:right;
  font-size:.62rem;
  opacity:.42;
}
.heki35-more-wrap{
  display:flex;
  justify-content:center;
  margin-top:22px;
}
.heki35-note,.heki35-status{
  text-align:center;
  opacity:.52;
  font-size:.76rem;
  line-height:1.55;
}

/* Search overlay: stable geometry and readable controls */
.search-shell.open{
  width:100vw!important;
  max-width:100vw!important;
  overflow:hidden!important;
}
.search-query input,
.tag-filter input,
.search-toolbar select,
#heroSearchInput,
#searchQueryInput,
#performerInlineInput{
  font-size:16px!important;
}
.search-query input,
.tag-filter input,
#heroSearchInput{
  -webkit-appearance:none;
  appearance:none;
}
.search-query,
.hero-search-box{
  max-width:100%;
}
.search-panel{
  overscroll-behavior:contain;
}
.search-layout,
.result-zone,
.tag-browser{
  -webkit-overflow-scrolling:touch;
}
.mobile-dock{
  padding-bottom:max(8px,env(safe-area-inset-bottom));
}
html.heki-search-active .mobile-dock{
  display:none!important;
}

@media(max-width:980px){
  .heki35-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:700px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  body{min-width:0}
  .site-header{
    height:62px!important;
    padding:0 14px!important;
  }
  .site-brand{
    width:140px!important;
    min-width:0!important;
  }
  .site-brand img{
    width:100%!important;
    height:auto!important;
  }

  .hero{
    height:auto!important;
    min-height:0!important;
    padding-bottom:18px!important;
  }
  .hero-photo{
    opacity:.36!important;
    left:28%!important;
  }
  .hero-content{
    padding:48px 16px 8px!important;
    width:100%!important;
    max-width:620px!important;
  }
  .hero-kicker{
    font-size:12px!important;
    margin:0 0 10px!important;
  }
  .hero h1.hero-title{
    white-space:normal!important;
    font-size:clamp(34px,10vw,42px)!important;
    line-height:1.03!important;
    letter-spacing:-.055em!important;
    margin:0 0 12px!important;
  }
  .hero-sub{
    max-width:360px!important;
    font-size:13px!important;
    line-height:1.65!important;
    margin-bottom:14px!important;
  }
  .hero-search-box{
    width:100%!important;
    min-height:52px!important;
    height:auto!important;
    margin-top:0!important;
    border-radius:14px!important;
  }
  .hero-search-box input{
    min-width:0!important;
    width:100%!important;
    font-size:16px!important;
    padding-left:9px!important;
  }
  .hero-search-box button{
    min-width:78px!important;
    min-height:44px!important;
    font-size:13px!important;
    padding:0 12px!important;
  }
  .heki35-genres{
    gap:7px;
    margin-top:9px;
    padding-bottom:2px;
  }
  .heki35-genres>span{
    width:100%;
    font-size:11px;
  }
  .heki35-genres button{
    min-height:38px;
    padding:.5rem .72rem;
    font-size:12px;
  }
  .trust-strip{
    min-height:0!important;
    padding:10px 12px!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:4px!important;
  }
  .trust-strip strong{
    font-size:17px!important;
  }
  .trust-strip span{
    font-size:8px!important;
    white-space:nowrap;
  }

  .heki35-feed{
    width:calc(100% - 20px);
    margin:14px auto 34px;
  }
  .heki35-head{
    align-items:flex-start;
    flex-direction:column;
    gap:11px;
    margin-bottom:14px;
  }
  .heki35-head h2{
    font-size:24px;
  }
  .heki35-head p{
    font-size:13px;
  }
  .heki35-head button{
    width:100%;
    min-height:44px;
  }
  .heki35-grid{
    grid-template-columns:1fr;
    gap:15px;
  }
  .heki35-card{
    border-radius:15px;
  }
  .heki35-body{
    padding:12px;
  }
  .heki35-body h3{
    font-size:15px;
    line-height:1.45;
  }

  /* iOS search: no auto zoom, no jumping, no viewport-height drift */
  .search-shell.open{
    position:fixed!important;
    top:var(--heki-vvt,0px)!important;
    left:0!important;
    right:0!important;
    bottom:auto!important;
    height:var(--heki-vvh,100dvh)!important;
    max-height:var(--heki-vvh,100dvh)!important;
    min-height:0!important;
  }
  .search-backdrop{
    display:none!important;
  }
  .search-panel{
    inset:0!important;
    position:absolute!important;
    width:100%!important;
    height:100%!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    padding-top:env(safe-area-inset-top)!important;
    padding-bottom:env(safe-area-inset-bottom)!important;
  }
  .search-panel-head{
    flex:0 0 auto!important;
    padding:12px 14px 8px!important;
  }
  .search-panel-head h2{
    font-size:19px!important;
    line-height:1.2!important;
    margin:2px 0 0!important;
  }
  .icon-button{
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    min-height:44px!important;
  }
  .search-query{
    flex:0 0 auto!important;
    height:52px!important;
    margin:0 12px 8px!important;
    border-radius:12px!important;
  }
  .search-query button{
    min-width:64px!important;
    height:40px!important;
    margin-right:5px!important;
    padding:0 12px!important;
    font-size:13px!important;
  }
  .search-suggestions{
    flex:0 0 auto!important;
    margin:0 12px 8px!important;
    max-height:180px!important;
    overflow:auto!important;
  }
  .search-help{
    display:none!important;
  }
  .selected-wrap{
    flex:0 0 auto!important;
    margin:0 12px 8px!important;
    padding:8px 10px!important;
  }
  .selected-head{
    margin-bottom:5px!important;
  }
  .selected-tags{
    min-height:20px!important;
  }
  .search-toolbar{
    display:none!important;
  }
  .search-layout{
    flex:1 1 auto!important;
    min-height:0!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    border-top:1px solid #191e25!important;
  }
  .tag-browser{
    flex:0 0 auto!important;
    max-height:36%!important;
    overflow:auto!important;
    border-right:0!important;
    border-bottom:1px solid #191e25!important;
    padding:10px 12px 8px!important;
  }
  .tag-filter{
    height:44px!important;
    margin-bottom:8px!important;
  }
  .category-tabs{
    margin-right:-12px!important;
    padding-right:12px!important;
    padding-bottom:7px!important;
  }
  .category-tabs button{
    min-height:36px!important;
    padding:7px 10px!important;
    font-size:11px!important;
  }
  .tag-cloud{
    display:flex!important;
    gap:7px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    max-height:none!important;
    padding-bottom:5px!important;
  }
  .heki-tag{
    flex:0 0 auto!important;
    min-height:38px!important;
    width:auto!important;
    padding:8px 10px!important;
    font-size:11px!important;
    white-space:nowrap!important;
  }
  .result-zone{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow:auto!important;
    padding:12px!important;
  }
  .result-head{
    display:flex!important;
    align-items:flex-end!important;
    gap:8px!important;
    margin-bottom:10px!important;
  }
  .result-head h3{
    font-size:16px!important;
  }
  .result-head p{
    display:none!important;
  }
  .result-grid{
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  .search-result-card{
    display:grid!important;
    grid-template-columns:142px minmax(0,1fr)!important;
    min-height:104px!important;
  }
  .search-result-img{
    height:100%!important;
    min-height:104px!important;
  }
  .search-result-body{
    padding:10px!important;
    min-width:0!important;
  }
  .search-result-body h4{
    font-size:13px!important;
    line-height:1.35!important;
    margin:4px 0 6px!important;
  }
  .search-result-body p{
    font-size:10px!important;
    line-height:1.45!important;
    margin-bottom:6px!important;
  }
  .search-result-body button{
    min-height:30px!important;
    font-size:10px!important;
  }
  .search-panel-foot{
    flex:0 0 auto!important;
    position:static!important;
    padding:8px 12px max(8px,env(safe-area-inset-bottom))!important;
  }
  .search-panel-foot .button{
    width:100%!important;
    min-height:44px!important;
    font-size:13px!important;
  }
}

@media(max-width:390px){
  .search-result-card{
    grid-template-columns:126px minmax(0,1fr)!important;
  }
}

/* Official HEKI SEARCH logo normalization */
.site-brand{
  width:170px!important;
  height:50px!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
}
.site-brand img,
.site-brand .heki-official-logo{
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  object-fit:cover!important;
  object-position:center 49%!important;
  border-radius:0!important;
  background:transparent!important;
}
.footer-brand{
  align-items:center!important;
}
.footer-brand>img,
.footer-brand .heki-official-logo{
  width:190px!important;
  height:72px!important;
  max-width:190px!important;
  object-fit:cover!important;
  object-position:center 49%!important;
  border-radius:10px!important;
  background:#fff!important;
}
.age-brand-logo,
.age-card .heki-official-logo{
  width:min(300px,82vw)!important;
  height:116px!important;
  max-width:100%!important;
  object-fit:cover!important;
  object-position:center 49%!important;
  border-radius:12px!important;
  background:#fff!important;
  margin:0 auto 16px!important;
}
.header .brand{
  height:44px!important;
  max-width:170px!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
}
.header .brand .heki-official-logo{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center 49%!important;
  background:transparent!important;
}
@media(max-width:700px){
  .site-brand{
    width:146px!important;
    height:43px!important;
  }
  .footer-brand>img,
  .footer-brand .heki-official-logo{
    width:168px!important;
    height:64px!important;
  }
  .age-brand-logo,
  .age-card .heki-official-logo{
    width:min(270px,84vw)!important;
    height:104px!important;
  }
  .header .brand{
    height:40px!important;
    max-width:150px!important;
  }
}


/* v35.4 mobile search collision fix */
@media(max-width:700px){
  #searchShell.search-shell.open .search-query{
    position:relative!important;
    top:auto!important;
    left:auto!important;
    right:auto!important;
    bottom:auto!important;
    z-index:3!important;
    transform:none!important;
    margin:0 12px 8px!important;
  }
  #searchShell.search-shell.open .search-help,
  #searchShell.search-shell.open .search-toolbar{
    display:none!important;
  }
  #searchShell.search-shell.open .selected-wrap{
    position:relative!important;
    top:auto!important;
    margin:0 12px 8px!important;
    z-index:2!important;
  }
  #searchShell.search-shell.open .search-suggestions[hidden]{
    display:none!important;
    min-height:0!important;
    height:0!important;
    margin:0!important;
    padding:0!important;
  }
  #searchShell.search-shell.open .search-panel-head{
    position:relative!important;
    flex:0 0 auto!important;
    min-height:0!important;
  }
  #searchShell.search-shell.open .search-layout{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  #searchShell.search-shell.open .tag-browser{
    flex:0 0 auto!important;
    max-height:132px!important;
    overflow:hidden!important;
    padding:8px 12px 9px!important;
  }
  #searchShell.search-shell.open .tag-filter{
    display:none!important;
  }
  #searchShell.search-shell.open .category-tabs{
    display:flex!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    margin:0 -12px 7px 0!important;
    padding:0 12px 0 0!important;
    min-height:36px!important;
  }
  #searchShell.search-shell.open .tag-cloud{
    display:flex!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    max-height:44px!important;
    min-height:38px!important;
    gap:7px!important;
    padding:0 0 4px!important;
  }
  #searchShell.search-shell.open .heki-tag{
    flex:0 0 auto!important;
    min-height:36px!important;
    height:36px!important;
    padding:0 11px!important;
    white-space:nowrap!important;
  }
  #searchShell.search-shell.open .result-zone{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:10px 12px max(80px,env(safe-area-inset-bottom))!important;
  }
  #searchShell.search-shell.open .result-head{
    position:relative!important;
    margin:0 0 10px!important;
    padding-top:0!important;
  }
  #searchShell.search-shell.open .result-grid{
    grid-template-columns:1fr!important;
  }
}


/* HEKI logo center refresh 2026-09-21 */

.site-brand,
.header .brand{
  overflow:visible!important;
}
.site-brand img,
.site-brand .heki-official-logo,
.header .brand .heki-official-logo,
.footer-brand>img,
.footer-brand .heki-official-logo,
.age-brand-logo,
.age-card .heki-official-logo{
  object-fit:contain!important;
  object-position:center center!important;
  background:transparent!important;
  border-radius:0!important;
  filter:drop-shadow(0 0 10px rgba(255,42,146,.20));
}
.site-brand{
  width:200px!important;
  height:62px!important;
}
.footer-brand>img,
.footer-brand .heki-official-logo{
  width:220px!important;
  height:auto!important;
  max-width:100%!important;
}
.age-brand-logo,
.age-card .heki-official-logo{
  width:min(320px,86vw)!important;
  height:auto!important;
  max-height:140px!important;
  margin:0 auto 16px!important;
}
@media(max-width:700px){
  .site-header{
    position:relative!important;
    height:100px!important;
    min-height:100px!important;
    padding:0 14px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:visible!important;
  }
  .site-header .site-brand{
    position:absolute!important;
    left:50%!important;
    top:50%!important;
    transform:translate(-50%,-50%)!important;
    width:min(218px,56vw)!important;
    height:82px!important;
    margin:0!important;
    z-index:2!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  .site-header .site-brand img,
  .site-header .site-brand .heki-official-logo{
    width:100%!important;
    height:100%!important;
    max-width:none!important;
    object-fit:contain!important;
    object-position:center!important;
    background:transparent!important;
    filter:drop-shadow(0 0 12px rgba(255,42,146,.28));
  }
  .site-header .header-tools{
    position:absolute!important;
    right:14px!important;
    top:50%!important;
    transform:translateY(-50%)!important;
    margin:0!important;
    z-index:4!important;
    display:flex!important;
    align-items:center!important;
  }
  .site-header .mobile-search{
    width:50px!important;
    height:50px!important;
    min-width:50px!important;
    min-height:50px!important;
    border-radius:16px!important;
  }
  .site-header .desktop-nav{
    display:none!important;
  }
  .hero-content{
    padding-top:36px!important;
  }
}
@media(max-width:390px){
  .site-header .site-brand{
    width:min(198px,54vw)!important;
    height:76px!important;
  }
  .site-header{
    height:94px!important;
    min-height:94px!important;
  }
}
