html {
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  background: #0f1115;
  color: #ffffff;
  font-family: sans-serif;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

.wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 10px 6px 20px;
}

h1 {
  margin: 0 0 0.55rem;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.2;
}

.map-box {
  position: relative;
  width: 100%;
  max-width: 26rem;
  margin: 0 auto 1.1rem;
  padding-bottom: 3.8rem;
}

.map-link-banner {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
}

.map-link-banner a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
}

.map-link-banner img {
  width: 80px;
  height: auto;
  display: block;
}

.map-link-text {
  font-size: 0.65rem;
  color: #9bdcff;
  margin-top: 0.2rem;
  line-height: 1.2;
}

.map-logo-link {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  z-index: 10;
}

.map-logo-link img {
  width: 63px;
  height: auto;
  display: block;
  opacity: 0.85;
  transition: 0.2s;
}

.map-logo-link img:hover {
  opacity: 1;
  transform: scale(1.05);
}

.biwako {
  display: block;
  width: 48%;
  margin: 0 auto;
  height: auto;
}

.moon-panel {
  position: absolute;
  left: 65%;
  top: 80%;
  transform: translate(0, -50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center; /* ← これが中央の核 */
  gap: 0.12rem;
  min-width: 5.6rem;
  padding: 0.36rem 0.4rem 0.32rem;
  border-radius: 0.55rem;
  background: rgba(8, 12, 20, 0.45);
  backdrop-filter: blur(2px);
}

.moon-graphic {
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.moon-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.moon-tide {
  font-size: 0.9rem;
  line-height: 1;
  font-weight: 700;
  color: #f4f1e8;
  white-space: nowrap;
}

.moon-time {
  font-size: 0.72rem;
  line-height: 1.15;
  color: #d2d8e3;
  text-align: center;
  white-space: nowrap;
}

.moon-time div + div {
  margin-top: 0.08rem;
}

.moon-name {
  font-size: 0.75rem;
  line-height: 1;
  color: #dcdfe6;
  white-space: nowrap;
}

.arrow-spot {
  position: absolute;
  width: 2.1rem;
  aspect-ratio: 58.266 / 87.728;
}

.arrow {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  color: #ffffff;
}

.arrow-shape {
  fill: currentColor;
  stroke: #000000;
  stroke-width: 2;
  stroke-linejoin: round;
}

.map-label {
  position: absolute;
  transform: translate(-50%, 0);
  text-align: center;
  white-space: nowrap;
  line-height: 1.18;
}

.map-name {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.1rem;
}

.map-speed {
  font-size: 1.2rem;
  font-weight: bold;
  line-height: 1;
}

.speed-value {
  font-variant-numeric: tabular-nums;
}

.speed-unit,
.meta-unit,
.forecast-unit {
  font-size: 0.72em;
}

.map-meta {
  font-size: 0.75rem;
  line-height: 1.15;
  color: #d8d8d8;
  margin-top: 0.05rem;
}

.detail-list {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  padding: 0 0.2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  align-items: start;
}

.detail-card {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 6px;
  min-width: 0;
}

.detail-title {
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 0.22rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.85fr;
  gap: 0.2rem;
}

.detail-block-title {
  font-size: 0.9rem;
  font-weight: bold;
  color: #cccccc;
  margin-bottom: 0.1rem;
}

.detail-row {
  display: grid;
  grid-template-columns: 1.45rem 0.42rem 1.95rem 1.6rem 0.95rem 2rem;
  align-items: center;
  column-gap: 0.06rem;
  font-size: 0.62rem;
  line-height: 1.12;
  white-space: nowrap;
  margin: 0.01rem 0;
}

.detail-time {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.detail-speed {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mini-arrow {
  width: 0.42rem;
  height: auto;
  display: block;
  transform-origin: center center;
  color: #ffffff;
}

.forecast-list {
  display: block;
}

.forecast-row {
  display: grid;
  grid-template-columns: 1.45rem 0.42rem 1.95rem 2.15rem 2.35rem 2.95rem 3.75rem;
  align-items: center;
  column-gap: 0.12rem;
  font-size: 0.75rem;
  line-height: 1.12;
  white-space: nowrap;
  margin: 0.01rem 0;
}

.forecast-temp,
.forecast-rain,
.forecast-pressure {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.forecast-temp {
  color: #cccccc;
}

.forecast-sun {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.12rem;
  width: 100%;
  color: #cccccc;
  font-variant-numeric: tabular-nums;
  margin-left: 0.12rem;
}

.forecast-weather-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.9rem;
  min-width: 0.9rem;
  font-size: 0.72rem;
  line-height: 1;
  transform: translateY(-0.01rem);
}

.weather-svg-icon {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  object-fit: contain;
  margin: 0 auto;
}

.timeline-weather .weather-svg-icon {
  width: 1.2rem;
  height: 1.2rem;
}

.forecast-weather-icon.cloud-only {
  width: 0.52rem;
  flex: 0 0 0.52rem;
  margin-right: -0.06rem;
}

.forecast-sun-time {
  display: inline-block;
  min-width: 1.45rem;
  text-align: right;
}

.forecast-gap {
  display: inline-block;
  width: 0.18rem;
}

.updated {
  text-align: center;
  margin-top: 0.2rem;
  margin-bottom: 0.6rem;
  font-size: 0.78rem;
  color: #cccccc;
  line-height: 1.3;
}

.error {
  margin-top: 0.35rem;
  text-align: center;
  color: #ff8080;
  font-size: 0.72rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

#arrow-60051 {
  left: 47%;
  top: 11%;
}

#arrow-60061 {
  left: 68%;
  top: 8%;
}

#arrow-60131 {
  left: 65%;
  top: 35%;
}

#arrow-60116 {
  left: 32%;
  top: 43%;
}

#arrow-60216 {
  left: 29%;
  top: 78%;
}

