
/* ==========================================
   DAZED OBSERVATION
========================================== */

.dazed-observation {
  --cyan: #92fdff;

  --line: rgba(146,253,255,.46);
  --line-soft: rgba(146,253,255,.22);
  --line-mid: rgba(146,253,255,.42);
  --line-strong: rgba(146,253,255,.82);

  --text-soft: rgba(146,253,255,.66);
  --text-dim: rgba(146,253,255,.34);
  --text-on: rgba(146,253,255,.98);

  --bg-dark: rgba(0,0,0,.58);
  --bg-darker: rgba(0,0,0,.72);

  margin: 0;
  min-height: 100vh;
  color: var(--cyan);

  background:
    #000 url("../../../../img/umi.jpg")
    center / cover no-repeat fixed;
}

.dazed-observation *,
.dazed-observation *::before,
.dazed-observation *::after {
  box-sizing: border-box;
}

/* ==========================================
   HEADER
========================================== */

.dazed-observation .dazed-header {
  width: 100%;
}

.dazed-observation .dazed-header img {
  display: block;
  width: 100%;
  height: auto;
}

/* ==========================================
   SYSTEM BAR
========================================== */

.dazed-observation .system-bar {
  width: min(1500px,97%);
  margin: 14px auto 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ==========================================
   TOWER POWER BUTTON / REALISTIC SILHOUETTE 01
========================================== */
.dazed-observation .power-toggle {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 48px;
  min-width: 0;
  height: 48px;
  padding: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(146,253,255,.32);
  border-radius: 0;
  background: var(--bg-dark);
  color: #92fdff;
  cursor: pointer;
  transition: border-color .22s ease, background .2s ease, box-shadow .2s ease, transform .08s ease;
}
.dazed-observation .power-toggle::before,
.dazed-observation .power-toggle::after {
  content: none;
}
.dazed-observation .power-toggle.is-on {
  border-color: #92fdff;
  background: var(--bg-darker);
  box-shadow: 0 0 10px rgba(146,253,255,.16);
}
.dazed-observation .power-toggle:hover {
  background: var(--bg-darker);
}
.dazed-observation .power-toggle:active {
  transform: translateY(1px);
}
.dazed-observation .power-toggle .power-toggle__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  opacity: 1;
  filter: none;
}

.dazed-observation .power-toggle .tower-svg--realistic {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: #92fdff;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dazed-observation .tower-svg--realistic .tower-structure {
  opacity: .32;
  filter: none;
  transition: opacity .22s ease, filter .22s ease;
}
.dazed-observation .tower-svg--realistic .tower-antenna { stroke-width: .95; }
.dazed-observation .tower-svg--realistic .tower-frame { stroke-width: 1.1; }
.dazed-observation .tower-svg--realistic .tower-decks {
  stroke-width: 1.05;
  fill: rgb(146 253 255 / 8%);
}
.dazed-observation .tower-svg--realistic .tower-detail { stroke-width: .55; }
.dazed-observation .tower-svg--realistic .tower-truss {
  stroke-width: .65;
  opacity: .8;
}
.dazed-observation .tower-svg--realistic .tower-wave {
  fill: none;
  stroke: #92fdff;
  stroke-width: 1.2;
  opacity: 0;
  filter: none;
  animation: none;
  transition: opacity .22s ease;
}
.dazed-observation .power-toggle.is-on .tower-svg--realistic .tower-structure {
  opacity: 1;
  filter: drop-shadow(0 0 2px rgb(146 253 255 / 65%));
}
.dazed-observation .power-toggle.is-on .tower-svg--realistic .tower-waves {
  filter: drop-shadow(0 0 2px rgb(146 253 255 / 40%));
}
.dazed-observation .power-toggle.is-on .tower-svg--realistic .wave-1 { opacity: .58; }
.dazed-observation .power-toggle.is-on .tower-svg--realistic .wave-2 { opacity: .78; }
.dazed-observation .power-toggle.is-on .tower-svg--realistic .wave-3 { opacity: .96; }

.dazed-observation .power-toggle:focus-visible {
  outline: 2px solid #92fdff;
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .dazed-observation .tower-svg--realistic .tower-structure,
  .dazed-observation .tower-svg--realistic .tower-wave {
    transition: none;
  }
}


/* ==========================================
   OBSERVATION GRID
========================================== */

.dazed-observation .observation {
  width: min(1500px,97%);
  margin: 16px auto 120px;
}

.dazed-observation .camera-grid {
  display: grid;
  grid-template-columns:
    repeat(4,minmax(0,1fr));
  gap: 13px;
}

/* ==========================================
   CAMERA FRAME
========================================== */

.dazed-observation .camera {
  position: relative;
  min-width: 0;

  color: var(--cyan);

  background:
    linear-gradient(
      180deg,
      rgba(146,253,255,.025),
      rgba(0,0,0,.12)
    ),
    rgba(0,0,0,.48);

  border: 1px solid var(--line-soft);

  font-family:
    "Courier New","MS Gothic",monospace;

  box-shadow:
    inset 0 0 20px rgba(0,0,0,.24);
}

/* 動画フレームの四隅の装飾は削除 */

/* ==========================================
   CAMERA HEADER
========================================== */

.dazed-observation .camera-head {
  display: grid;
  grid-template-columns:
    auto minmax(0,1fr) auto;

  align-items: center;
  gap: 8px;
  padding: 7px 8px;

  background: rgba(0,0,0,.46);
  border-bottom: 1px solid var(--line-soft);

  font-size: 11px;
  line-height: 1.3;
  letter-spacing: .035em;
}

.dazed-observation .camera-number {
  white-space: nowrap;
}

.dazed-observation .camera-number::before {
  content: "[ ";
}

.dazed-observation .camera-number::after {
  content: " ]";
}

