/* Бегущая строка мира (js/ticker.js, план 2.8) и реплики жителей над постройками (js/screens/city.js, план 2.5).
   Размеры — в пикселях сцены 1280×720 (720×1280 стоя). */

/* ——— бегущая строка: поверх экранов, под окнами ——— */
.ticker {
  position: absolute; z-index: 40; left: 50%; top: calc(var(--sat, 0px) + 58px); transform: translateX(-50%);
  width: 420px; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 8px; box-sizing: border-box;
  background: linear-gradient(90deg, rgba(16, 20, 28, 0), rgba(16, 20, 28, 0.86) 8%, rgba(16, 20, 28, 0.86) 92%, rgba(16, 20, 28, 0));
  border-top: 1px solid rgba(192, 138, 62, 0.55); border-bottom: 1px solid rgba(192, 138, 62, 0.55);
  pointer-events: none; transition: opacity 0.3s;
}
.ticker.hidden { display: flex !important; opacity: 0; }
.ticker .ic { flex-shrink: 0; display: flex; }
.ticker .tk-win { flex: 1; overflow: hidden; height: 100%; position: relative; }
.ticker .tk-text {
  position: absolute; left: 100%; top: 50%; white-space: nowrap; transform: translate(0, -50%); color: var(--w-hi, #fff3d0);
  font-size: 16px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
@keyframes tk-run {
  from { left: 100%; transform: translate(0, -50%); }
  to { left: 0; transform: translate(-100%, -50%); }
}
/* стоя: между рамкой лорда (слева) и кнопками справа, под шапкой ресурсов */
body.vertical .ticker { left: 318px; transform: none; width: 318px; top: calc(var(--sat, 0px) + 66px); }

/* ——— реплика жителя над постройкой: касание — убрать ——— */
.po .say {
  position: absolute; left: 0; transform: translateX(-50%); max-width: 250px; width: max-content; z-index: 3;
  padding: 7px 12px; border-radius: 12px; background: #fffaee; color: #3a2a14; border: 1.5px solid rgba(80, 60, 30, 0.55);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); font-size: 15px; line-height: 1.3; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px; animation: say-in 0.3s ease-out;
}
.po .say b { font-size: 13px; color: #7a4a14; }
.po .say::after {
  content: ''; position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%);
  border: 9px solid transparent; border-top-color: #fffaee; border-bottom: 0;
}
.po .say.out { opacity: 0; transition: opacity 0.4s; }
@keyframes say-in { from { opacity: 0; transform: translate(-50%, 8px); } }
.viewport.drag .po .say { pointer-events: none; }
/* стоя реплика читается: сцена на телефоне — около 0,55 экрана, 15 px сцены были буквами 8 px; теперь строка 24, имя 20
   (около 13 и 11 px на экране); издали (.far) — обратным масштабом камеры, как подписи построек (css/castle.css) */
body.vertical .po .say { max-width: 400px; padding: 10px 16px; border-radius: 16px; border-width: 2px; font-size: 24px; line-height: 1.25; }
body.vertical .po .say b { font-size: 20px; }
body.vertical .po .say::after { bottom: -12px; border-width: 12px; border-bottom: 0; }
.viewport.far .po .say { transform: translateX(-50%) scale(var(--iz, 1)); transform-origin: 50% 100%; }