#maplabel-60051 {
  left: 36%;
  top: 7%;
}

#maplabel-60061 {
  left: 85%;
  top: 6%;
}

#maplabel-60131 {
  left: 83%;
  top: 35%;
}

#maplabel-60116 {
  left: 22%;
  top: 37%;
}

#maplabel-60216 {
  left: 48%;
  top: 75%;
}

body.loading-active .wrap {
  opacity: 0;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(10, 12, 18, 0.96) 0%, rgba(3, 4, 8, 0.992) 58%, rgba(0, 0, 0, 1) 100%);
  transition: opacity 0.35s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-hud {
  position: relative;
  width: 15rem;
  height: 15rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-logo {
  position: absolute;
  bottom: -2.2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.25);
  text-transform: lowercase;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  animation: logoFloat 3.2s ease-in-out infinite;
}

@keyframes logoFloat {
  0% {
    opacity: 0.35;
    transform: translateX(-50%) translateY(0px);
  }
  50% {
    opacity: 0.85;
    transform: translateX(-50%) translateY(-4px);
  }
  100% {
    opacity: 0.35;
    transform: translateX(-50%) translateY(0px);
  }
}

.loading-ring {
  position: absolute;
  border-radius: 50%;
}

.ring-outer {
  width: 15rem;
  height: 15rem;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.95) 0deg 3deg, transparent 3deg 8deg);
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 59%);
  mask: radial-gradient(circle, transparent 58%, #000 59%);
  animation: spinOuter 2.4s linear infinite;
  filter: drop-shadow(0 0 0.35rem rgba(255, 255, 255, 0.16));
}

.ring-middle {
  width: 11.2rem;
  height: 11.2rem;
  border: 0.16rem solid transparent;
  border-top-color: rgba(255, 255, 255, 0.95);
  border-right-color: rgba(255, 255, 255, 0.55);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  animation: spinMiddle 1.8s linear infinite;
}

