@charset "UTF-8";

/* =========================================================
   Awashima Coffee
   KNOWLEDGE / COFFEE DISCOVERY

   Article-specific stylesheet for:
   /user_data/coffee-discovery

   Load AFTER knowledge-common.css.
========================================================= */


/* =========================================================
   HERO / DISCOVERY
========================================================= */

.aw-page-coffeeDiscovery .aw-kaHero__image img {
  object-position: center 8%;
}

/* Discovery-only wide figures */
.aw-page-coffeeDiscovery .aw-kaSpeciesGrid,
.aw-page-coffeeDiscovery .aw-kaGeoFigure {
  width: min(100%, var(--ka-wide));
  margin-inline: auto;
}


/* =========================================================
   COFFEE SPECIES
========================================================= */

.aw-kaSpeciesGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.aw-kaSpeciesCard {
  position: relative;

  padding: 30px 4px 28px;

  border-top: 1px solid var(--ka-line-dark);
  border-bottom: 1px solid var(--ka-line);

  background: transparent;
}

.aw-kaSpeciesCard--current {
  border-top-color: var(--ka-accent);
}

.aw-kaSpeciesCard__label {
  margin: 0 0 10px;

  color: var(--ka-accent);

  font-family:
    "Noto Sans JP",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;

  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .18em;
}

.aw-kaSpeciesCard__title {
  margin: 0 0 6px;

  color: var(--ka-title);

  font-size: 22px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: .045em;
}

.aw-kaSpeciesCard__latin {
  margin: 0 0 20px;

  color: #7c6d62;

  font-size: 13px;
  line-height: 1.7;
}

.aw-kaSpeciesCard__latin em {
  font-style: italic;
}

.aw-kaSpeciesCard__body,
.aw-kaSpeciesCard__note {
  margin: 0;

  font-size: 14px;
  line-height: 2;
  letter-spacing: .035em;
}

.aw-kaSpeciesCard__note {
  margin-top: 16px;

  color: #4a3326;
  font-weight: 500;
}



/* =========================================================
   CHROMOSOME DIAGRAM
========================================================= */

.aw-kaChromosome {
  --ka-chromosome-line: #b9a994;

  /* 図の基本寸法 */
  --ka-parent-height: 162px;
  --ka-parent-gap: 58px;

  /* 親ボックス上端から「11 × 2」の中央まで */
  --ka-line-y: 82px;

  /* 親ボックス下端からArabicaまで */
  --ka-bridge-height: 92px;

  position: relative;

  width: min(100%, 760px);

  margin: 58px auto 64px;
}


/* =========================================================
   PARENTS
========================================================= */

.aw-kaChromosome__top {
  position: relative;

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: var(--ka-parent-gap);
}


/* 11 × 2 と同じ高さを結ぶ横罫線 */

.aw-kaChromosome__top::before {
  content: "";

  position: absolute;
  z-index: 0;

  top: var(--ka-line-y);
  left: calc(50% - (var(--ka-parent-gap) / 2));

  width: var(--ka-parent-gap);
  height: 1px;

  background: var(--ka-chromosome-line);
}


/* 横罫線中央からArabicaまで伸びる縦罫線 */

.aw-kaChromosome__top::after {
  content: "";

  position: absolute;
  z-index: 0;

  top: var(--ka-line-y);
  left: 50%;

  width: 1px;

  height: calc(
    var(--ka-parent-height)
    - var(--ka-line-y)
    + var(--ka-bridge-height)
  );

  background: var(--ka-chromosome-line);

  transform: translateX(-50%);
}


.aw-kaChromosome__parent,
.aw-kaChromosome__arabica {
  position: relative;
  z-index: 1;
  padding: 30px 18px 28px;
  border-top: 1px solid var(--ka-chromosome-line);
  border-bottom: 1px solid #d8cfc4;
  background: rgba(255, 255, 255, .76);
  text-align: center;
}

