:root{
  --bg:#071015;
  --cream:#ead8b6;
  --soft:#fff7e6;
  --gold:#c9a869;
  --card:rgba(6,10,13,.96);
  --line:#f2eadc;
}

*{
  box-sizing:border-box;
}

html{
  margin:0;
  padding:0;
  background:var(--bg);
}

body{
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--soft);
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

button,
a{
  font:inherit;
}

.m4-page{
  width:min(1500px,100%);
  margin:0 auto;
  padding:32px;
}

.m4-map-shell{
  position:relative;
  width:100%;
}

.m4-map{
  position:relative;
  width:100%;
  aspect-ratio:1000 / 620;
  overflow:hidden;
  border:1px solid rgba(234,216,182,.25);
  border-radius:28px;
  background:#111;
  box-shadow:0 30px 90px rgba(0,0,0,.45);
}

.m4-map-bg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:fill;
  display:block;
  z-index:1;
}

.m4-map::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:2;
  pointer-events:none;
  background:linear-gradient(
    to bottom,
    rgba(0,0,0,.05),
    rgba(0,0,0,.35)
  );
}

.m4-line-layer{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  z-index:3;
  pointer-events:none;
}

.m4-route-line{
  fill:none;
  stroke:var(--line);
  stroke-width:5;
  stroke-linecap:round;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
  filter:drop-shadow(0 3px 8px rgba(0,0,0,.6));
}

.m4-landmark-layer{
  position:absolute;
  inset:0;
  z-index:10;
  pointer-events:none;
}

.m4-station-layer{
  position:absolute;
  inset:0;
  z-index:20;
  pointer-events:none;
}

/* --------------------------------------------------
   METRO STATIONS
-------------------------------------------------- */

.m4-station{
  position:absolute;
  left:calc(var(--x) * 1%);
  top:calc(var(--y) * 1%);
  transform:translate(-50%,-50%);
  width:20px;
  height:20px;
  margin:0;
  padding:0;
  border-radius:50%;
  border:3px solid var(--soft);
  background:#071015;
  box-shadow:
    0 0 0 4px rgba(7,16,21,.78),
    0 0 20px rgba(255,255,255,.2);
  cursor:pointer;
  pointer-events:auto;
  z-index:21;
}

.m4-station::after{
  content:"";
  position:absolute;
  background:transparent;
  pointer-events:auto;
  z-index:-1;
}

.m4-station::after,
.m4-station.center::after,
.m4-station.right::after{
  left:8px;
  top:8px;
  width:42px;
  height:42px;
}

.m4-station.left::after{
  left:-50px;
  right:auto;
  top:8px;
  width:58px;
  height:42px;
}

.m4-station.up::after{
  left:8px;
  top:-50px;
  width:42px;
  height:58px;
}

.m4-station:hover,
.m4-station:focus-visible,
.m4-station:focus-within{
  outline:none;
  transform:translate(-50%,-50%) scale(1.16);
  z-index:999;
}

.m4-station-label{
  position:absolute;
  left:26px;
  top:50%;
  transform:translateY(-50%);
  white-space:nowrap;
  background:rgba(7,16,21,.9);
  color:var(--soft);
  padding:5px 9px;
  border-radius:999px;
  border:1px solid rgba(234,216,182,.35);
  font-size:.72rem;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}

.m4-station:hover .m4-station-label,
.m4-station:focus-visible .m4-station-label{
  opacity:1;
}

.m4-station-card{
  position:absolute;
  left:34px;
  top:28px;
  width:clamp(210px,20vw,285px);
  background:var(--card);
  border:1px solid rgba(234,216,182,.28);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 18px 50px rgba(0,0,0,.5);
  opacity:0;
  transform:translateY(8px);
  pointer-events:none;
  transition:
    opacity .18s ease,
    transform .18s ease;
  text-align:left;
  z-index:1000;
}

.m4-station:hover .m4-station-card,
.m4-station:focus-visible .m4-station-card,
.m4-station:focus-within .m4-station-card{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}

.m4-station-card img{
  width:100%;
  height:110px;
  object-fit:cover;
  display:block;
}

.m4-station-card-body{
  padding:14px;
}

.m4-station-card h3{
  margin:0 0 4px;
  font-size:1rem;
}

