/* ===== DonutTimer skin（style.css の後に読み込む） =====
 * 2026-10-20 確定デザイン: 穴38%・歯形subtle・数字 Nunito 800・日本語 M PLUS Rounded 1c 500
 * TimerTrain の配置と操作はそのまま。色・書体・リング部分だけを上書きする。
 */
:root {
--bg: #FFF9EF;
--card: #FFFFFF;
--text: #352F2B;
--text2: #77665D;
--line: #EADFD0;
--accent: #292725;
--accent-text: #FFFFFF;
--shadow: 0 1px 2px rgba(53,47,43,.05), 0 4px 14px rgba(53,47,43,.04);
--font-round: 'M PLUS Rounded 1c', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', sans-serif;
--font-num: 'Nunito', 'M PLUS Rounded 1c', -apple-system, BlinkMacSystemFont, sans-serif;
--font-logo: 'Titan One', 'Nunito', 'M PLUS Rounded 1c', sans-serif;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #1A1614;
--card: #26201D;
--text: #F6EEE7;
--text2: #B9A99E;
--line: rgba(246,238,231,.12);
--accent: #F6EEE7;
--accent-text: #1A1614;
--shadow: none;
}
}
:root[data-theme="light"] {
--bg: #FFF9EF; --card: #FFFFFF; --text: #352F2B; --text2: #77665D; --line: #EADFD0;
--accent: #292725; --accent-text: #FFFFFF;
--shadow: 0 1px 2px rgba(53,47,43,.05), 0 4px 14px rgba(53,47,43,.04);
}
:root[data-theme="dark"] {
--bg: #1A1614; --card: #26201D; --text: #F6EEE7; --text2: #B9A99E; --line: rgba(246,238,231,.12);
--accent: #F6EEE7; --accent-text: #1A1614; --shadow: none;
}
@media (prefers-color-scheme: dark) {
.run-controls button { background: #2F2824; border-color: rgba(246,238,231,.14); }
}
:root[data-theme="light"] .run-controls button { background: var(--card); border-color: var(--line); }
:root[data-theme="dark"] .run-controls button { background: #2F2824; border-color: rgba(246,238,231,.14); }

/* ---- 書体 ---- */
body { font-family: var(--font-round); font-weight: 500; }
.logo { font-family: var(--font-logo); font-weight: 400; letter-spacing: 0; font-size: 26px; }
.time-btn, .time-input, .time-field, .time-colon, #rep-count, .rep-input, .run-cycle { font-family: var(--font-num); font-weight: 800; letter-spacing: -.02em; }
.name-input { font-weight: 500; }
@media (min-width: 900px) { .logo { font-size: 30px; } }

/* ---- ドーナツ（穴の中に作業名と時刻） ---- */
.ring-wrap { width: min(86vw, 380px); container-type: inline-size; }
.ring-wrap .donut { display: block; width: 100%; height: 100%; }
.ring-wrap .ring-inner { padding: 0; }
body.dt .ring-inner .run-name {
font-family: var(--font-round); font-weight: 500; color: var(--text2);
font-size: 13px; font-size: max(11px, 3.4cqw); line-height: 1.3;
max-width: 28cqw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
margin: 0 0 .1em;
}
body.dt .ring-inner .run-time {
font-family: var(--font-num); font-weight: 800; color: var(--text);
font-size: 40px; font-size: 11.56cqw; letter-spacing: -.025em; line-height: 1.05;
white-space: nowrap;
}
/* 1時間以上（h:mm:ss）は穴を広げず数字を小さく */
body.dt .ring-inner .run-time[data-len="7"] { font-size: 8.1cqw; }
body.dt .ring-inner .run-time[data-len="8"] { font-size: 7.1cqw; }
body.dt .ring-inner .run-time.finished {
font-family: var(--font-round); font-weight: 700; font-size: 5.6cqw; letter-spacing: 0;
}
/* 食べ終わったあとはお皿の輪郭だけ残す */
.ring-wrap.dt-done::before {
content: ''; position: absolute; inset: 1%; border-radius: 50%;
border: 2px dashed var(--line);
}

/* ---- 下の連結（ミニドーナツ。1タイマー1個） ---- */
body.dt .stations { gap: 0; margin-bottom: 18px; }
body.dt .station {
width: 32px; height: 32px; padding: 1px; border-radius: 50%;
background: none; display: inline-flex;
}
body.dt .station .donut-mini { width: 100%; height: 100%; display: block; }
body.dt .station.done { opacity: .4; }
body.dt .station.now { transform: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
body.dt .rail { width: 12px; height: 2px; background: var(--line); }

/* ---- 設定行の色ボタン → ミニドーナツ ---- */
body.dt .color-dot { width: 30px; height: 30px; background: none; padding: 0; display: inline-flex; }
body.dt .color-dot .donut-mini { width: 100%; height: 100%; display: block; }
body.dt .color-pop { gap: 6px; }
body.dt .color-pop button { width: 40px; height: 40px; padding: 4px; background: none; display: inline-flex; }
body.dt .color-pop button .donut-mini { width: 100%; height: 100%; display: block; }
body.dt .color-pop button.sel { outline: 2px solid var(--text); outline-offset: 0; }

/* ---- PC ---- */
@media (min-width: 900px) {
.app { grid-template-columns: minmax(0, 1.2fr) minmax(300px, .85fr); column-gap: 48px; }
.ring-wrap { width: min(36vw, 440px); }
}

/* ---- 集中モード（文字は穴に合わせて cqw で自動的に拡大縮小） ---- */
body.focus-mode .ring-wrap { width: min(66vh, 52vw); }
@media (max-width: 899px) {
body.focus-mode .ring-wrap { width: min(88vw, 58vh); width: min(88vw, 58dvh); }
}
@media (max-width: 899px) and (orientation: landscape) {
body.focus-mode .ring-wrap { width: min(62vh, 46vw); width: min(62dvh, 46vw); }
}

@media (prefers-reduced-motion: reduce) {
body.dt .station { transition: none; }
}
