/* 基本的なリセット */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px; /* remの基準 */
}

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  color: #333;
  background-image: url('1.png');
  background-repeat: no-repeat; /* 画像の繰り返しをなくす */
  background-position: center center; /* 画像を中央に配置 */
  background-size: cover; /* 画面いっぱいに画像を拡大・縮小 */
  min-height: 100vh; /* body要素の最小高さをビューポートの高さにする */
}

.container {
  display: flex;
  width: 100%;
  height: 100%;
}

.left-panel {
  width: 22vw;
  height: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  color: #fff;
}

    .time-container {
        position: absolute;
        top: 46px;
        left: 10px;
    }

    #dateInfo {
        /* フォントサイズをビューポート幅に応じて調整 */
        font-size: clamp(1.0rem, 2vw, 2.5rem); /* min, preferred, max */
        margin-bottom: 1vh;
        text-align: center;
    }

    #currentTime {
        font-size: 140px;
        line-height: 1;
    }

    #currentSecond {
        font-size: clamp(2rem, 3vw, 3.5rem);
        text-align: right; /* 秒を右寄りに */
    }

.weather-container {
  display: flex;
  align-items: center;
  color: #fff;
  position: absolute;
  top: 480px;
  left: 15px;
}

#weather-info {
  font-size: 1.6rem;
}

#weather-info b {
  display: block;
  margin-bottom: 0.2em;
  font-size: 1.2em;
}

.cafeteria-menu-section {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: rgba(109, 100, 91, 0.7);
  border-radius: 5px;
  color: #fff;
  position: absolute;
  top: 675px;
  left: 20px;
  width: 310px; /* gapの半分を引く */
  height: 28vh;
}

#cafeteria-menu-title {
  position: absolute;
  top: 10px;
  left: 100px;
  font-size: 1.0rem;
  font-weight: bold;
  text-align: center; /* ←変更点: center から left に変更 */
}

#cafeteria-menu-list {
  position: absolute;
  top: 40px;
  left: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left; /* ←変更点: center から left に変更 */
}

#cafeteria-menu-list li {
  font-size: 0.8rem;
  line-height: 1.6;
  padding: 5px 0;
}

.main-panel {
  flex: 1;
  padding: 15px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 15px;
  overflow-y: auto;
  position: absolute;
  top: 10px;
  left: 400px;
  width: 79%;
  height: 93%;
}

.station-box {
  background-color: rgba(220, 220, 220, 0.95);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.station-title {
  padding: 0.8rem 1rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-align: center;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.jr-title-color { background-color: #0169b7; }
.hankyu-title-color { background-color: #451722; }
.bus-title-color { background-color: #ecc181; color: #333; }

.timetable-area {
  padding: 0.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* 内容が多い場合にスクロール */

}

.timetable-area table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  font-size: 1.5rem;
}

.timetable-area th,
.timetable-area td {
  padding: 0.4rem 0.5rem;
  text-align: left;
  border-right: 1px solid #bbb;
  border-bottom: 1px solid #bbb;
  white-space: nowrap;
}
.timetable-area th:last-child,
.timetable-area td:last-child {
  border-right: none;
}
.timetable-area tbody tr:last-child td {
  border-bottom: none;
}

.direction-header {
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  background-color: rgba(0,0,0,0.08);
  color: #333;
}
.category-header th {
  font-size: 0.85rem;
  background-color: rgba(0,0,0,0.04);
  font-weight: normal;
  color: #333;
}

#jr-suita-tbody td:nth-child(1),
#jr-suita-tbody td:nth-child(4) {
  font-weight: bold;
}
#hankyu-suita-tbody td:nth-child(1),
#hankyu-suita-tbody td:nth-child(4) {
  font-weight: bold;
}
#hankyu-toyotsu-tbody td:nth-child(1),
#hankyu-toyotsu-tbody td:nth-child(4) {
  font-weight: bold;
}
#bus-tbody td:nth-child(1){
  font-weight: bold;
}

.status-area {
  margin: 0.5rem 0.5rem 0.8rem 0.5rem;
  border-radius: 6px;
  text-align: center;
  font-size: 1.1rem;
  height: 35px;
}

.status-area p {
  margin: 0;
  padding: 0;
}

.status-area .status-title {
  font-weight: bold;
  font-size: 1em;
  display: block;
  margin-bottom: 0.3em;
}

.status-normal {
  background-color: #E8F5E9;
  color: #1B5E20;
}

.status-trouble {
  background-color: #FFEBEE;
  color: #B71C1C;
  font-weight: bold;
}

.status-error {
  background-color: #f0f0f0;
  color: #555;
  font-style: italic;
}

.footer-scroll {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.6rem 1rem;
  background: #333;
  color: white;
  font-size: 1.2rem;
  white-space: nowrap;
  z-index: 1000;
}

#fullscreen-button {
  position: fixed;
  bottom: 45px;
  right: 15px;
  background-color: rgba(50, 50, 50, 0.8);
  color: white;
  border-radius: 5px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
}

#fullscreen-button:hover {
  background-color: rgba(80, 80, 80, 0.9);
}