.dazed-observation .camera-place {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: normal;
  min-width: 0;
  overflow-wrap: anywhere;
}

.dazed-observation .camera-country {
  color: var(--text-soft);
  text-align: right;
  white-space: nowrap;
}

/* ==========================================
   CAMERA SCREEN
========================================== */

.dazed-observation .camera-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

/* YouTube iframe */

.dazed-observation .camera-screen iframe {
  position: absolute;
  inset: 0;
  z-index: 1;

  display: block;
  width: 100%;
  height: 100%;

  border: 0;
  background: #000;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity .18s ease;
}

/* ON時に表示 */

.dazed-observation
.camera-screen.is-active iframe {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ==========================================
   NO SIGNAL COVER
========================================== */

.dazed-observation .camera-signal-cover {
  position: absolute;
  inset: 0;
  z-index: 10;

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

  overflow: hidden;
  background: #000;

  opacity: 1;
  visibility: visible;
  pointer-events: none;

  transition:
    opacity .18s ease,
    visibility 0s linear 0s;
}

.dazed-observation
.camera-signal-cover__main {
  color: rgba(146,253,255,.38);

  font-family:
    "Courier New","MS Gothic",monospace;

  font-size: clamp(8px,.9vw,12px);
  letter-spacing: .18em;
  white-space: nowrap;
  text-align: center;
}

.dazed-observation
.camera-signal-cover__status {
  position: absolute;
  left: 8px;
  bottom: 6px;

  color: rgba(146,253,255,.19);

  font-family:
    "Courier New","MS Gothic",monospace;

  font-size: 8px;
  letter-spacing: .12em;
  white-space: nowrap;
}

/* ON時に黒幕を消す */

.dazed-observation
.camera-screen.is-active
.camera-signal-cover {
  opacity: 0;
  visibility: hidden;

  transition:
    opacity .18s ease,
    visibility 0s linear .18s;
}

/* ==========================================
   SCANLINES
========================================== */

.dazed-observation .camera-scanlines {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;

  background:
    repeating-linear-gradient(
      to bottom,
      rgba(146,253,255,.020) 0,
      rgba(146,253,255,.020) 1px,
      transparent 1px,
      transparent 4px
    );
}

/* ==========================================
   CAMERA INFO
========================================== */

.dazed-observation .camera-info {
  display: grid;
  grid-template-columns:
    minmax(0,1fr) auto;

  gap: 4px 8px;
  padding: 7px 8px;

  background: rgba(0,0,0,.46);
  border-top: 1px solid var(--line-soft);

  font-size: 10px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.dazed-observation .camera-time {
  white-space: nowrap;
}

.dazed-observation .camera-time::before {
  content: "LOCAL ";
  color: var(--text-soft);
}

.dazed-observation .camera-utc {
  color: var(--text-soft);
  text-align: right;
  white-space: nowrap;
}

/* ==========================================
   FOOTER
========================================== */

.dazed-observation .dazed-footer {
  padding: 20px;
  text-align: center;
}

.dazed-observation .dazed-footer a {
  color: var(--cyan);
}

.dazed-observation .dazed-footer span {
  display: inline-block;
  transform: scale(-1,1);
}

/* ==========================================
   PAGE NOISE
========================================== */

.dazed-observation .page-noise {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .02;

  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='white' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
}

/* ==========================================
   MOBILE
   3列固定
========================================== */

@media (max-width: 700px) {

  .dazed-observation .system-bar {
    width: 99%;
    margin: 8px auto 10px;
    padding: 0 2px;
  }

  .dazed-observation .power-toggle {
    width: 38px;
    height: 38px;
  }

  .dazed-observation .power-toggle .power-toggle__icon {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }

  .dazed-observation .observation {
    width: 99%;
    margin-top: 6px;
  }

  .dazed-observation .camera-grid {
    grid-template-columns:
      repeat(3,minmax(0,1fr));
    gap: 3px;
  }

  /* ヘッダー1行 */

  .dazed-observation .camera-head {
    grid-template-columns:
      auto minmax(0,1fr) auto;

    gap: 3px;
    padding: 3px 4px;
    min-height: 0;

    font-size: clamp(6px,1.55vw,9px);
    line-height: 1.15;
    letter-spacing: 0;
  }

  .dazed-observation .camera-place {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
  }

  /* 現地時刻とUTCを1行 */

  .dazed-observation .camera-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;

    gap: 2px;
    padding: 3px 4px;

    font-size: clamp(6px,1.55vw,9px);
    line-height: 1.2;
    letter-spacing: 0;
  }

  .dazed-observation .camera-time::before {
    content: "";
  }

  .dazed-observation .camera-utc {
    text-align: right;
  }

  /* NO SIGNAL */

  .dazed-observation
  .camera-signal-cover__main {
    font-size: clamp(6px,1.6vw,9px);
    letter-spacing: .06em;
  }

  .dazed-observation
  .camera-signal-cover__status {
    left: 3px;
    bottom: 2px;
    font-size: 5px;
    letter-spacing: .05em;
  }
}

/* 地名と時刻を、左右のラベル幅に依存せずフレーム中央へ */
.dazed-observation .camera-head {
  grid-template-columns: 9ch minmax(0, 1fr) 9ch;
}
.dazed-observation .camera-number {
  text-align: left;
}
.dazed-observation .camera-place {
  text-align: center;
}
.dazed-observation .camera-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content minmax(0, 1fr);
  align-items: center;
}
.dazed-observation .camera-time {
  grid-column: 2;
  grid-row: 1;
  text-align: center;
}
.dazed-observation .camera-utc {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}
@media (max-width: 700px) {
  .dazed-observation .camera-utc {
    font-size: 5px;
    letter-spacing: 0;
  }
}