/* ko-koyomi（こよみ：日づけと よう日・二十四節気の わ）。字は Klee One（国語ページで よみこむ）→ 教科書体 → 丸ゴシック。
   色：正かい＝みどり・まちがい＝赤・とくべつな 読みの 日＝オレンジ・日よう＝赤・土よう＝青。季節の 色は 理科 sci-season と そろえる */
.kym { --kf: "Klee One", "UD Digi Kyokasho NK-R", "UD デジタル 教科書体 NK-R", "UD Digi Kyokasho N-R", "YuKyokasho", "游教科書体", "HGKyokashotai", "Hiragino Maru Gothic ProN", "Zen Maru Gothic", "M PLUS Rounded 1c", "BIZ UDGothic", "Noto Sans JP", sans-serif;
  --o: #f59e0b; --od: #b45309; --ok: #10b981; --okd: #047857; --ng: #ef4444; --s: #2563eb; --sun: #dc2626;
  font-size: 1.05rem; position: relative; color: var(--ink, #1f2937); }
.kym [hidden] { display: none !important; }
.kym button { font-family: inherit; -webkit-tap-highlight-color: transparent; color: inherit; }
.kym ruby, .kym .kym-q, .kym .kym-day, .kym .kym-wd, .kym .kym-ch, .kym .kym-read, .kym .kym-g, .kym .kym-ctr, .kym .kym-mean, .kym .kym-feel, .kym svg text { font-family: var(--kf); }
.kym rt { font-size: .5em; font-weight: 500; font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif; }
.kym svg { display: block; }

/* 問い・よそう */
.kym-qbox { display: flex; gap: 8px; align-items: flex-start; background: linear-gradient(180deg, #fff8e6, #fffdf6); border: 2px solid var(--o); border-radius: 16px; padding: 8px 8px 8px 14px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(245, 158, 11, .12); }
.kym-q { flex: 1; margin: 0; font-weight: 600; font-size: 1.12rem; line-height: 1.8; }
.kym-big .kym-q { font-size: 1.25rem; }
.kym-qs { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #bfdbfe; background: #fff; color: var(--s) !important; padding: 7px; cursor: pointer; }
.kym-qs svg { width: 100%; height: 100%; }
.kym-guess { background: #fff; border: 2px dashed var(--o); border-radius: 16px; padding: 8px 12px 10px; margin-bottom: 12px; }
.kym-gq { margin: 0 0 8px; font-weight: 700; line-height: 1.8; }
.kym-gt, .kym-gok { display: inline-block; margin-right: 8px; padding: 0 10px; border-radius: 999px; background: var(--o); color: #fff; font-size: .85rem; vertical-align: .1em; }
.kym-gok { background: var(--ok); }
.kym-gb, .kym-chs { display: flex; flex-wrap: wrap; gap: 8px; }
.kym-chs:not(:empty) { margin-top: 12px; justify-content: center; }
.kym-g { min-height: 50px; min-width: 64px; padding: 4px 16px; border: 2px solid #cbd5e1; background: #fff; border-radius: 12px; font-weight: 700; font-size: 1.1rem; cursor: pointer; box-shadow: 0 2px 0 #cbd5e1; }
.kym-g:disabled { opacity: .5; cursor: default; }
.kym-g.pick { opacity: 1; background: #fff6dd; border-color: var(--o); }
.kym-g.ok { opacity: 1; background: #d1fae5; border-color: var(--ok); }
.kym-g.ng { background: #fee2e2; border-color: var(--ng); }
.kym-gr { margin: 8px 0 0; font-weight: 700; color: var(--od); line-height: 1.8; }
.kym-gr.fin { color: var(--okd); }
.kym-body.kym-wait { opacity: .35; pointer-events: none; filter: grayscale(.4); }

/* week：カレンダー */
.kym-cal { background: #fff; border: 2px solid #ece6d6; border-radius: 18px; padding: 8px 6px 6px; box-shadow: 0 3px 10px rgba(120, 80, 20, .08); }
.kym-ch { text-align: center; font-size: 1.5rem; font-weight: 600; margin-bottom: 4px; }
.kym-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.kym-wd { text-align: center; font-weight: 700; font-size: 1.05rem; padding: 2px 0; border-bottom: 2px solid #ece6d6; }
.kym-wd.w0, .kym-day.w0 { color: var(--sun); } .kym-wd.w6, .kym-day.w6 { color: var(--s); }
.kym-day { position: relative; aspect-ratio: 1 / 1; min-height: 40px; border: 1.5px solid #ece6d6; border-radius: 10px; background: #fffdf6; font-size: 1.25rem; cursor: pointer; padding: 0; transition: transform .12s; }
.kym-day.nil { border: 0; background: transparent; cursor: default; }
.kym-day.sp::after { content: ""; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--o); }
.kym-day.sel { border-color: var(--o); background: #fff1c2; transform: scale(1.08); box-shadow: 0 0 0 3px rgba(245, 158, 11, .3); z-index: 1; }
.kym-day.ok { border-color: var(--ok); background: #ecfdf5; }
.kym-key { text-align: right; font-size: .85rem; color: #6b7280; margin-top: 4px; }
.kym-key i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--o); margin-right: 4px; vertical-align: .1em; }
.kym-read { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 10px 0; padding: 8px 10px; border-radius: 14px; background: #eef4ff; }
.kym-rd { font-size: 1.6rem; font-weight: 600; border: 0; background: none; cursor: pointer; padding: 0 8px; }
.kym-rw2 { font-size: .9em; }
.kym-ry { font-size: 1.2rem; }
.kym-ry b { font-weight: 600; } .kym-ry b.sp { color: var(--od); background: linear-gradient(transparent 60%, #fde68a 60%); }
.kym-ringbox { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border-radius: 18px; border: 2px dashed transparent; }
.kym-ringbox.ask { border-color: var(--o); background: #fffaf0; }
.kym-ring { width: 220px; max-width: 70vw; height: auto; overflow: visible; }
.kym-rot { transform-origin: 120px 120px; transition: transform .45s ease; }
.kym-rbg { fill: #faf7ef; stroke: #ece6d6; stroke-width: 2; }
.kym-rw { cursor: pointer; }
.kym-rw circle { fill: #fff; stroke: #cbd5e1; stroke-width: 2.5; }
.kym-rw text { font-size: 15px; font-weight: 700; fill: #374151; pointer-events: none; }
.kym-rw.w0 text { fill: var(--sun); } .kym-rw.w6 text { fill: var(--s); }
.kym-rw.on circle { fill: #fff1c2; stroke: var(--o); stroke-width: 4; }
.kym-ptr { fill: var(--o); }
.kym-nav { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

/* sekki：わ */
.kym-swrap { position: relative; max-width: 340px; margin: 0 auto; }
.kym-sring { width: 100%; height: auto; touch-action: none; user-select: none; cursor: grab; }
.kym-tm { stroke: #fff; stroke-width: 1; }
.kym-mn { font-size: 12px; font-weight: 700; fill: #fff; pointer-events: none; paint-order: stroke; stroke: rgba(0, 0, 0, .25); stroke-width: 2px; }
.kym-sec { transition: filter .2s; }
.kym-sec.on { filter: brightness(.86) saturate(1.6); stroke: #1f2937; stroke-width: 2.5; }
.kym-sn { font-size: 15px; font-weight: 800; pointer-events: none; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.kym-dot { pointer-events: none; }
.kym-hl { stroke: #1f2937; stroke-width: 3; stroke-linecap: round; }
.kym-hk { fill: var(--o); stroke: #fff; stroke-width: 3; }
.kym-hand { transition: transform .25s ease; pointer-events: none; }
.kym-cbg { fill: #fff; stroke: #ece6d6; stroke-width: 2; }
.kym-ctr { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46%; display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; text-align: center; }
.kym-sname { font-size: 1.9rem; font-weight: 600; line-height: 1.5; }
.kym-sdate { font-size: 1rem; font-weight: 700; }
.kym-ssea { font-size: .9rem; font-weight: 800; padding: 0 10px; border-radius: 999px; }
.kym-info { margin: 8px 0; padding: 8px 12px; border-radius: 14px; background: #faf7ef; border: 2px solid #ece6d6; }
.kym-mean { margin: 0 0 6px; font-weight: 700; text-align: center; line-height: 1.7; }
.kym-therm { display: flex; align-items: center; gap: 8px; font-size: .95rem; }
.kym-tl { flex: none; font-weight: 700; color: #4b5563; }
.kym-tbar { flex: 1; height: 14px; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
.kym-tbar i { display: block; height: 100%; border-radius: 999px; transition: width .3s; }
.kym-feel { margin: 6px 0 0; font-weight: 700; line-height: 1.8; text-align: center; }
.kym-feel.zure { color: #9a3412; }
.kym-zt { display: inline-block; margin-right: 6px; padding: 0 10px; border-radius: 999px; background: #ea580c; color: #fff; font-size: .85rem; animation: kym-pulse 1.2s ease-in-out infinite alternate; }
.kym-leg { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; font-size: .85rem; color: #4b5563; }
.kym-leg i { display: inline-block; width: 26px; height: 10px; border-radius: 5px; margin-right: 6px; vertical-align: .05em; }
.kym-leg i.tc { background: linear-gradient(90deg, #2563eb, #38bdf8, #facc15, #f59e0b, #dc2626); }
.kym-leg i.sc { background: linear-gradient(90deg, #ffd3e2 25%, #cfeaff 25% 50%, #fde9cf 50% 75%, #dfe7f1 75%); }
.kym-this { min-width: 96px; }

/* ひとこと・ボタン */
.kym-msg { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; padding: 10px 14px; border-radius: 14px; font-weight: 700; line-height: 1.8; }
.kym-msg.ok { background: #ecfdf5; border: 2px solid var(--ok); color: #065f46; }
.kym-msg.ng { background: #fff1f2; border: 2px solid var(--ng); color: #9f1239; }
.kym-msg.info { background: #eef4ff; border: 2px solid #93b4f0; color: #1e3a8a; }
.kym-mi { flex: none; width: 26px; height: 26px; margin-top: 3px; }
.kym-mi svg { width: 100%; height: 100%; }
.kym-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 4px; }
.kym-acts:empty { display: none; }
.kym-go { min-height: 50px; padding: 6px 22px; border: 0; border-radius: 14px; background: var(--teal-d, #0f8a72); color: #fff !important; font-weight: 700; font-size: 1.1rem; cursor: pointer; box-shadow: 0 3px 0 #0a6553; }
.kym-go:disabled { opacity: .45; }
.kym-b { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 50px; padding: 4px 14px; border: 2px solid var(--ink, #1f2937); background: #fff; border-radius: 14px; font-weight: 700; font-size: 1.05rem; cursor: pointer; }
.kym-b:disabled { opacity: .35; cursor: default; }
.kym-shk { animation: kym-shake .3s 1; }
@media (max-width: 480px) {
  .kym-day { font-size: 1.1rem; min-height: 38px; }
  .kym-sname { font-size: 1.6rem; }
  .kym-ctr { width: 52%; }
}
@keyframes kym-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes kym-pulse { from { box-shadow: 0 0 0 0 rgba(234, 88, 12, .3); } to { box-shadow: 0 0 0 5px rgba(234, 88, 12, .15); } }
@media (prefers-reduced-motion: reduce) { .kym *, .kym-msg { animation: none !important; transition: none !important; } }