.m4-architect{
  margin:0 0 9px;
  color:var(--gold);
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.m4-station-card p{
  margin:0 0 12px;
  color:rgba(255,247,230,.78);
  font-size:.82rem;
  line-height:1.45;
}

.m4-read-more{
  display:inline-flex;
  align-items:center;
  color:var(--cream);
  border:1px solid rgba(234,216,182,.4);
  padding:7px 10px;
  border-radius:999px;
  font-size:.76rem;
  text-decoration:none;
}

.m4-read-more:hover,
.m4-read-more:focus-visible{
  background:rgba(234,216,182,.11);
  outline:none;
}

.m4-station.up .m4-station-card{
  left:34px;
  top:auto;
  bottom:28px;
}

.m4-station.left .m4-station-card{
  left:auto;
  right:34px;
  top:28px;
}

.m4-station.right .m4-station-card,
.m4-station.center .m4-station-card{
  left:34px;
  right:auto;
  top:28px;
}

/* --------------------------------------------------
   TOURIST LANDMARKS
-------------------------------------------------- */

.m4-landmark{
  position:absolute;
  left:calc(var(--x) * 1%);
  top:calc(var(--y) * 1%);
  transform:translate(-50%,-50%);
  width:50px;
  height:50px;
  margin:0;
  padding:0;
  border-radius:50%;
  border:3px solid var(--gold);
  background:#101820;
  cursor:pointer;
  pointer-events:auto;
  z-index:11;
  box-shadow:
    0 0 0 5px rgba(7,16,21,.7),
    0 0 26px rgba(201,168,105,.35);
}

.m4-landmark:hover,
.m4-landmark:focus-visible{
  outline:none;
  transform:translate(-50%,-50%) scale(1.12);
  z-index:50;
}

.m4-landmark-thumb{
  width:100%;
  height:100%;
  border-radius:50%;
  object-fit:cover;
  display:block;
}

.m4-landmark-title{
  position:absolute;
  left:50%;
  bottom:calc(100% + 10px);
  transform:translateX(-50%);
  white-space:nowrap;
  background:rgba(6,10,13,.96);
  color:var(--cream);
  border:1px solid rgba(201,168,105,.6);
  border-radius:999px;
  padding:7px 11px;
  font-size:.76rem;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}

.m4-landmark:hover .m4-landmark-title,
.m4-landmark:focus-visible .m4-landmark-title{
  opacity:1;
}

/* --------------------------------------------------
   INTRODUCTION CARD
-------------------------------------------------- */

.m4-intro-card{
  position:absolute;
  right:28px;
  bottom:28px;
  z-index:30;
  width:min(360px,calc(100% - 56px));
  padding:18px;
  background:rgba(6,10,13,.84);
  border:1px solid rgba(234,216,182,.25);
  border-radius:20px;
  backdrop-filter:blur(8px);
}

.m4-intro-card h2{
  margin:0 0 8px;
}

.m4-intro-card p{
  margin:0;
  color:rgba(255,247,230,.75);
  font-size:.9rem;
  line-height:1.5;
}

.m4-legend{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  margin-top:14px;
  color:rgba(255,247,230,.8);
  font-size:.75rem;
}

.m4-legend span{
  display:inline-flex;
  align-items:center;
  gap:7px;
}

.legend-station{
  display:inline-block;
  width:14px;
  height:14px;
  border-radius:50%;
  border:3px solid var(--soft);
  background:#071015;
}

.legend-landmark{
  display:inline-block;
  width:18px;
  height:18px;
  border-radius:50%;
  border:2px solid var(--gold);
  background:#314047;
}

/* --------------------------------------------------
   PREMIUM FULLSCREEN GALLERY
-------------------------------------------------- */

.m4-gallery{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  padding:
    clamp(52px,7vh,82px)
    clamp(56px,7vw,110px)
    clamp(18px,3vh,34px);
  overflow:hidden;
  visibility:hidden;
  opacity:0;
  pointer-events:none;
  background:rgba(2,5,7,0);
  transition:
    opacity .34s ease,
    background-color .34s ease,
    visibility 0s linear .34s;
}

.m4-gallery.is-open{
  visibility:visible;
  opacity:1;
  pointer-events:auto;
  background:rgba(2,5,7,.96);
  transition:
    opacity .34s ease,
    background-color .34s ease,
    visibility 0s linear 0s;
}

.m4-gallery-stage{
  position:relative;
  z-index:3;
  display:flex;
  flex-direction:column;
  width:min(1450px,100%);
  height:100%;
  margin:0;
  opacity:0;
  transform:scale(.985) translateY(8px);
  transition:
    opacity .4s ease .06s,
    transform .4s ease .06s;
}

.m4-gallery.is-open .m4-gallery-stage{
  opacity:1;
  transform:scale(1) translateY(0);
}

.m4-gallery-image-wrap{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
}

.m4-gallery-image-wrap img{
  display:block;
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  opacity:1;
  transform:scale(1);
  user-select:none;
  -webkit-user-drag:none;
  transition:
    opacity .2s ease,
    transform .55s cubic-bezier(.2,.75,.25,1);
  will-change:opacity,transform;
}

.m4-gallery-image-wrap img.is-changing{
  opacity:0;
}

@media(hover:hover) and (pointer:fine){

  .m4-gallery-image-wrap:hover img:not(.is-changing){
    transform:scale(1.035);
  }
}

.m4-gallery-stage figcaption{
  display:flex;
  justify-content:space-between;
  flex:0 0 auto;
  gap:20px;
  min-height:38px;
  padding:12px 4px 8px;
  color:var(--cream);
  font-size:.92rem;
}

.m4-gallery-stage figcaption strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.m4-gallery-stage figcaption span{
  flex:0 0 auto;
  color:rgba(234,216,182,.72);
}

.m4-gallery-close{
  position:absolute;
  top:18px;
  right:22px;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  padding:0 0 4px;
  border:1px solid rgba(234,216,182,.32);
  border-radius:50%;
  background:rgba(5,10,13,.45);
  color:var(--cream);
  font-size:32px;
  line-height:1;
  cursor:pointer;
  opacity:.82;
  backdrop-filter:blur(8px);
  transition:
    opacity .2s ease,
    background-color .2s ease,
    transform .2s ease;
}

.m4-gallery-close:hover,
.m4-gallery-close:focus-visible{
  opacity:1;
  outline:none;
  background:rgba(234,216,182,.14);
  transform:scale(1.07);
}

.m4-gallery-hotspot{
  position:absolute;
  top:0;
  bottom:0;
  z-index:5;
  width:min(18vw,240px);
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  color:var(--cream);
  cursor:pointer;
}

.m4-gallery-hotspot span{
  position:absolute;
  top:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  width:54px;
  height:78px;
  border:1px solid rgba(234,216,182,.28);
  border-radius:18px;
  background:rgba(4,9,12,.3);
  font-size:48px;
  line-height:1;
  opacity:.55;
  transform:translateY(-50%);
  backdrop-filter:blur(6px);
  transition:
    opacity .2s ease,
    background-color .2s ease,
    transform .2s ease;
}

.m4-gallery-hotspot:hover span,
.m4-gallery-hotspot:focus-visible span{
  opacity:1;
  background:rgba(234,216,182,.12);
}

.m4-gallery-hotspot:focus-visible{
  outline:none;
}

.m4-gallery-prev{
  left:0;
}

.m4-gallery-prev span{
  left:22px;
}

.m4-gallery-prev:hover span,
.m4-gallery-prev:focus-visible span{
  transform:translateY(-50%) translateX(-3px);
}

.m4-gallery-next{
  right:0;
}

.m4-gallery-next span{
  right:22px;
}

.m4-gallery-next:hover span,
.m4-gallery-next:focus-visible span{
  transform:translateY(-50%) translateX(3px);
}

/* Thumbnail filmstrip */

.m4-gallery-filmstrip{
  display:flex;
  flex:0 0 auto;
  gap:8px;
  width:100%;
  min-height:72px;
  padding:4px 2px 8px;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  scrollbar-color:
    rgba(234,216,182,.4)
    rgba(255,255,255,.04);
  scroll-behavior:smooth;
}

.m4-gallery-filmstrip:empty{
  display:none;
}

.m4-gallery-thumb{
  position:relative;
  flex:0 0 88px;
  width:88px;
  height:60px;
  margin:0;
  padding:0;
  overflow:hidden;
  border:1px solid rgba(234,216,182,.22);
  border-radius:7px;
  background:#10161a;
  cursor:pointer;
  opacity:.52;
  transition:
    opacity .2s ease,
    border-color .2s ease,
    transform .2s ease;
}

.m4-gallery-thumb img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  pointer-events:none;
}