.ring-inner {
  width: 8.2rem;
  height: 8.2rem;
  background: conic-gradient(from 0deg, transparent 0deg 36deg, rgba(255, 255, 255, 0.92) 36deg 116deg, transparent 116deg 210deg, rgba(255, 255, 255, 0.72) 210deg 286deg, transparent 286deg 360deg);
  -webkit-mask: radial-gradient(circle, transparent 72%, #000 73%);
  mask: radial-gradient(circle, transparent 72%, #000 73%);
  animation: spinInner 3.1s linear infinite reverse;
  opacity: 0.96;
}

.loading-center {
  position: relative;
  z-index: 2;
  text-align: center;
  line-height: 1.15;
}

.loading-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.06em;
  text-shadow: 0 0 0.45rem rgba(255, 255, 255, 0.15);
}

.loading-sub {
  margin-top: 0.35rem;
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@keyframes spinOuter {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes spinMiddle {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes spinInner {
  from {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(0.98);
  }
  to {
    transform: rotate(360deg) scale(1);
  }
}

/* 横スクロール予報 */

.timeline-wrap {
  width: 100%;
  max-width: 28rem;
  margin: 0.5rem auto 0;
  padding: 0 0.2rem 0.8rem;
}

.timeline-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: #ffffff;
  margin: 0 0 0.28rem;
}

.timeline-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0.45rem;
  display: flex;
}

.timeline-inner {
  display: inline-flex;
  gap: 0;
  align-items: stretch;
  width: max-content;
  min-width: 0;
  padding-right: 0;
}

.timeline-inner > * {
  flex: 0 0 auto;
}

.timeline-col {
  flex: 0 0 2rem;
  width: 2rem;
  min-width: 2rem;
  box-sizing: border-box;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.14rem 0.04rem 0.2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px; /* ←これ追加！！ */
}

.timeline-col.head-break {
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.timeline-date {
  height: auto;
  font-size: 0.5rem;
  line-height: 1.1;
  color: #9fb0c8;
  margin-bottom: 0.05rem;
  font-variant-numeric: tabular-nums;
}

.timeline-date-empty {
  color: transparent;
}

.timeline-hour {
  font-size: 0.93rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 0.16rem;
  font-variant-numeric: tabular-nums;
}

.timeline-weather {
  font-size: 1.23rem;
  line-height: 1;
  margin-bottom: 0.18rem;
}

.timeline-temp {
  line-height: 1.1;
  margin-bottom: 0.18rem;
  font-variant-numeric: tabular-nums;
}

.timeline-temp-value {
  font-size: 0.66rem;
  color: #f3f6fb;
  font-weight: 700;
}

.timeline-temp-unit {
  font-size: 0.36rem;
  color: #aeb7c5;
  margin-left: 0.03rem;
  vertical-align: 0.14rem;
}

.timeline-arrow {
  width: 0.84rem;
  height: auto;
  display: block;
  margin: 0 auto 0.12rem;
  transform-origin: center center;
  color: #ffffff;
}

.timeline-speed {
  font-size: 0.98rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.32rem; /* ←ここ増やす */
  line-height: 1.1;
}

.timeline-wave {
  width: 1.5rem;
  height: 0.9rem; /* ←少し低くする */
  margin: 0.25rem auto 0.08rem; /* ←ここ増やす */
  background: transparent;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
}

.timeline-wave.empty {
  opacity: 0;
}

.wave-icon-img {
  display: block;
  width: 2.1rem;
  height: auto;
  object-fit: contain;
}

.timeline-rain-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  height: 4.8rem;
  margin: 0.08rem 0 0.18rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.timeline-rain-value {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.44rem;
  line-height: 1;
  font-weight: 700;
  color: #1ea5e8;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timeline-rain-bar-area {
  position: absolute;
  left: 0.05rem;
  right: 0.05rem;
  bottom: 0.26rem;
  height: 3.55rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.timeline-rain-bar {
  width: 100%;
  max-width: 1.35rem;
  min-height: 0;
  background: #1ea5e8;
}

.timeline-rain-base {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.26rem;
  height: 0.07rem;
  background: rgba(255, 255, 255, 0.92);
}

.timeline-pressure {
  font-size: 0.6rem;
  color: #aab4c4;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-top: 0.06rem;
  margin-bottom: 0.12rem;
}

.timeline-mark {
  margin-top: 0.1rem;
  margin-bottom: 0.16rem;
  font-size: 1.24rem;
  line-height: 1;
  min-height: 1.24rem;
}

.timeline-day-sep {
  width: 1px;
  min-width: 1px;
  background: rgba(255, 255, 255, 0.18);
  border: none;
}

.timeline-block {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 2rem;
  width: 2rem;
  min-width: 2rem;
  padding-top: 2.55rem;
  background: rgba(255, 255, 255, 0.95);
}

.timeline-date-float {
  position: absolute;
  top: 0.08rem;
  left: 0.08rem;
  transform: none;
  z-index: 5;
  height: 1.56rem;
  line-height: 1.56rem;
  padding: 0 0.42rem;
  font-size: 1.17rem;
  font-weight: 700;
  color: #111111;
  background: #ffffff;
  border: 1px solid #d0d0d0;
  border-radius: 0.25rem;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.timeline-tide-label {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0 0.32rem;
  border-radius: 999px;
  font-size: 1.17rem;
  font-weight: 700;
  height: 1.56rem;
  line-height: 1.56rem;
  color: #002b68;
  background: rgba(255, 224, 130, 0);
  border: 1px solid rgba(255, 224, 130, 0);
  vertical-align: top;
  white-space: nowrap;
}

.timeline-block.head-break {
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.timeline-date-float.sun {
  color: #e53935;
}

.timeline-date-float.sat {
  color: #1e88e5;
}

.timeline-date-float.holiday {
  color: #e53935;
}

/* 時間帯ごとの背景色 */
.timeline-col.morning {
  background: #f3f4f6;
}

.timeline-col.day {
  background: #ffffff;
}

.timeline-col.evening {
  background: #ebecf0;
}

.timeline-col.night {
  background: #e2e5e9;
}

/* 朝 */
.timeline-col.morning .timeline-date,
.timeline-col.morning .timeline-hour,
.timeline-col.morning .timeline-weather,
.timeline-col.morning .timeline-temp-value,
.timeline-col.morning .timeline-temp-unit,
.timeline-col.morning .timeline-speed,
.timeline-col.morning .timeline-pressure,
.timeline-col.morning .timeline-mark {
  color: #000000;
}

/* 昼 */
.timeline-col.day .timeline-date,
.timeline-col.day .timeline-hour,
.timeline-col.day .timeline-weather,
.timeline-col.day .timeline-temp-value,
.timeline-col.day .timeline-temp-unit,
.timeline-col.day .timeline-speed,
.timeline-col.day .timeline-pressure,
.timeline-col.day .timeline-mark {
  color: #000000;
}

.timeline-col.day .timeline-rain-base {
  background: rgba(0, 0, 0, 0.8);
}

/* 夕方 */
.timeline-col.evening .timeline-date,
.timeline-col.evening .timeline-hour,
.timeline-col.evening .timeline-weather,
.timeline-col.evening .timeline-temp-value,
.timeline-col.evening .timeline-temp-unit,
.timeline-col.evening .timeline-speed,
.timeline-col.evening .timeline-pressure,
.timeline-col.evening .timeline-mark {
  color: #000000;
}

/* 夜 */
.timeline-col.night .timeline-date,
.timeline-col.night .timeline-hour,
.timeline-col.night .timeline-weather,
.timeline-col.night .timeline-temp-value,
.timeline-col.night .timeline-temp-unit,
.timeline-col.night .timeline-speed,
.timeline-col.night .timeline-pressure,
.timeline-col.night .timeline-mark {
  color: #000000;
}

.timeline-col.morning .timeline-rain-base,
.timeline-col.evening .timeline-rain-base,
.timeline-col.night .timeline-rain-base {
  background: rgba(0, 0, 0, 0.8);
}

.timeline-block.now .timeline-col {
  background: #ffb4b4;
}

.timeline-block.now .timeline-hour {
  color: #ff0000;
  font-weight: 700;
}

.past-title {
  position: absolute;
  top: 0.08rem;
  left: 0.08rem;
  z-index: 6;
  padding: 0.2rem 0.45rem;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.25rem;
  white-space: nowrap;
  pointer-events: none;
}

.timeline-moon-slot {
  width: 1.05rem;
  height: 0.9rem;
  margin: -0.02rem auto 0.08rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.timeline-moon-slot.empty {
  visibility: hidden;
}

.timeline-moon-svg {
  width: 0.78rem;
  height: 0.78rem;
  display: block;
}

.install-btn {
  position: fixed;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 999px;
  background: #0ea5e9;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.install-btn:active {
  transform: scale(0.98);
}
