/*===================================================
Strada History：小さくしたデザイン（Figma：history_s 735:46／デザイン幅1280px）
641px以上で、contents.css のPC版（デザイン幅1728px）の指定を上書きする（大きめのデザインは使わない）。
1280pxより広い画面では、KVだけ画面幅に合わせて拡大し、本文・パネルは1280pxのときのサイズのまま中央に置く。
index.html（と確認用の index_noanim.html）が contents.css の後に読み込む。
ナビは1201px以上で右端の縦並び、1200px以下で画面下のバー（下のナビの指定を参照）。
===================================================*/
@media (min-width:641px) {

  /* タブレットでも改行する（<br class="sp tb">。PCでは .sp で非表示） */
  .hs br.tb {
    display: inline;
  }

  /* KV（幅1280pxを基準にvwで拡縮） */
  /* 写真のレイヤー（1280×1151.852）はKVの129px上から */
  .hs-kv::before {
    top: -10.078vw; /* -129 / 1280 */
  }

  /* ロゴ＋Historyバッジ（Figma：454×55.44） */
  .hs-kv__title {
    top: 2.5vw; /* 32 / 1280 */
    left: 8.906vw; /* 114 / 1280 */
    width: 35.469vw; /* 454 / 1280 */
  }

  .hs-kv__copy {
    top: 33.398vw; /* (429 − 1.5) / 1280：ブラウザの描画位置がFigmaより下がる分を補正 */
  }

  .hs-intro {
    top: 49.083vw; /* 628.26 / 1280 */
  }

  .hs-intro__text {
    font-size: 1.25vw; /* 16 / 1280 */
    text-shadow: 0 0 1.12em #000, 0 0 .56em #000; /* Figma：17.918px / 8.959px（16px基準） */
  }

  /* body：罫線と中央の線はKVの上端から590pxで始まる（534.444 = 1124.444 − 590） */
  .hs-body {
    margin-top: -41.753vw; /* -534.444 / 1280 */
  }

  /* 左右の罫線（Figma：画面端から48px） */
  .hs-body::before {
    left: max(4px, calc(50% - 592px));
  }

  .hs-body::after {
    right: max(4px, calc(50% - 592px));
  }

  /* Stradaについて（Figma：KVの下端に202px重なる位置。高さ468pxの枠の上下中央） */
  .hs-about {
    width: 640px;
    margin-top: calc(41.753vw - 202px);
    padding: 134px 0;
  }

  .hs-about__text {
    font-size: 20px;
  }

  /* 中央の線：締めの文章のすぐ上まで（.hs-end の高さ684px − 文章の上端240px） */
  .hs-timeline::before {
    bottom: 444px;
  }

  /* 年号の丸：Figmaでは年号と「発売」が丸の中央より6px下 */
  .hs-year {
    width: 180px;
    height: 180px;
    padding-top: 12px;
  }

  .hs-year__num {
    margin-bottom: -8px;
    font-size: 56px;
  }

  .hs-year__unit {
    font-size: 22px;
  }

  .hs-year__txt {
    font-size: 18px;
  }

  .hs-year--latest {
    padding-top: 0;
  }

  .hs-year--latest .hs-year__txt {
    font-size: 24px;
    line-height: 2;
  }

  /* モデル */
  .hs-timeline > .hs-model:first-child {
    padding-top: 106px; /* Figma：Strada説明の枠の下から106px */
  }

  .hs-model + .hs-model,
  .hs-model + .hs-latest {
    padding-top: 240px;
  }

  /* Figmaは839px。PCと同じく、中央の線とラベルのひし形がずれないよう偶数幅にしている */
  .hs-model__inner {
    width: 840px;
    margin-top: 64px;
  }

  /* 飾り罫の間隔：48px（注記ありは70px） */
  .hs-model__label {
    padding: 15px 0 17px;
    font-size: 16px;
  }

  .hs-model__label--note {
    padding-bottom: 39px;
  }

  .hs-model__note {
    top: 49px;
  }

  .hs-model__badge {
    font-size: 14px;
  }

  .hs-model__name {
    font-size: 18px;
  }

  .hs-model__star {
    margin-top: 8px;
  }

  .hs-model__star img {
    width: 18.6px;
  }

  .hs-model__lead {
    margin-top: 8px;
    font-size: 24px;
    line-height: 1.5;
  }

  .hs-model__img {
    margin-top: 32px;
  }

  /* 製品画像の高さ（Figma。index.html の style 属性のPCの値を上書き） */
  #hs_2003 .hs-model__img { height: 349px !important; }
  #hs_2004 .hs-model__img { height: 328px !important; } /* 本文より左右に16pxはみ出す */
  #hs_2004_2 .hs-model__img,
  #hs_2006 .hs-model__img,
  #hs_2013 .hs-model__img,
  #hs_2016 .hs-model__img { height: 317px !important; }
  #hs_2008 .hs-model__img { height: 375px !important; }
  #hs_2012 .hs-model__img { height: 348px !important; }
  #hs_2014 .hs-model__img { height: 271px !important; }

  /* 2008：F classロゴ（PCの位置を、製品画像の縮小に合わせて移動） */
  .hs-model__img .hs-model__fclass {
    left: calc(50% + 154px);
    width: 79px;
    height: 65px;
  }

  /* 時代背景とニーズ / ニーズに応える技術（Figma：380px＋矢印62px＋380px、間隔8px） */
  .hs-story {
    justify-content: center;
    gap: 8px;
    padding: 0;
  }

  .hs-story__needs,
  .hs-story__tech {
    font-size: 14px;
  }

  /* 枠の上に重なるラベルの分（21px）だけ下げる */
  .hs-story__needs {
    width: 380px;
    height: 193px;
    margin-top: 21px;
    padding: 0 32px;
  }

  .hs-story__needs::before {
    inset: 0;
    background-image: url(../img/history/needs_frame_tb.svg);
  }

  .hs-story__label {
    top: -21px;
    left: 50% !important;
    width: 216px;
    height: 40px;
    padding: 0;
    font-size: 14px;
    transform: translateX(-50%);
  }

  .hs-story__label img {
    width: 24px;
    height: auto;
  }

  .hs-story__tech .hs-story__label img {
    width: 23.2px;
  }

  /* 技術：SPと同じ構成（上下の飾り＋その間の緑の帯）。ラベルの分、上の飾りは9px下から。
     帯は、上下の飾りの緑が全幅でつながっている部分（飾りの端から約7px）の下まで潜り込ませる。
     飾りのSVG（高さ40.15px）は緑の塗りが39.15pxまでで、さらに画面幅によって枠の位置が端数になると、浅い重なりでは境目に細い線が見えるため */
  .hs-story__tech {
    display: block;
    width: 380px;
    height: auto;
    margin-left: 0;
    padding: 48px 0 39px;
    background:
      url(../img/history/tech_tb_top.svg) center 9px / 380px 40.15px no-repeat,
      url(../img/history/tech_tb_bottom.svg) center bottom / 380px 40.15px no-repeat,
      linear-gradient(var(--hs-green), var(--hs-green)) center 42px / 360px calc(100% - 75px) no-repeat;
  }

  .hs-story__tech::before,
  .hs-story__tech::after {
    display: none;
  }

  /* 左右の点線：SPと同じ丸い点を縦に並べる。位置は飾りの点線の端（幅380pxの左右から18px）に合わせる */
  .hs-story__tech .hs-story__text {
    width: 346px;
    margin: 0 auto;
    padding: 14px 15px;
    background:
      url(../img/history/tech_sp_dot.svg) left top / 2px 6px repeat-y,
      url(../img/history/tech_sp_dot.svg) right top / 2px 6px repeat-y;
  }

  .hs-story__tech .hs-story__label {
    top: 0;
  }

  /* 当時実現した3つの先進性（Figma：幅269pxの列を3つ） */
  .hs-feature__list li {
    width: 269px;
    height: auto;
  }

  /* アイコンの画像はPCの295×120。Figmaと同じく切らずに269×120の枠に収める */
  .hs-feature__icon img {
    height: 120px;
    object-fit: contain;
  }

  .hs-feature__name {
    font-size: 16px;
    line-height: 28px; /* Figma：16px × 1.75 */
  }

  /* 文章の枠の高さはPCと同じ84px（Figmaのほとんどのモデルで84px）。行数が少ないときは上下中央 */
  .hs-feature__text {
    font-size: 14px;
  }

  .hs-model__summary {
    font-size: 18px;
  }

  /* 最新モデル */
  .hs-latest__text {
    margin-top: 24px;
  }

  /* つながるナビへのアニメーション（Figma：animation 753:8571 / Frame 161 / Frame 162） */
  .hs-anim-wrap {
    margin-top: -91px; /* Figma：最新モデルの文章の下端と91px重なる */
  }

  .hs-anim {
    height: 529px;
  }

  /* 位置・幅・吸い込み量（Figma。index.html の style 属性のPCの値を上書き） */
  .hs-anim__prd:nth-child(1) { --l: -462.6px; --t: 93.9px; --w: 224px; --dx: 338px; --dy: 467px; }
  .hs-anim__prd:nth-child(2) { --l: 319.5px; --t: 93px; --w: 142.4px; --dx: -415px; --dy: 472px; }
  .hs-anim__prd:nth-child(3) { --l: -380.7px; --t: 303.6px; --w: 284.7px; --dx: 214px; --dy: 259px; }
  .hs-anim__prd:nth-child(4) { --l: -168.3px; --t: 179.4px; --w: 167.1px; --dx: 72px; --dy: 388px; }
  .hs-anim__prd:nth-child(5) { --l: 104.4px; --t: 129.9px; --w: 142.7px; --dx: -200px; --dy: 438px; }
  .hs-anim__prd:nth-child(6) { --l: -27.9px; --t: 318.9px; --w: 407.8px; --dx: -189px; --dy: 244px; }

  .hs-anim__copy {
    top: 457px;
    font-size: 36px;
  }

  /* パネル：歴代モデルのエリアの下端から28px空ける */
  .hs-anim__panel {
    width: min(1216px, calc(100% - 64px));
    height: 1200px;
    margin-top: 28px;
  }

  /* パネル上半分（Figma：写真のレイヤー 1350×540 がパネルの右に11pxはみ出す）
     パネルが1216pxより狭い画面でも写真・文言・ロゴの位置関係が崩れないよう、
     パネルの中央（枠線の内側1214pxの中央＝607px）を基準に配置し、狭いときは左右を切る */
  .hs-anim__panel-upper {
    height: 539px; /* 540px − 上の枠線1px */
  }

  /* 写真：レイヤーの中で 左3.57%・上-10.82%・幅91.76%・高さ114.7% */
  .hs-anim__panel-upper::before {
    top: -60.4px;
    left: calc(50% - 682.8px);
    width: 1238.8px;
    height: 619.4px;
  }

  .hs-anim__panel-upper::after {
    inset: auto;
    top: -2px;
    left: calc(50% - 731px);
    width: 1350px;
    height: 540px;
  }

  /* パネル下半分（開発ストーリー）Figma：パネル上端から587pxの位置から */
  .hs-anim__panel-lower {
    height: 659px; /* 1200px − 上半分540px − 下の枠線1px */
    padding-top: 47px;
  }

  /* 位置は枠線(1px)の内側基準のため、Figmaの値から1px引いている */
  .hs-anim__panel-text {
    top: 62px;
    left: max(24px, calc(50% - 456px)); /* Figma：151px */
  }

  .hs-anim__panel-title {
    font-size: 36px;
  }

  .hs-anim__panel-sub {
    font-size: 18px;
  }

  .hs-anim__panel-model {
    font-size: 16px;
  }

  .hs-anim__panel-lead {
    font-size: 14px;
  }

  .hs-anim__panel-badge {
    top: 248px;
    left: calc(50% + 292px); /* Figma：899px */
    width: 98.3px;
  }

  .hs-anim__panel-list {
    top: 383px;
  }

  .hs-end__story {
    width: 848px;
  }

  .hs-end__story-title {
    font-size: 18px;
    line-height: 1.75;
  }

  .hs-end__story-list li {
    width: 265.7px; /* 画像263.7px＋枠線 */
  }

  .hs-end__story-img {
    height: 252px;
  }

  .hs-end__story-name {
    font-size: 16px;
    line-height: 28px;
  }

  .hs-end__story-name::after {
    width: 4.5px;
    height: 9px;
  }

  /* 締め（Figma：パネル下端からフッターまで684px） */
  .hs-end {
    height: 684px;
  }

  .hs-end::after {
    width: 100%;
    height: 684px;
    background-size: cover;
  }

  .hs-end__message {
    margin-top: 240px; /* Figma：パネル下端から240px */
  }

  .hs-end__message-title {
    font-size: 36px;
  }

  .hs-end__message-text {
    font-size: 16px;
  }
}