.m4-gallery-thumb:hover,
.m4-gallery-thumb:focus-visible{
  opacity:.88;
  outline:none;
  border-color:rgba(234,216,182,.62);
  transform:translateY(-2px);
}

.m4-gallery-thumb.is-active{
  opacity:1;
  border-color:var(--cream);
  box-shadow:0 0 0 2px rgba(234,216,182,.16);
}

/* Hide navigation for galleries containing one photograph */

.m4-gallery.is-single .m4-gallery-hotspot,
.m4-gallery.is-single .m4-gallery-filmstrip{
  display:none;
}

/* Automatically hidden cursor */

.m4-gallery.cursor-hidden,
.m4-gallery.cursor-hidden *{
  cursor:none !important;
}

.m4-gallery.cursor-hidden .m4-gallery-close,
.m4-gallery.cursor-hidden .m4-gallery-hotspot span{
  opacity:0;
}

/* --------------------------------------------------
   TABLET AND NARROW BROWSERS
-------------------------------------------------- */

@media(max-width:800px){

  .m4-page{
    padding:10px;
  }

  .m4-map{
    aspect-ratio:1000 / 620;
    border-radius:18px;
  }

  .m4-route-line{
    stroke-width:4;
  }

  .m4-station{
    width:15px;
    height:15px;
    border-width:2px;
    box-shadow:
      0 0 0 3px rgba(7,16,21,.78),
      0 0 12px rgba(255,255,255,.2);
  }

  .m4-station-label{
    display:none;
  }

  .m4-station-card{
    width:min(180px,calc(100vw - 30px));
    border-radius:12px;
    box-shadow:0 10px 30px rgba(0,0,0,.6);
  }

  .m4-station-card img{
    height:72px;
  }

  .m4-station-card-body{
    padding:9px;
  }

  .m4-station-card h3{
    margin-bottom:3px;
    font-size:.78rem;
    line-height:1.2;
  }

  .m4-architect{
    margin-bottom:5px;
    font-size:.55rem;
    line-height:1.2;
    letter-spacing:.05em;
  }

  .m4-station-card p{
    margin-bottom:7px;
    font-size:.64rem;
    line-height:1.3;
  }

  .m4-read-more{
    padding:5px 7px;
    font-size:.61rem;
  }

  .m4-station.up .m4-station-card,
  .m4-station.left .m4-station-card,
  .m4-station.right .m4-station-card,
  .m4-station.center .m4-station-card{
    top:auto;
    right:auto;
    bottom:22px;
    left:50%;
    transform:translate(-50%,8px);
  }

  .m4-station:hover .m4-station-card,
  .m4-station:focus-visible .m4-station-card,
  .m4-station:focus-within .m4-station-card{
    transform:translate(-50%,0);
  }

  .m4-station:nth-child(1) .m4-station-card,
  .m4-station:nth-child(2) .m4-station-card,
  .m4-station:nth-child(3) .m4-station-card{
    left:22px;
    right:auto;
    transform:translateY(8px);
  }

  .m4-station:nth-child(1):hover .m4-station-card,
  .m4-station:nth-child(1):focus-visible .m4-station-card,
  .m4-station:nth-child(1):focus-within .m4-station-card,
  .m4-station:nth-child(2):hover .m4-station-card,
  .m4-station:nth-child(2):focus-visible .m4-station-card,
  .m4-station:nth-child(2):focus-within .m4-station-card,
  .m4-station:nth-child(3):hover .m4-station-card,
  .m4-station:nth-child(3):focus-visible .m4-station-card,
  .m4-station:nth-child(3):focus-within .m4-station-card{
    transform:translateY(0);
  }

  .m4-station:nth-child(9) .m4-station-card,
  .m4-station:nth-child(10) .m4-station-card{
    left:auto;
    right:22px;
    transform:translateY(8px);
  }

  .m4-station:nth-child(9):hover .m4-station-card,
  .m4-station:nth-child(9):focus-visible .m4-station-card,
  .m4-station:nth-child(9):focus-within .m4-station-card,
  .m4-station:nth-child(10):hover .m4-station-card,
  .m4-station:nth-child(10):focus-visible .m4-station-card,
  .m4-station:nth-child(10):focus-within .m4-station-card{
    transform:translateY(0);
  }

  .m4-landmark{
    width:34px;
    height:34px;
    border-width:2px;
    box-shadow:
      0 0 0 3px rgba(7,16,21,.7),
      0 0 16px rgba(201,168,105,.35);
  }

  .m4-landmark-title{
    padding:5px 8px;
    font-size:.62rem;
  }

  .m4-intro-card{
    position:relative;
    right:auto;
    bottom:auto;
    width:100%;
    margin-top:16px;
    padding:14px;
  }

  .m4-intro-card h2{
    font-size:1.1rem;
  }

  .m4-intro-card p{
    font-size:.78rem;
  }

  .m4-gallery{
    padding:52px 12px 12px;
  }

  .m4-gallery-stage figcaption{
    min-height:34px;
    padding:9px 4px 6px;
    font-size:.78rem;
  }

  .m4-gallery-close{
    top:8px;
    right:8px;
    width:36px;
    height:36px;
    font-size:25px;
  }

  .m4-gallery-hotspot{
    width:18%;
    min-width:54px;
  }

  .m4-gallery-hotspot span{
    width:38px;
    height:54px;
    border-radius:13px;
    font-size:34px;
  }

  .m4-gallery-prev span{
    left:6px;
  }

  .m4-gallery-next span{
    right:6px;
  }

  .m4-gallery-filmstrip{
    gap:6px;
    min-height:58px;
    padding-bottom:4px;
  }

  .m4-gallery-thumb{
    flex-basis:68px;
    width:68px;
    height:47px;
  }
}

