:root {
  --bg-color: #f6f2e9;
  --panel-bg: #ede6d6;
  --card-bg: #fffdf9;
  --border-color: #d5cbb8;
  --text-main: #4a4238;
  --text-sub: #7a7062;
  --accent: #6b8e78;
  --accent-dark: #52705d;
  --express: #b56552;
  --rapid: #c28b46;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  display: flex;
  justify-content: center;
  padding: 24px 15px;
  line-height: 1.5;
}
.container {
  width: 100%;
  max-width: 780px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 18px;
}
header h1 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.sub-title {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin-top: 2px;
}
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.status-bar {
  font-size: 0.9rem;
  color: var(--text-sub);
  display: flex;
  gap: 14px;
  font-variant-numeric: tabular-nums;
}
.time-controls {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
button {
  background-color: var(--panel-bg);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 6px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
button:hover:not(:disabled) {
  background-color: #e2d8c3;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.time-controls button.active {
  background-color: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-skip {
  background-color: var(--card-bg);
  font-weight: 600;
}
.window-frame {
  position: relative;
  width: 100%;
  height: 240px;
  background-color: #dcd3c1;
  border: 10px solid #c4b7a1;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.12);
  margin-bottom: 16px;
}
.scenery {
  position: relative;
  width: 100%;
  height: 100%;
}
.sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, #9ec3d6, #dce7eb);
}
.far-layer,
.near-layer,
.poles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.track-bed {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 26px;
  background-color: #78726a;
  border-top: 3px solid #968f85;
}
.overhead-wire {
  position: absolute;
  top: 28px;
  width: 100%;
  height: 2px;
  background-color: rgba(74, 66, 56, 0.45);
}
.far-item {
  position: absolute;
  bottom: 26px;
}
.near-item {
  position: absolute;
  bottom: 26px;
}
.theme-urban .far-item {
  background-color: #98a9b3;
  border-top: 2px solid #8395a0;
}
.theme-urban .near-item {
  background-color: #7c8b94;
  border: 1px solid #687780;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 8px,
    rgba(235, 244, 247, 0.45) 8px,
    rgba(235, 244, 247, 0.45) 12px
  );
}
.theme-bay_industrial .far-item {
  background-color: #9aa3a6;
  border-radius: 4px 4px 0 0;
}
.theme-bay_industrial .near-item {
  background-color: #828a8c;
  border-top: 3px solid #6a7275;
}
.theme-suburban .far-item {
  background-color: #8fa399;
  border-radius: 12px 12px 0 0;
}
.theme-suburban .near-item {
  background-color: #b5a795;
  border-top: 4px solid #7d6d5d;
}
.pole {
  position: absolute;
  bottom: 20px;
  width: 5px;
  height: 195px;
  background-color: #5c5346;
}
.pole::after {
  content: "";
  position: absolute;
  top: 10px;
  left: -14px;
  width: 32px;
  height: 3px;
  background-color: #5c5346;
}
.info-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background-color: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
  text-align: center;
}
.label {
  font-size: 0.75rem;
  color: var(--text-sub);
  margin-bottom: 3px;
}
.value {
  font-size: 1rem;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
}
.log-box {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.choice-panel {
  background-color: var(--panel-bg);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
  text-align: center;
}
.choice-message {
  font-weight: bold;
  margin-bottom: 10px;
}
.choice-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.btn-primary {
  background-color: var(--accent);
  color: #fff;
  border-color: var(--accent);
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: bold;
}
.btn-primary:hover {
  background-color: var(--accent-dark);
}
.btn-secondary {
  background-color: var(--card-bg);
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: bold;
}
.timetable-board {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
}
.board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}
.board-header h2 {
  font-size: 1.05rem;
}
.table-wrapper {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
th,
td {
  padding: 9px 8px;
  text-align: left;
  border-bottom: 1px solid var(--panel-bg);
}
th {
  color: var(--text-sub);
  font-weight: 600;
  background-color: var(--panel-bg);
}
.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: bold;
}
.badge-local {
  background-color: var(--accent);
}
.badge-rapid {
  background-color: var(--rapid);
}
.badge-express {
  background-color: var(--express);
}
.stops-preview {
  color: var(--text-sub);
  font-size: 0.78rem;
}
.btn-board {
  background-color: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: bold;
  white-space: nowrap;
}
.btn-board:hover:not(:disabled) {
  background-color: var(--accent-dark);
}
.hidden {
  display: none;
}
@media (max-width: 640px) {
  .info-panel {
    grid-template-columns: repeat(2, 1fr);
  }
  .header-right {
    align-items: flex-start;
  }
}