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

body {
    background: #ffffff;
    color: #1f2937;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* ── スタートオーバーレイ ── */
#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.80);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    cursor: pointer;
    z-index: 100;
}
#overlay-title {
    font-size: 32px;
    letter-spacing: 8px;
    color: #f9fafb;
}
#play-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(145deg, #e2e8f0, #94a3b8);
    border: 2px solid #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.2s;
    box-shadow: 3px 3px 8px rgba(0,0,0,0.4), -1px -1px 4px rgba(255,255,255,0.15);
}
#play-btn:hover { filter: brightness(1.1); }
#play-btn::after {
    content: '';
    border-style: solid;
    border-width: 12px 0 12px 24px;
    border-color: transparent transparent transparent #1e293b;
    margin-left: 6px;
}
#overlay-hint { font-size: 14px; color: #94a3b8; }

/* ── メインレイアウト ── */
#app {
    display: flex;
    align-items: center;
    gap: 52px;
    padding: 40px 48px;
    border-radius: 20px;

    /* シルバーメタリック */
    background: linear-gradient(
        160deg,
        #f0f2f5 0%,
        #dde1e7 15%,
        #eaedf1 30%,
        #c8cdd6 50%,
        #dde1e7 65%,
        #f0f2f5 80%,
        #d4d8e0 100%
    );
    border: 1px solid #e2e5ea;
    box-shadow:
        0 6px 12px rgba(0,0,0,0.18),
        0 20px 48px rgba(0,0,0,0.28),
        inset 0 1px 0 rgba(255,255,255,0.85),
        inset 0 -1px 0 rgba(0,0,0,0.06);
}

/* ── アナログ時計 ── */
#clock-wrap { flex-shrink: 0; }
#clock-svg {
    width: 260px;
    height: 260px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.22));
}

/* ── 右パネル ── */
#panel {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 270px;
}
#ampm {
    font-size: 16px;
    letter-spacing: 3px;
    color: #64748b;
}
#digital-time {
    font-size: 60px;
    font-weight: 200;
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: #1e293b;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}
#date-display {
    font-size: 20px;
    color: #475569;
    margin-top: 4px;
}

/* ── コントロール ── */
#controls {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.ctrl-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 5px;
    letter-spacing: 1px;
}
select {
    width: 100%;
    background: #ffffff;
    border: 1px solid #adb5bd;
    color: #1e293b;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08), 0 1px 0 rgba(255,255,255,0.9);
}
select:focus { border-color: #6b7280; }

.vol-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.vol-row .ctrl-label { margin-bottom: 0; }
#vol-value { font-size: 12px; color: #64748b; }
input[type="range"] {
    width: 100%;
    margin-top: 6px;
    accent-color: #475569;
    cursor: pointer;
    height: 4px;
}

/* ── クレジット ── */
#credits {
    margin-top: 28px;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.8;
}

/* ── レスポンシブ ── */
@media (max-width: 640px) {
    #app { flex-direction: column; gap: 28px; padding: 28px 24px; }
    #clock-svg { width: 200px; height: 200px; }
    #digital-time { font-size: 44px; }
}
