html, body {
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100vw;
  font-family: 'BIZ UDGothic', sans-serif;
  background-color: black;
  color: white;
  overflow: hidden;
}

/* 横向き（PCなど）用の2分割レイアウト */
.layout-container {
  display: flex;
  height: 100%;
  width: 100%;
}

.character-area {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: black;
  overflow: hidden;
}

.character-area img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.clock-area {
  width: 25vw;
  padding-left: 0.5vw;
  padding-right: 1vw;
  background-color: black;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 通常は中央揃え */
.clock-container {
  text-align: center;
}

.clock, .date {
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.clock {
  font-size: 6vw;
}

.date {
  font-size: 3vw;
  margin-top: 10px;
}

/* スマートフォン縦表示 */
@media screen and (max-width: 768px) and (orientation: portrait) {
  .layout-container {
    position: relative;
    display: block;
  }

  .character-area {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
  }

  .character-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .clock-area {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
  }

  .clock {
    font-size: 16vw;
  }

  .date {
    font-size: 6vw;
    margin-top: 10px;
  }

  .clock-container {
    text-align: center;
    margin-left: 0;
  }
}

/* 横表示のみ：時計を画像寄りに調整 */
@media screen and (min-width: 769px) {
  .clock-container {
    text-align: center;
    margin-left: -20vw;
  }
}

/* 設定アイコン */
.settings-toggle {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 1.8em;
  cursor: pointer;
  z-index: 1000;
  user-select: none;
}

/* 設定パネル */
.control-panel {
  position: absolute;
  top: 50px;
  left: 10px;
  background-color: #fff;
  color: #000;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: none;
  font-size: 0.9em;
}