/* 10の先進モデル ナビ：1201px以上は右端の縦並び（contents.css の1400px以下の「ナビ一覧」バーの指定を打ち消す）。
   1200px以下は画面下のバー。切り替え幅は index.html のナビの data-bar-query（script.js）と合わせる */
@media (min-width:1201px) and (max-width:1400px) {

  .hs-nav {
    position: absolute !important;
    top: var(--hs-nav-start, calc(87.847vw - 172px)) !important;
    bottom: auto !important;
    left: auto;
    width: 240px;
    max-height: calc(100vh - var(--hs-nav-top, 0px) - 32px);
    overflow-y: auto;
    padding: 8px;
    border-radius: 16px 0 0 16px;
    filter: drop-shadow(0 4px 5px rgba(213, 182, 135, .2));
    transform: none !important;
    transition: opacity .5s ease, visibility .5s ease;
  }

  .hs-nav.is-fixed {
    position: fixed !important;
    top: calc(var(--hs-nav-top, 0px) + (100vh - var(--hs-nav-top, 0px)) / 2) !important;
    transform: translateY(-50%) !important;
  }

  .hs-nav.is-end {
    position: absolute !important;
    top: auto !important;
    bottom: 16px !important;
    transform: none !important;
  }

  .hs-nav.is-end.is-show {
    opacity: 1;
    visibility: visible;
  }

  .hs-nav__toggle {
    display: none;
  }

  .hs-nav__list {
    display: flex;
    flex-direction: column;
    max-width: none;
    margin: 0;
  }

  .hs-nav__year {
    left: 16px;
  }

  .hs-nav__badge {
    right: 16px;
  }

  .hs-nav__name {
    left: 16px;
    font-size: 13px;
  }
}

/* 小さくしたデザインのナビ（Figma：navi 735:421 / navi_s）幅205px。Strada説明の枠の62px上から */
@media (min-width:1201px) {

  .hs-nav {
    --hs-nav-offset: 62; /* script.js がナビの開始位置の計算に使う */
    top: var(--hs-nav-start, calc(87.847vw - 264px)) !important;
    width: 205px;
  }

  .hs-nav.is-fixed {
    top: calc(var(--hs-nav-top, 0px) + (100vh - var(--hs-nav-top, 0px)) / 2) !important;
  }

  .hs-nav.is-end {
    top: auto !important;
  }

  .hs-nav__item {
    height: 52px;
  }

  .hs-nav__year {
    font-size: 16px;
  }

  .hs-nav__badge {
    height: 15px;
    font-size: 10px;
    line-height: 14px;
  }

  .hs-nav__name {
    top: 26px;
    font-size: 12px;
  }
}