.aw-kaChromosome__parent {
  height: var(--ka-parent-height);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 旧：箱の下から出ていた線は完全に無効化 */

.aw-kaChromosome__parent::after {
  content: none;
}

.aw-kaChromosome__parent span,
.aw-kaChromosome__arabica span {
  display: block;
  margin: 0 0 10px;
  color: #776759;
  font-family:
    "Noto Sans JP",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .14em;
}


.aw-kaChromosome__parent strong,
.aw-kaChromosome__arabica strong {
  display: block;
  color: var(--ka-title);
  font-size: 27px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: .05em;
}

.aw-kaChromosome__parent p,
.aw-kaChromosome__arabica p {
  margin: 7px 0 0;
  color: #5e4d42;
  font-size: 15px;
  line-height: 1.5;
}


/* =========================================================
   BRIDGE
========================================================= */

.aw-kaChromosome__bridge {
  position: relative;
  z-index: 2;
  height: var(--ka-bridge-height);
}


/* 旧疑似罫線を無効化 */

.aw-kaChromosome__bridge::before,
.aw-kaChromosome__bridge::after {
  content: none;
}


.aw-kaChromosome__bridge span {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  padding: 4px 12px;
  background: var(--ka-paper);
  color: #867567;
  font-family:
    "Noto Sans JP",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .08em;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}


/* =========================================================
   ARABICA
========================================================= */

.aw-kaChromosome__arabica {
  width: 52%;
  margin: 0 auto;
  padding-top: 30px;
  padding-bottom: 28px;
  border-top-color: #806451;
  background: rgba(255, 255, 255, .84);
}


.aw-kaMediaSlot--mocha .aw-kaMediaSlot__image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 2.1;
  overflow: hidden;
}

.aw-kaMediaSlot--mocha .aw-kaMediaSlot__image img {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;

  /* 下端を固定して、上側だけトリミング */
  object-position: center bottom;
}


/* ---------------------------------------------------------
   ETHIOPIA / COFFEE FOREST
--------------------------------------------------------- */

.aw-kaMediaSlot--ethiopia .aw-kaMediaSlot__image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.aw-kaMediaSlot--ethiopia .aw-kaMediaSlot__image img {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;

  /* 空を少し削り、コーヒーノキと山地を重視 */
  object-position: center 63%;
}


/* =========================================================
   DISCOVERY MEDIA MODIFIERS
========================================================= */

.aw-kaMediaSlot--kaldi {
  width: min(100%, 640px);
}

/* =========================================================
   KALDI / INLINE VISUAL
========================================================= */

.aw-kaInlineVisual--kaldi {
  float: right;
  width: min(40%, 330px);
}


/* =========================================================
   RED SEA MAP / SP ZOOM BUTTON
========================================================= */

/* PC / Tabletでは完全非表示 */
.aw-kaMapZoomButton {
  display: none;
}


