* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #101722;
  --panel: #1a2433;
  --panel-border: #2a3a52;
  --text: #e8eef7;
  --text-dim: #ffffff;
  --accent: #4db3ff;
  --temp: #ffb15e;
  --rain: #6ec6ff;
  --wind: #9be8b0;
  --now-bg: #24405f;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background: #0a0e15;
  color: var(--text);
  font-family: "Yu Gothic UI", "Meiryo", sans-serif;
  font-weight: bold;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

#app {
  width: 1280px;
  height: 720px;
  flex: none;
  background: var(--bg);
  transform-origin: center center;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---- ヘッダー ---- */
#header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

#place {
  font-size: 30px;
  font-weight: bold;
}

#today-date {
  font-size: 54px;
  color: var(--text);
  margin-left: 14px;
}

#updated {
  font-size: 15px;
  color: var(--text-dim);
}

#updated.error {
  color: #ff8484;
}

/* ---- パネル共通 ---- */
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 14px 18px;
}

.panel-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 10px;
}

.panel-title .weekday {
  color: var(--text-dim);
  font-size: 16px;
}

/* ---- 今日（2時間おき12コマ） ---- */
#today-panel {
  flex: 2.2;
  display: flex;
  flex-direction: column;
}

#today-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
}

.hour-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  border-radius: 10px;
  padding: 8px 2px;
  background: rgba(255, 255, 255, 0.03);
}

.hour-cell.past {
  opacity: 0.38;
}

.hour-cell.now {
  background: #2d5580;
  outline: 2px solid var(--accent);
  box-shadow: 0 0 16px rgba(77, 179, 255, 0.6);
}

.hour-time {
  font-size: 18px;
  color: var(--text-dim);
}

.hour-cell.now .hour-time {
  color: var(--accent);
  font-weight: bold;
}

.hour-icon {
  font-size: 48px;
  line-height: 1.15;
}

.hour-desc {
  font-size: 14px;
  color: var(--text-dim);
  white-space: nowrap;
}

.hour-temp {
  font-size: 28px;
  font-weight: bold;
  color: var(--temp);
}

.hour-temp small,
.half-temp small,
.hour-rain small,
.half-rain small {
  font-size: 0.65em;
}

.hour-rain {
  font-size: 28px;
  color: var(--rain);
}

.hour-wind {
  font-size: 15px;
  color: var(--wind);
  white-space: nowrap;
}

/* ---- 明日・明後日（午前/午後） ---- */
#days-row {
  flex: 1;
  display: flex;
  gap: 14px;
}

.day-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.day-panel .panel-title {
  font-size: 18px;
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.day-panel .day-title {
  white-space: nowrap;
}

.day-panel .panel-title .weekday {
  color: #ffffff;
}

.half-head {
  flex: 1;
  text-align: center;
  color: var(--text-dim);
  font-size: 18px;
}

.halfday-row {
  flex: 1;
  display: flex;
  gap: 10px;
}

.half-cell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 10px;
}

.half-main {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.half-icon {
  font-size: 53px;
  line-height: 1.15;
}

.half-desc {
  font-size: 17px;
  color: var(--text-dim);
  white-space: nowrap;
}

.half-stats {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 18px;
}

.half-temp {
  font-size: 23px;
  font-weight: bold;
  color: var(--temp);
}

.half-rain {
  font-size: 23px;
  color: var(--rain);
}

.half-wind {
  color: var(--wind);
}
