/* ==========================================================================
   首页 · Living Istanbul（动态伊斯坦布尔全景）
   画面由 assets/js/istanbul.js 在 <canvas> 上绘制；这里只管文字、按钮和地标入口的样式。
   ========================================================================== */
.ist {
  position: relative; overflow: hidden; isolation: isolate;
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  min-height: 580px; max-height: 1000px;
  color: #fff;
  /* 画面画出来之前的底色（黄昏） */
  background: linear-gradient(180deg, #1d2a62 0%, #6b4a86 38%, #d8707a 60%, #ff9b50 74%, #6a3f5c 76%, #131d45 100%);
}
.ist [hidden] { display: none !important; }
.ist::before {
  /* 顶部压暗一点，保证白字在白天的天空上也看得清 */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 62%; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 12, 36, .34) 0%, rgba(6, 12, 36, .14) 45%, rgba(6, 12, 36, 0) 100%);
}
.ist-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0;
  cursor: pointer; touch-action: pan-y; -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
}

/* ---------- 标题区 ---------- */
.ist-copy {
  position: absolute; z-index: 3; left: 50%; transform: translateX(-50%);
  top: clamp(22px, 6vh, 68px); width: min(860px, calc(100% - 40px));
  text-align: center; pointer-events: none;
}
.ist-copy a, .ist-copy button, .ist-greet { pointer-events: auto; }
.ist-copy h1 {
  color: #fff; margin: 14px 0 12px;
  font-size: clamp(31px, min(5vw, 6.6vh), 62px); line-height: 1.14;
  text-shadow: 0 2px 26px rgba(6, 12, 36, .45), 0 1px 2px rgba(6, 12, 36, .35);
}
.ist-copy h1 .tr { font-family: var(--latin); font-style: italic; font-weight: 400; color: #FFD9A0; }
.ist-lead {
  margin: 0 auto 20px; max-width: 600px;
  font-size: clamp(15.5px, 1.25vw, 18.5px); line-height: 1.55; color: rgba(255, 255, 255, .93);
  text-shadow: 0 1px 14px rgba(6, 12, 36, .55);
}
.ist .hero-actions { justify-content: center; }
.ist .btn-ghost {
  color: #fff; border-color: rgba(255, 255, 255, .75); background: rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ist .btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .22); }

/* 问候语小胶囊：Live · İyi akşamlar! Good evening from Istanbul · 17:42 🔊 */
.ist-greet {
  display: inline-flex; align-items: center; gap: 9px; margin: 0;
  padding: 4px 5px 4px 12px; border-radius: 999px; font-size: 14px; line-height: 1.3;
  background: rgba(10, 18, 48, .34); border: 1px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.ist-greet b { font-family: var(--latin); font-style: italic; font-weight: 700; font-size: 15.5px; }
.ist-greet [data-ist-greet] > span { color: rgba(255, 255, 255, .86); }
.ist-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.ist-live i, .ist-modes i {
  width: 7px; height: 7px; border-radius: 50%; background: #ff4d42; flex: none;
  box-shadow: 0 0 0 0 rgba(255, 77, 66, .6); animation: ist-live 2s infinite;
}
.ist-say {
  width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; flex: none;
  display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .18);
  transition: background .2s;
}
.ist-say:hover, .ist-say.playing { background: rgba(255, 255, 255, .34); }
.ist-say svg { width: 16px; height: 16px; }

/* ---------- 地标入口（跟着画面移动，位置由 JS 设置） ---------- */
.ist-spots { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.ist-spot {
  position: absolute; left: 0; top: 0; width: 0; height: 0;
  pointer-events: auto; color: #fff; text-decoration: none; will-change: transform;
  -webkit-tap-highlight-color: transparent; transition: opacity .35s;
}
.ist-spot.is-off { opacity: 0; pointer-events: none; }
.ist-spot.is-off:focus-visible { opacity: 1; }
.ist-dot {
  position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25), 0 0 14px 2px rgba(255, 214, 140, .85);
}
.ist-dot::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .8); animation: ist-ping 2.6s ease-out infinite;
}
.ist-tag {
  position: absolute; left: 0; bottom: 15px; transform: translateX(calc(-50% + var(--sh, 0px)));
  display: flex; flex-direction: column; align-items: center; white-space: nowrap;
  padding: 5px 13px 6px; border-radius: 12px; line-height: 1.15;
  background: rgba(10, 18, 48, .46); border: 1px solid rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(6, 12, 36, .22);
  transition: background .2s, border-color .2s, transform .2s;
}
.ist-tag::after {
  content: ""; position: absolute; left: calc(50% - var(--sh, 0px)); top: 100%;
  width: 1px; height: 9px; background: rgba(255, 255, 255, .7);
}
.ist-tag b { font-size: 13.5px; font-weight: 700; letter-spacing: .01em; }
.ist-tag i { font-family: var(--latin); font-size: 12px; opacity: .82; margin-top: 1px; }
.ist-spot:hover .ist-tag, .ist-spot:focus-visible .ist-tag {
  background: var(--red); border-color: rgba(255, 255, 255, .55);
  transform: translateX(calc(-50% + var(--sh, 0px))) translateY(-3px);
}
.ist-spot:focus-visible { outline: none; }
.ist-spot:focus-visible .ist-tag { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- 底部：点词提示 + 时间切换 ---------- */
.ist-bar {
  position: absolute; z-index: 3; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100% - 24px);
}
.ist-hint, .ist-modes {
  background: rgba(10, 18, 48, .4); border: 1px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-radius: 999px;
}
.ist-hint {
  display: flex; align-items: center; gap: 8px; margin: 0;
  padding: 6px 7px 6px 13px; font-size: 13.5px; color: rgba(255, 255, 255, .92);
}
.ist-hint svg { width: 18px; height: 18px; flex: none; }
.ist-hint-short { display: none; }
.ist-hint b {
  font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .2); font-variant-numeric: tabular-nums;
}
.ist-modes { display: flex; padding: 3px; gap: 2px; }
.ist-modes button {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; color: #fff; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 600; padding: 6px 14px; border-radius: 999px;
  transition: background .2s, color .2s;
}
.ist-modes button:hover { background: rgba(255, 255, 255, .16); }
.ist-modes button[aria-pressed="true"] { background: #fff; color: var(--cobalt-ink); }
.ist-modes button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

/* ---------- 点到东西时弹出的单词卡 ---------- */
.ist-word {
  position: absolute; z-index: 5; left: 0; top: 0; pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 118px; padding: 9px 18px 10px; border-radius: 16px; text-align: center;
  background: var(--glaze); color: var(--ink); box-shadow: 0 14px 34px rgba(6, 12, 36, .35);
}
.ist-word::after {
  content: ""; position: absolute; left: calc(50% - 7px); top: 100%;
  border: 7px solid transparent; border-top-color: var(--glaze);
}
.ist-word em {
  font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: var(--red); padding: 1px 8px; border-radius: 999px; margin-bottom: 3px;
}
.ist-word b { font-family: var(--latin); font-size: 25px; line-height: 1.15; color: var(--cobalt); }
.ist-word span { font-size: 13.5px; color: var(--ink-3, #5a6480); }
.ist-word.pop { animation: ist-pop .38s cubic-bezier(.2, 1.5, .4, 1); }

.br-wide { display: inline; }

@keyframes ist-ping { 0% { transform: scale(1); opacity: .85; } 80%, 100% { transform: scale(2.7); opacity: 0; } }
@keyframes ist-live { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 66, .6); } 70%, 100% { box-shadow: 0 0 0 7px rgba(255, 77, 66, 0); } }
@keyframes ist-pop { from { opacity: 0; transform: translate(-50%, calc(-100% - 2px)) scale(.7); } }

/* ---------- 手机 ---------- */
@media (max-width: 760px) {
  .ist { min-height: 600px; max-height: 920px; }
  .ist::before { height: 70%; }
  .ist-copy { top: 18px; width: calc(100% - 28px); }
  .ist-copy h1 { font-size: clamp(29px, 8.4vw, 38px); margin: 12px 0 10px; }
  .ist-lead { font-size: 15.5px; margin-bottom: 16px; }
  .ist .hero-actions { gap: 10px; }
  .ist .hero-actions .btn { min-height: 44px; padding: 0 18px; font-size: 15px; }
  .br-wide { display: none; }
  .ist-greet { font-size: 13px; gap: 7px; padding-left: 10px; }
  .ist-greet b { font-size: 14px; }
  .ist-from { display: none; }
  .ist-tag { padding: 4px 11px 5px; }
  .ist-tag i { display: none; }
  .ist-tag b { font-size: 13px; }
  /* 右下角有绿色 WhatsApp 按钮，底栏让开它 */
  .ist-bar {
    left: 12px; right: 84px; bottom: 14px; transform: none; width: auto; max-width: none;
    flex-direction: column; align-items: flex-start; gap: 7px;
  }
  .ist-hint { padding: 4px 5px 4px 10px; font-size: 12.5px; gap: 6px; }
  .ist-hint svg { width: 16px; height: 16px; }
  .ist-hint-long { display: none; }
  .ist-hint-short { display: inline; }
  .ist-hint b { font-size: 11.5px; padding: 1px 7px; }
  .ist-modes button { font-size: 12.5px; padding: 6px 10px; gap: 5px; }
}
@media (max-width: 360px) {
  .ist-modes button { padding: 6px 8px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .ist-dot::after, .ist-live i, .ist-modes i { animation: none; }
  .ist-word.pop { animation: none; }
  .ist-tag { transition: none; }
}

/* ==========================================================================
   六个入口：二弟的手绘地图（左）+ 六张卡片（右）
   地图上的红色编号和卡片编号一一对应：指着卡片，地图上的编号会亮；指着编号，卡片会浮起来。
   ========================================================================== */
.explore-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 36px; align-items: center; }
.explore .entry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.map-art { position: relative; margin: 0; }
.map-art img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5;
  border-radius: 20px; background: var(--cobalt);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  outline: 1.5px solid rgba(251, 247, 239, .75); outline-offset: -9px; /* 一圈细细的釉白内框，像装裱的画 */
}
.map-art figcaption { margin: 12px 4px 0; font-size: 13.5px; color: var(--ink-3, #5a6480); text-align: center; }
.map-hint-touch { display: none; }
@media (hover: none) { .map-hint-wide { display: none; } .map-hint-touch { display: inline; } }

.map-pin {
  position: absolute; left: var(--x); top: var(--y); z-index: 1;
  width: 28px; height: 28px; margin: -14px 0 0 -14px;
  display: grid; place-items: center; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.map-pin::before {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid rgba(200, 55, 45, .75); animation: map-ping 2.8s ease-out infinite;
}
@keyframes map-ping { 0% { transform: scale(.9); opacity: .85; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
.map-pin[data-door="2"]::before, .map-pin[data-door="5"]::before { animation-delay: .9s; }
.map-pin[data-door="3"]::before, .map-pin[data-door="6"]::before { animation-delay: 1.8s; }
.map-pin-num {
  width: 24px; height: 24px; border-radius: 5px; transform: rotate(45deg);
  display: grid; place-items: center; background: var(--red);
  border: 2px solid #fff; box-shadow: 0 4px 12px rgba(15, 31, 71, .35);
  transition: background .2s, transform .2s;
}
.map-pin-num span { transform: rotate(-45deg); color: #fff; font-size: 13px; font-weight: 700; line-height: 1; }
.map-pin-tag {
  position: absolute; left: 50%; bottom: calc(100% + 8px);
  transform: translate(-50%, 4px); opacity: 0; pointer-events: none; white-space: nowrap;
  padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--cobalt-ink); color: #fff; box-shadow: 0 6px 16px rgba(15, 31, 71, .3);
  transition: opacity .2s, transform .2s;
}

/* 指着编号 / 指着卡片：两边一起亮 */
.map-pin:hover .map-pin-num,
.explore:has(.entry-card[data-door="1"]:is(:hover, :focus-visible)) .map-pin[data-door="1"] .map-pin-num,
.explore:has(.entry-card[data-door="2"]:is(:hover, :focus-visible)) .map-pin[data-door="2"] .map-pin-num,
.explore:has(.entry-card[data-door="3"]:is(:hover, :focus-visible)) .map-pin[data-door="3"] .map-pin-num,
.explore:has(.entry-card[data-door="4"]:is(:hover, :focus-visible)) .map-pin[data-door="4"] .map-pin-num,
.explore:has(.entry-card[data-door="5"]:is(:hover, :focus-visible)) .map-pin[data-door="5"] .map-pin-num,
.explore:has(.entry-card[data-door="6"]:is(:hover, :focus-visible)) .map-pin[data-door="6"] .map-pin-num {
  background: var(--cobalt-deep); transform: rotate(45deg) scale(1.2);
}
.map-pin:hover .map-pin-tag,
.explore:has(.entry-card[data-door="1"]:is(:hover, :focus-visible)) .map-pin[data-door="1"] .map-pin-tag,
.explore:has(.entry-card[data-door="2"]:is(:hover, :focus-visible)) .map-pin[data-door="2"] .map-pin-tag,
.explore:has(.entry-card[data-door="3"]:is(:hover, :focus-visible)) .map-pin[data-door="3"] .map-pin-tag,
.explore:has(.entry-card[data-door="4"]:is(:hover, :focus-visible)) .map-pin[data-door="4"] .map-pin-tag,
.explore:has(.entry-card[data-door="5"]:is(:hover, :focus-visible)) .map-pin[data-door="5"] .map-pin-tag,
.explore:has(.entry-card[data-door="6"]:is(:hover, :focus-visible)) .map-pin[data-door="6"] .map-pin-tag {
  opacity: 1; transform: translate(-50%, 0);
}
.map-pin:hover, .explore:has(.entry-card:is(:hover, :focus-visible)) .map-pin { z-index: 2; }
.explore:has(.map-pin[data-door="1"]:hover) .entry-card[data-door="1"],
.explore:has(.map-pin[data-door="2"]:hover) .entry-card[data-door="2"],
.explore:has(.map-pin[data-door="3"]:hover) .entry-card[data-door="3"],
.explore:has(.map-pin[data-door="4"]:hover) .entry-card[data-door="4"],
.explore:has(.map-pin[data-door="5"]:hover) .entry-card[data-door="5"],
.explore:has(.map-pin[data-door="6"]:hover) .entry-card[data-door="6"] {
  transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--turq-light);
}

@media (max-width: 980px) {
  .explore-grid { grid-template-columns: 1fr; gap: 28px; }
  .map-art { width: min(100%, 560px); margin: 0 auto; }
}
@media (max-width: 600px) {
  .explore .entry-grid { grid-template-columns: 1fr 1fr; }
  .map-pin-num { width: 22px; height: 22px; }
  .map-pin-num span { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .map-pin::before { animation: none; opacity: .5; }
  .map-pin-num, .map-pin-tag { transition: none; }
}