@media screen and (max-width: 767px) {

  .aw-kaRedSeaMap {
    position: relative;
  }

  .aw-kaMapZoomButton {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;
    padding: 0;

    border: 1px solid rgba(110, 79, 60, .32);
    border-radius: 50%;

    background: rgba(251, 248, 242, .92);

    color: #6e4f3c;

    box-shadow:
      0 3px 12px rgba(62, 43, 32, .10);

    cursor: pointer;

    -webkit-tap-highlight-color: transparent;
  }

  .aw-kaMapZoomButton svg {
    display: block;

    width: 19px;
    height: 19px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .aw-kaMapZoomButton:active {
    transform: scale(.94);
  }

}

/* =========================================================
   RED SEA MAP / SP LIGHTBOX
========================================================= */

.aw-kaMapLightbox {
  display: none;
}

@media screen and (max-width: 767px) {

  .aw-kaMapLightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
  }

  .aw-kaMapLightbox.is-open {
    display: block;
  }

  .aw-kaMapLightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(29, 23, 19, .86);
  }

  .aw-kaMapLightbox__panel {
    position: absolute;
    inset: 18px 12px;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: #f8f3eb;
  }

  .aw-kaMapLightbox__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;
    padding: 0;

    border: 1px solid rgba(110, 79, 60, .26);
    border-radius: 50%;

    background: rgba(251, 248, 242, .94);
    color: #6e4f3c;

    font-family: sans-serif;
    font-size: 25px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;
  }

  .aw-kaMapLightbox__guide {
    flex: 0 0 auto;

    margin: 0;
    padding: 16px 56px 12px 16px;

    color: #806f63;

    font-family:
      "Noto Sans JP",
      -apple-system,
      BlinkMacSystemFont,
      sans-serif;

    font-size: 10px;
    line-height: 1.5;
    letter-spacing: .04em;
  }

  .aw-kaMapLightbox__viewport {
    flex: 1 1 auto;

    overflow: auto;
    -webkit-overflow-scrolling: touch;

    padding: 14px 16px 24px;
  }

  .aw-kaMapLightbox__viewport .aw-kaRedSeaMap__svg {
    display: block;

    width: 900px;
    max-width: none;
    height: auto;

    background: #f8f3eb;
  }

}


/* =========================================================
   SP
========================================================= */

@media screen and (max-width: 767px) {

  .aw-kaInlineVisual--kaldi {
    float: none;
    width: 100%;
    margin: 34px 0 36px;
  }

  .aw-kaInlineVisual figcaption {
    font-size: 10px;
  }

}

/* =========================================================
   SP
========================================================= */

@media screen and (max-width: 767px) {

  .aw-kaChromosome {
    --ka-parent-height: 132px;
    --ka-parent-gap: 18px;
    --ka-line-y: 67px;
    --ka-bridge-height: 76px;
    width: 100%;
    margin: 44px auto 50px;
  }


  .aw-kaChromosome__parent,
  .aw-kaChromosome__arabica {
    padding: 20px 8px;
  }

  .aw-kaChromosome__parent span,
  .aw-kaChromosome__arabica span {
    font-size: 8px;
    letter-spacing: .07em;
  }

  .aw-kaChromosome__parent strong,
  .aw-kaChromosome__arabica strong {
    font-size: 21px;
  }


  .aw-kaChromosome__parent p,
  .aw-kaChromosome__arabica p {
    font-size: 13px;
  }


  .aw-kaChromosome__bridge span {
    padding-inline: 9px;
    font-size: 11px;
  }


  .aw-kaChromosome__arabica {
    width: 64%;
  }

}


/* =========================================================
   GEISHA TIMELINE / DISCOVERY
========================================================= */

.aw-kaTimeline--geisha {
  margin-top: 54px;
  margin-bottom: 62px;
}


/* =========================================================
   RED SEA MAP / FINAL
   coffee-discovery
========================================================= */

.aw-kaGeoFigure {
  width: min(100%, var(--ka-wide));
  margin: 72px auto 78px;
  padding: 44px 38px 30px;
  border-top: 1px solid var(--ka-line);
  border-bottom: 1px solid var(--ka-line);
  background: #f8f3eb;
}

.aw-kaGeoFigure__head {
  width: min(100%, var(--ka-reading));
  margin: 0 auto 32px;
}

.aw-kaGeoFigure__label {
  margin: 0 0 8px;
  color: var(--ka-accent);
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .18em;
}

.aw-kaGeoFigure__title {
  margin: 0;
  color: var(--ka-title);
  font-size: 25px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: .045em;
}

.aw-kaRedSeaMap {
  width: 100%;
  overflow: hidden;
  background: #f8f3eb;
}

.aw-kaRedSeaMap__svg {
  display: block;
  width: 100%;
  height: auto;
}

/* base map: warm beige, not pink */
.aw-kaRedSeaMap__svg .st3 {
  opacity: .72;
  fill-rule: evenodd;
  clip-rule: evenodd;
  fill: #eee5d9;
  stroke: #baa995;
  stroke-width: .42;
  stroke-miterlimit: 10;
}

