/* Kapi shot-day planner. Theme variables come from site.json. */
.kp-plan { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; padding: 28px; background: var(--canvas); align-items: stretch; }
.kp-controls { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.kp-field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.kp-field > span, .kp-field legend, .kp-hint { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0; margin: 0 0 8px; }
label.kp-field > span { margin: 0; }
.kp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.kp-days button { font: 500 13px/1 var(--f-body); height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; min-width: 0; padding: 0 2px; transition: background .2s, color .2s, border-color .2s; }
.kp-days button:hover { border-color: var(--tint-3); }
.kp-days button[aria-pressed="true"] { background: var(--action); border-color: var(--action); color: #fff; }
.kp-plan input, .kp-plan select { font: 500 15px/1.2 var(--f-body); color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; height: 44px; padding: 0 12px; width: 100%; min-width: 0; box-sizing: border-box; }
.kp-plan :focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.kp-note { margin: auto 0 0; font-weight: 500; font-size: 13px; line-height: 1.45; padding: 12px 14px; border-radius: 12px; background: var(--tint); color: var(--ink); }
.kp-body { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px 16px 16px; min-width: 0; }
.kp-next-label { margin: 0; align-self: flex-start; font: 600 12px/1.2 var(--f-body); color: var(--action); }
.kp-next-name { margin: 2px 0 6px; align-self: flex-start; font: 500 20px/1.2 var(--f-display); letter-spacing: -.01em; color: var(--ink); min-height: 1.2em; }
.kp-hint { margin: 6px 0 4px; text-align: center; font-size: 10.5px; }
#kpMap { width: 100%; max-width: 262px; height: auto; touch-action: manipulation; overflow: visible; }
.kp-fig { fill: var(--tint); stroke: var(--tint-3); stroke-width: 1.4; stroke-linejoin: round; }
.kp-zones > * { fill: var(--accent); opacity: .12; }
.kp-navel { fill: var(--tint-3); }
.kp-side { font: 600 8.5px var(--f-body); letter-spacing: .06em; text-transform: uppercase; fill: var(--muted); text-anchor: middle; }
.kp-site { cursor: pointer; outline: none; }
.kp-hit { fill: transparent; }
.kp-dot { fill: var(--card); stroke: var(--tint-3); stroke-width: 2.2; transition: fill .25s, stroke .25s, r .25s; filter: drop-shadow(0 2px 3px rgb(138 47 60 / .18)); }
.kp-site text { font: 600 11px var(--f-body); text-anchor: middle; fill: #fff; pointer-events: none; }
.kp-site.is-next .kp-dot { fill: var(--tint-3); stroke: var(--card); stroke-width: 2.6; r: 12; }
.kp-site.is-first .kp-dot { fill: var(--action); r: 13.5; }
.kp-site.is-last .kp-dot { fill: var(--good); stroke: var(--card); stroke-width: 2.6; r: 12; }
.kp-site:hover .kp-dot, .kp-site:focus-visible .kp-dot { stroke: var(--ink); }
.kp-site.is-first .kp-hit { animation: kpPulse 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; fill: var(--action); opacity: 0; }
@keyframes kpPulse { 0% { opacity: .35; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.5); } }
.kp-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.kp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.kp-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lg-next { background: var(--action); } .lg-last { background: var(--good); } .lg-rest { background: var(--card); border: 2px solid var(--tint-3); box-sizing: border-box; }
.kp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.kp-list li { display: flex; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.kp-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.kp-list b { display: block; font: 500 15px/1.3 var(--f-display); }
.kp-list small { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; }
.kp-list small.kp-rem { font-size: 12px; }
.kp-num { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 12px/1 var(--f-body); background: var(--tint); color: var(--action); margin-top: 1px; }
.kp-list li:first-child .kp-num { background: var(--action); color: #fff; }
.kp-list.kp-in li { animation: kpIn .4s var(--ease, ease-out) both; animation-delay: var(--d, 0ms); }
@keyframes kpIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.demo-side .meter + .eyebrow { margin-top: 4px; }
@media (max-width: 1100px) { .kp-plan { grid-template-columns: 1fr; } .kp-body { width: 100%; } #kpMap { max-width: 250px; } .kp-note { margin-top: 2px; } }
@media (max-width: 860px) { .kp-plan { padding: 18px; gap: 18px; } .kp-legend { gap: 6px 12px; font-size: 11.5px; } }
@media (max-width: 420px) { .kp-days button { font-size: 12px; height: 38px; border-radius: 10px; } .kp-row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .kp-site.is-first .kp-hit { animation: none; } .kp-list.kp-in li { animation: none; } .kp-dot, .kp-days button { transition: none; } }

/* Kapi scene (drawn from Kapi/Design/Mascot.swift). Tap Kapi to cheer. */
.kapi-scene { display: block; width: 100%; height: auto; overflow: visible; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.k-body { animation: kBreath 3s ease-in-out infinite alternate; transform-origin: 100px 232px; }
.k-head { animation: kTilt 4.8s ease-in-out infinite alternate; transform-origin: 100px 125px; }
.k-yuzu { animation: kBob 1.5s ease-in-out infinite alternate; }
.k-arm-l { transform: rotate(12deg); }
.k-arm-r { transform: rotate(-150deg); animation: kWave 6s ease-in-out infinite; }
.k-shadow { animation: kShadow 3s ease-in-out infinite alternate; transform-origin: 320px 498px; }
.k-shut { opacity: 0; animation: kShut 3.8s steps(1) infinite; }
.k-open { animation: kOpen 3.8s steps(1) infinite; }
.k-orbit { animation: kOrbit 90s linear infinite; transform-origin: 320px 282px; }
.k-float { animation: kFloat 5s ease-in-out infinite alternate; }
.k-float.f2 { animation-duration: 6.2s; animation-delay: -2s; } .k-float.f3 { animation-duration: 5.6s; animation-delay: -3.4s; } .k-float.f4 { animation-duration: 6.8s; animation-delay: -1s; }
.kapi-scene.cheer .k-body { animation: kJump .55s var(--ease, ease-out) 2; }
.kapi-scene.cheer .k-arm-l { transform: rotate(148deg); transition: transform .2s; }
.kapi-scene.cheer .k-arm-r { animation: none; transform: rotate(-148deg); }
.kapi-scene.cheer .k-open { opacity: 0; animation: none; } .kapi-scene.cheer .k-shut { opacity: 1; animation: none; }
@keyframes kBreath { from { transform: translateY(0) scale(1.006, .994); } to { transform: translateY(-3px) scale(.994, 1.006); } }
@keyframes kTilt { from { transform: rotate(-2.4deg); } to { transform: rotate(2.4deg); } }
@keyframes kBob { from { transform: translateY(2.6px); } to { transform: translateY(-2.6px); } }
@keyframes kWave { 0%, 46%, 100% { transform: rotate(-150deg); } 6%, 18%, 30% { transform: rotate(-168deg); } 12%, 24%, 36% { transform: rotate(-134deg); } }
@keyframes kShadow { from { transform: scaleX(1); } to { transform: scaleX(.95); } }
@keyframes kShut { 0%, 3.6% { opacity: 1; } 3.7%, 100% { opacity: 0; } }
@keyframes kOpen { 0%, 3.6% { opacity: 0; } 3.7%, 100% { opacity: 1; } }
@keyframes kOrbit { to { transform: rotate(360deg); } }
@keyframes kFloat { from { transform: translateY(7px); } to { transform: translateY(-7px); } }
@keyframes kJump { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
@media (prefers-reduced-motion: reduce) { .k-body, .k-head, .k-yuzu, .k-shadow, .k-orbit, .k-float, .k-arm-r, .k-shut, .k-open { animation: none; } }

/* Reminder previews: the app's own notification titles */
.kp-reminders { display: grid; gap: 8px; margin-top: 2px; }
.kp-rem-label { margin: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kp-noti { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 10px 22px -18px rgb(138 47 60 / .5); }
.kp-noti[hidden] { display: none; }
.kp-noti img { flex: none; width: 38px; height: 38px; border-radius: 10px; }
.kp-noti b { display: block; font: 600 14px/1.3 var(--f-body); color: var(--ink); }
.kp-noti small { display: block; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.object:has(.kapi-scene) { overflow: visible; }
.object:has(.kapi-scene)::after { display: none; }

