/* 칩·버튼·필드에 display를 주므로 브라우저 기본 [hidden] 규칙이 밀린다 — 되돌려 둔다 */
#et-root [hidden] {
    display: none !important;
}

.et {
    --et-break: #43A047;
    max-width: 880px;
    margin: 0 auto;
}

/* ── 설정 ── */
.et-settings {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 12px;
}

.et-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.et-label {
    font-size: 13px;
    color: var(--text-muted-color);
}

.et-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.et-chip {
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--surface-color);
    color: var(--text-secondary-color);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.et-chip:hover:not(:disabled) {
    border-color: var(--primary-light);
    background: var(--tint-orange-bg);
    color: var(--primary-dark);
}

.et-chip.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

/* 진행 중엔 모드·범위·연장을 잠근다 */
.et-chip:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.et-chip.is-active:disabled {
    opacity: 0.8;
}

.et-note {
    margin: 8px 0;
    font-size: 13px;
    color: var(--text-muted-color);
}

.et-sound {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--tint-amber-bg);
    color: var(--text-color);
    font-size: 14px;
}

/* ── 상태 ── */
.et-status {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 6px 12px;
    margin: 20px 0 12px;
    text-align: center;
}

.et-phase {
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--surface-alt-color);
    color: var(--text-secondary-color);
    font-size: 13px;
    font-weight: 600;
}

.et-phase[data-phase="exam"] { background: var(--primary-color); color: #fff; }
.et-phase[data-phase="break"] { background: var(--et-break); color: #fff; }
.et-phase[data-phase="paused"] { background: var(--tint-amber-bg); color: var(--text-color); }

.et-title {
    font-size: 20px;
}

.et-range {
    font-size: 14px;
    color: var(--text-secondary-color);
    font-variant-numeric: tabular-nums;
}

/* ── 아날로그 ── */
.et-clocks {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.et-clock {
    width: min(320px, 42vw);
    height: auto;
}

@media (max-width: 600px) {
    .et-clocks {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .et-clock {
        width: min(280px, 80vw);
    }
}

.et-face { fill: var(--surface-color); stroke: var(--border-color); stroke-width: 2; }
.et-tick { stroke: var(--text-muted-color); stroke-width: 1; }
.et-tick-major { stroke: var(--text-color); stroke-width: 2.5; }
.et-num { fill: var(--text-color); font-size: 15px; font-weight: 600; text-anchor: middle; dominant-baseline: central; }
.et-band { fill: none; stroke: var(--primary-light); stroke-width: 8; }
.et-band-left { fill: none; stroke: var(--primary-color); stroke-width: 8; }
.et-band-left.is-break { stroke: var(--et-break); }
.et-hand { stroke: var(--text-color); stroke-linecap: round; }
.et-hand-hour { stroke-width: 6; }
.et-hand-min { stroke-width: 4; }
.et-hand-sec { stroke: var(--primary-color); stroke-width: 1.5; }
.et-pin { fill: var(--text-color); }
.et-disc { fill: var(--primary-color); }
.et-disc.is-break { fill: var(--et-break); }
.et-disc.is-waiting { fill: var(--text-muted-color); opacity: 0.35; }
/* 원판 위 어느 색에서도 읽히도록 바탕색 테두리를 깐다 */
.et-disc-label { fill: var(--text-color); font-size: 12px; text-anchor: middle; paint-order: stroke; stroke: var(--surface-color); stroke-width: 3; }

.et-caption {
    margin: 12px 0 0;
    text-align: center;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
}

/* ── 디지털 ── */
.et-digital {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 32px 16px;
    border: 0;
    background: none;
    color: var(--text-color);
    font: inherit;
    cursor: pointer;
}

.et-digital-label { font-size: 15px; color: var(--text-secondary-color); }
.et-digital-time { font-size: clamp(56px, 16vw, 128px); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.et-digital-sub { font-size: 14px; color: var(--text-muted-color); font-variant-numeric: tabular-nums; }

/* ── 조작 ── */
.et-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 24px 0 8px;
}

.et-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--surface-color);
    color: var(--text-color);
    font: inherit;
    font-size: 15px;
    cursor: pointer;
}

.et-btn-primary {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

@media (max-width: 767px) {
    .et-chip { min-height: 44px; }
}

/* ── 시간표 ── */
.et-schedule {
    width: 100%;
    margin-top: 24px;
    border-collapse: collapse;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.et-schedule th,
.et-schedule td {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.et-schedule th {
    color: var(--text-muted-color);
    font-weight: 600;
}

.et-source {
    margin: 8px 0 32px;
    font-size: 12px;
    color: var(--text-muted-color);
}

/* ── 전체화면: 시계와 조작만 남긴다 ── */
#et-root:fullscreen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: none;
    padding: 24px;
    overflow-y: auto;
    background: var(--bg-color);
}

#et-root:fullscreen .et-settings,
#et-root:fullscreen .et-note,
#et-root:fullscreen .et-schedule,
#et-root:fullscreen .et-source {
    display: none;
}

#et-root:fullscreen .et-clock {
    width: min(42vw, 70vh);
}