.aw-kaRedSeaMap__svg .st4 {
  opacity: .72;
  fill: #eee5d9;
  stroke: #baa995;
  stroke-width: .42;
  stroke-miterlimit: 10;
  stroke-dasharray: .9 1.35;
}

/* Mocha point */
.aw-kaRedSeaMap__svg .st5 {
  fill: #795044;
}

/* highlighted coffee regions */
.aw-kaRedSeaMap__svg .st6 {
  fill: #f6ede3;
  fill-opacity: .80;
  stroke: #9f786f;
  stroke-width: 2;
}

/* route / connector */
.aw-kaRedSeaMap__svg .st7,
.aw-kaRedSeaMap__svg .st8,
.aw-kaRedSeaMap__svg .st9 {
  fill: none;
  stroke: #7f5548;
  stroke-width: 1.15;
  stroke-miterlimit: 10;
}

.aw-kaRedSeaMap__svg .st8 {
  stroke-dasharray: .02 .98 .99 0;
}

.aw-kaRedSeaMap__svg .st9 {
  stroke-dasharray: .99 .98 .02 .98 .99 0;
}

.aw-kaMap__water {
  fill: #f8f3eb;
}

/* EAST AFRICA / ARABIAN PENINSULA / GULF OF ADEN
   All use this SAME class, so the font size is guaranteed to match. */
.aw-kaMap__orientation {
  fill: #8b7565;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2.2px;
}

.aw-kaMap__sea {
  fill: #735f51;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2.2px;
}

.aw-kaMap__seaJp {
  fill: #8f7d70;
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: 11px;
}

.aw-kaMap__regionEn {
  fill: #6e4f3c;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
}

.aw-kaMap__regionJp {
  fill: #1d1713;
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: 14px;
}

.aw-kaMap__regionMeta {
  fill: #715f53;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 7.3px;
  font-weight: 600;
  letter-spacing: 1px;
}

.aw-kaMap__calloutEn {
  fill: #715f53;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 9.6px;
  font-weight: 600;
  letter-spacing: 1.2px;
}

.aw-kaMap__calloutJp {
  fill: #6e5b4e;
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: 11.5px;
}

.aw-kaMap__regionMetaJp {
  fill: #806f63;
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: 8.5px;
}

.aw-kaMap__portEn {
  fill: #6e4f3c;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 9.2px;
  font-weight: 600;
  letter-spacing: 1.3px;
}

.aw-kaMap__portJp {
  fill: #1d1713;
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: 11.5px;
}

.aw-kaGeoFigure figcaption {
  width: min(100%, var(--ka-reading));
  margin: 20px auto 0;
  padding-top: 0;
  color: #7b6b60;
  font-size: 12px;
  line-height: 1.85;
  text-align: center;
}

@media screen and (max-width: 767px) {
  .aw-kaGeoFigure {
    margin: 52px 0 58px;
    padding: 32px 18px 24px;
  }

  .aw-kaGeoFigure__head {
    margin-bottom: 28px;
  }

  .aw-kaGeoFigure__title {
    font-size: 21px;
  }

  .aw-kaGeoFigure figcaption {
    margin-top: 16px;
    font-size: 11px;
    text-align: left;
  }

  .aw-kaMap__orientation {
    font-size: 11px;
    letter-spacing: 1.4px;
  }

  .aw-kaMap__sea {
    font-size: 11px;
    letter-spacing: 1.6px;
  }

  .aw-kaMap__seaJp {
    font-size: 9.5px;
  }

  .aw-kaMap__regionEn {
    font-size: 10px;
  }

  .aw-kaMap__regionJp {
    font-size: 12px;
  }

  .aw-kaMap__calloutEn {
    font-size: 8.6px;
  }

  .aw-kaMap__calloutJp {
    font-size: 10px;
  }

  .aw-kaMap__portEn {
    font-size: 8.4px;
  }

  .aw-kaMap__portJp {
    font-size: 10px;
  }
}



