/* 黒板に映す道具：遠くの席から読める大きな数字。色・上の帯は pop.css（後ろで読む） */
:root { color-scheme: light; --navy: #2a2350; }
* { box-sizing: border-box; }
html { background: #fff8e7; }
body { margin: 0; color: var(--navy); font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif; line-height: 1.6; }
button { font: inherit; cursor: pointer; }
.top { max-width: 1400px; margin: 0 auto; padding: .8rem 16px 0; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.kb-wrap { max-width: 1400px; margin: 0 auto; padding: 8px 16px 24px; }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0 1rem; }
.tabs button { border: 2px solid var(--navy); background: #fff; border-radius: 999px; padding: .4rem 1rem; font-weight: 700; font-family: "UD デジタル 教科書体 N", "UD Digi Kyokasho N", "Yu Gothic UI", sans-serif; }
.tabs button[aria-selected="true"] { background: #ffc93c; box-shadow: 3px 3px 0 var(--navy); }
.tabs .full { margin-left: auto; background: #ff6b4a; color: #fff; box-shadow: 3px 3px 0 var(--navy); }
.pane { background: #fff; border: 3px solid var(--navy); border-radius: 24px; box-shadow: 6px 6px 0 var(--navy); padding: 2vmin 3vmin 3vmin; min-height: 60vh; }
.big { font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif; font-weight: 800; font-variant-numeric: tabular-nums; font-size: min(30vmin, 22vw); line-height: 1.05; text-align: center; letter-spacing: .02em; }
.big.mid { font-size: min(18vmin, 13vw); }
.big small { font-size: .4em; margin-left: .2em; color: #8d88a8; }
.bar { height: 3.2vmin; min-height: 14px; border: 3px solid var(--navy); border-radius: 999px; overflow: hidden; margin: 1vmin 4vmin 2.4vmin; background: #f3efe4; }
.bar span { display: block; height: 100%; width: 100%; background: #2fbf8f; transition: background .3s; }
.bar span[data-lv="sun"] { background: #ffc93c; } .bar span[data-lv="red"] { background: #ff6b4a; }
.ctl { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .6rem; margin: .6rem 0; }
.ctl button { border: 3px solid var(--navy); background: #fff; border-radius: 16px; padding: .5rem 1.4rem; font-size: 1.3rem; font-weight: 800; box-shadow: 3px 3px 0 var(--navy); }
.ctl button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--navy); }
.ctl button.go { background: #ff6b4a; color: #fff; font-size: 1.6rem; padding: .5rem 2.2rem; }
.ctl.small button { font-size: 1rem; padding: .3rem .8rem; border-width: 2px; box-shadow: 2px 2px 0 var(--navy); }
.ctl.small button.go { font-size: 1.05rem; padding: .3rem 1rem; }
.ctl .sep { width: 1rem; }
.ctl label { font-weight: 700; display: inline-flex; align-items: center; gap: .3rem; }
.ctl input[type="number"] { width: 4.2em; font: inherit; border: 2px solid var(--navy); border-radius: 10px; padding: .2rem .4rem; }
.hint { text-align: center; color: #5d5780; font-size: .9rem; margin: .6rem 0 0; }
.two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3vmin; align-items: start; }
.clock { text-align: center; border-left: 3px dashed #d9d3c4; padding-left: 3vmin; }
.cdate { font-size: min(6vmin, 5vw); font-weight: 800; font-family: "UD デジタル 教科書体 N", "UD Digi Kyokasho N", "Yu Gothic UI", sans-serif; }
.laps { list-style: none; padding: 0; margin: .6rem auto; max-width: 22rem; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.laps li { display: flex; justify-content: space-between; border-bottom: 2px dashed #e4dfd2; padding: .1rem .4rem; }
.laps li span { color: #8d88a8; }
.kuji { font-family: "Segoe UI", Arial, sans-serif; font-weight: 800; font-size: min(36vmin, 24vw); line-height: 1; text-align: center; width: min(50vmin, 70vw); aspect-ratio: 1; margin: 1vmin auto; display: grid; place-items: center; border: 4px solid var(--navy); border-radius: 50%; background: #fff1c9; box-shadow: 6px 6px 0 var(--navy); }
.left { color: #5d5780; }
.hist { list-style: none; padding: 0; margin: .6rem 0; display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; }
.hist li { min-width: 2.4rem; text-align: center; border: 2px solid var(--navy); border-radius: 999px; font-weight: 800; background: #dbf0fd; }
.grp h2 { margin: 0 0 .4rem; font-family: "UD デジタル 教科書体 N", "UD Digi Kyokasho N", "Yu Gothic UI", sans-serif; }
.gout { list-style: none; padding: 0; margin: .6rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .5rem; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.gout li { border: 2px solid var(--navy); border-radius: 14px; padding: .4rem .7rem; background: #d6f4e8; }
.gout b { display: block; font-size: 1rem; }
#r-text { display: block; width: 100%; min-height: 62vh; border: none; resize: vertical; font-family: "UD デジタル 教科書体 N", "UD Digi Kyokasho N", "Yu Gothic UI", sans-serif; font-weight: 700; line-height: 1.45; color: var(--navy); background: transparent; outline: none; }
/* 0になった時：画面がぴかっと光る */
body.ring .pane { animation: ring .5s 6 alternate; }
@keyframes ring { to { background: #ffe1d9; } }
/* 大きく映す（全画面）時は、上の帯と下の一覧を隠す */
:fullscreen .top, :fullscreen .foot { display: none; }
:fullscreen .kb-wrap { max-width: none; }
.foot { max-width: 1400px; margin: 0 auto; padding: 0 16px 32px; font-size: .8rem; color: #5d5780; }
.sister h2 { font-size: .9rem; margin: 1rem 0 .3rem; }
.sister ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .1rem 1rem; }
.sister a { font-weight: 700; margin-right: .5rem; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } .clock { border-left: none; padding-left: 0; border-top: 3px dashed #d9d3c4; padding-top: 2vmin; } }
@media (prefers-reduced-motion: reduce) { body.ring .pane { animation: none; background: #ffe1d9; } }