/* --------------------------------------------------
   VERY NARROW WINDOWS AND PHONES
-------------------------------------------------- */

@media(max-width:480px){

  .m4-page{
    padding:6px;
  }

  .m4-map{
    border-radius:12px;
  }

  .m4-station{
    width:12px;
    height:12px;
  }

  .m4-station-card{
    width:min(150px,calc(100vw - 20px));
  }

  .m4-station-card img{
    height:58px;
  }

  .m4-station-card-body{
    padding:7px;
  }

  .m4-station-card h3{
    font-size:.7rem;
  }

  .m4-architect{
    font-size:.49rem;
  }

  .m4-station-card p{
    font-size:.56rem;
    line-height:1.25;
  }

  .m4-read-more{
    padding:4px 6px;
    font-size:.54rem;
  }

  .m4-landmark{
    width:28px;
    height:28px;
  }

  .m4-gallery{
    padding:48px 8px 8px;
  }

  .m4-gallery-stage figcaption{
    padding-right:4px;
    padding-left:4px;
  }

  .m4-gallery-hotspot{
    width:16%;
    min-width:44px;
  }

  .m4-gallery-hotspot span{
    width:32px;
    height:48px;
    font-size:29px;
  }

  .m4-gallery-prev span{
    left:3px;
  }

  .m4-gallery-next span{
    right:3px;
  }

  .m4-gallery-thumb{
    flex-basis:60px;
    width:60px;
    height:42px;
  }
}