/* =========================================================
   LINEAGE / BOTTLENECK
========================================================= */

.aw-kaLineage {
  position: relative;

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto 76px auto 76px auto 76px auto;

  width: min(100%, 760px);
  margin: 76px auto 82px;
}

.aw-kaLineage__node,
.aw-kaLineage__branches > div {
  position: relative;

  text-align: center;
}

.aw-kaLineage__node {
  grid-column: 1 / -1;

  justify-self: center;

  min-width: 240px;
  padding: 20px 30px;

  border-top: 1px solid var(--ka-line-dark);
  border-bottom: 1px solid var(--ka-line);

  background: rgba(255,255,255,.54);
}

.aw-kaLineage__node--ethiopia {
  grid-row: 1;
  width: 88%;
}

.aw-kaLineage__node--ethiopia::after,
.aw-kaLineage__node--yemen::after,
.aw-kaLineage__branches::after {
  content: "";

  position: absolute;
  left: 50%;
  bottom: -76px;

  width: 1px;
  height: 76px;

  background: var(--ka-line-dark);
}

.aw-kaLineage__node--yemen {
  grid-row: 3;
  width: 58%;
}

.aw-kaLineage__branches {
  position: relative;

  grid-column: 1 / -1;
  grid-row: 5;

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 70px;

  justify-self: center;

  width: 58%;
}

.aw-kaLineage__branches::before {
  content: "";

  position: absolute;
  top: -38px;
  left: 25%;
  right: 25%;

  height: 38px;

  border-top: 1px solid var(--ka-line-dark);
  border-left: 1px solid var(--ka-line-dark);
  border-right: 1px solid var(--ka-line-dark);
}

.aw-kaLineage__branches > div {
  padding: 17px 12px;

  border-top: 1px solid var(--ka-line-dark);
  border-bottom: 1px solid var(--ka-line);
}

.aw-kaLineage__branches::after {
  bottom: -76px;
}

.aw-kaLineage__node--world {
  grid-row: 7;
  width: 72%;
}

.aw-kaLineage__node span,
.aw-kaLineage__branches span {
  display: block;

  margin-bottom: 6px;

  color: var(--ka-accent);

  font-family:
    "Noto Sans JP",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;

  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
}

.aw-kaLineage__node strong {
  color: var(--ka-title);

  font-size: 17px;
  font-weight: 500;
}



/* =========================================================
   TABLET / DISCOVERY
========================================================= */

@media screen and (max-width: 980px) {

  .aw-kaGeoFigure {
    padding-inline: 28px;
  }

}


/* =========================================================
   SP / DISCOVERY
========================================================= */

@media screen and (max-width: 767px) {

  .aw-kaSpeciesGrid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .aw-kaSpeciesCard {
    padding: 24px 0 22px;
    border-bottom: none;
  }

  .aw-kaSpeciesCard__title {
    font-size: 20px;
  }

  .aw-kaLineage {
    grid-template-columns: 1fr;
    grid-template-rows: auto 56px auto 56px auto 56px auto;
    width: 100%;
    margin: 54px auto 60px;
  }

  .aw-kaLineage__node--ethiopia,
  .aw-kaLineage__node--yemen,
  .aw-kaLineage__node--world {
    width: 100%;
  }

  .aw-kaLineage__node {
    min-width: 0;
    padding: 17px 14px;
  }

  .aw-kaLineage__node--ethiopia::after,
  .aw-kaLineage__node--yemen::after,
  .aw-kaLineage__branches::after {
    bottom: -56px;
    height: 56px;
  }

  .aw-kaLineage__branches {
    width: 82%;
    gap: 18px;
  }

  .aw-kaLineage__branches::before {
    top: -28px;
    left: 25%;
    right: 25%;
    height: 28px;
  }

}
