body { background-color: #f8f8f8; display: flex; align-items: center; justify-content: center; min-height: 100vh; margin: 0; font-family: sans-serif; overflow: hidden; padding: 10px; box-sizing: border-box; transition: background-color 0.8s ease, color 0.8s ease; } body.dark { background-color: #222; color: #fff; } /* 時計コンテナ */ #clock-container { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; max-width: 90vw; text-align: center; } #realtime { font-size: min(40vh, 20vw); color: #333; font-weight: bold; user-select: none; line-height: 1; margin: 0; white-space: nowrap; } body.dark #realtime { color: #fff; } #info-bottom { display: flex; justify-content: space-between; align-items: flex-end; width: 100%; margin-top: 1vh; padding: 0 2vw; box-sizing: border-box; } #date-display, #ampm-display { font-size: min(6vh, 3vw); color: #666; white-space: nowrap; margin: 0; line-height: 1; } body.dark #date-display, body.dark #ampm-display { color: #fff; } /* アナログ時計 */ #analog-canvas { display: none; width: min(80vw, 80vh); height: min(80vw, 80vh); max-width: 600px; max-height: 600px; } /* コントロールパネル */ #controls { margin-top: 2vh; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; } /* フォント選択を非表示にするクラス */ #font-wrapper.hidden { display: none; } /* スマホ対応 */ @media (max-width: 768px) { #realtime { font-size: min(25vh, 40vw); } #info-bottom { margin-top: 0.5vh; padding: 0 1vw; } #ampm-display { font-size: min(4vh, 6vw); } }