/* ==================================================
   MOBILE STATION CARD FIX
================================================== */

@media(max-width:800px){

  .m4-map{
    overflow:visible;
  }

  .m4-map-bg{
    border-radius:inherit;
  }

  .m4-station,
  .m4-station:hover,
  .m4-station:focus-visible,
  .m4-station:focus-within{
    transform:none;
    margin-left:-7px;
    margin-top:-7px;
  }

  .m4-station .m4-station-card,
  .m4-station.up .m4-station-card,
  .m4-station.left .m4-station-card,
  .m4-station.right .m4-station-card,
  .m4-station.center .m4-station-card,
  .m4-station:nth-child(n) .m4-station-card{
    position:fixed;

    left:var(--mobile-card-left,50%) !important;
    top:var(--mobile-card-top,50%) !important;
    right:auto !important;
    bottom:auto !important;

    width:min(320px,calc(100vw - 30px));
    max-height:calc(100vh - 30px);

    margin:0;
    overflow-x:hidden;
    overflow-y:auto;

    translate:none !important;
    transform:translate(-50%,-50%) scale(.96) !important;

    border-radius:14px;
    z-index:10000;
  }

  .m4-station:hover .m4-station-card,
  .m4-station:focus-visible .m4-station-card,
  .m4-station:focus-within .m4-station-card{
    transform:translate(-50%,-50%) scale(1) !important;
  }

  .m4-station-card img{
    height:110px;
  }

  .m4-station-card-body{
    padding:12px;
  }

  .m4-station-card h3{
    font-size:.9rem;
  }

  .m4-station-card p{
    font-size:.72rem;
    line-height:1.35;
  }

  .m4-architect{
    font-size:.6rem;
  }

  .m4-read-more{
    font-size:.68rem;
  }
}

/* ==================================================
   TRUE FULLSCREEN GALLERY
================================================== */

html:fullscreen,
html:-webkit-full-screen,
html:fullscreen body,
html:-webkit-full-screen body{
  width:100%;
  height:100%;
  margin:0;
  overflow:hidden;
  background:#020507;
}

html:fullscreen .m4-gallery,
html:-webkit-full-screen .m4-gallery{
  position:fixed;
  inset:0;
  width:100vw;
  height:100dvh;
  z-index:2147483647;
}

@media(prefers-reduced-motion:reduce){

  .m4-gallery,
  .m4-gallery-stage,
  .m4-gallery-image-wrap img,
  .m4-gallery-close,
  .m4-gallery-hotspot span,
  .m4-gallery-thumb{
    transition:none !important;
  }
}