/* Robot Kurir: lapangan di kanvas, papan program, palet perintah */
.rk-wrap { flex: 1; min-height: 0; display: flex; padding: clamp(4px, 1vw, 12px); background: #14532d; }
.rk-stage { position: relative; flex: 1; min-height: 0; border-radius: 16px; overflow: hidden; border: 3px solid #fff; background: #dcfce7; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(250px, 1fr); }
.rk-left { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.rk-hud { display: flex; flex-wrap: wrap; gap: 5px; padding: 5px 8px; font-weight: 800; font-size: clamp(11px, 1.45vw, 16px); }
.rk-hud span { background: rgba(15,23,42,.75); color: #fff; border-radius: 999px; padding: 1px 10px; white-space: nowrap; }
.rk-hud .k { background: #16a34a; } .rk-hud .bad { background: #dc2626; }
.rk-cvbox { position: relative; flex: 1; min-height: 0; }
.rk-cvbox canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rk-msg { margin: 0; padding: 2px 10px 6px; min-height: 2.4em; font-weight: 800; font-size: clamp(12px, 1.6vw, 18px); color: #14532d; line-height: 1.25; }
.rk-msg.bad { color: #dc2626; } .rk-msg.ok { color: #15803d; }
.rk-panel { overflow-y: auto; display: flex; flex-direction: column; gap: clamp(4px, 1vh, 8px); padding: clamp(6px, 1.2vh, 10px); background: rgba(255,255,255,.9); border-left: 3px solid #fff; min-height: 0; }
.rk-prog { flex: 1 0 70px; min-height: 70px; overflow-y: auto; background: #f0fdf4; border: 3px solid #86efac; border-radius: 12px; padding: 4px 6px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; }
.rk-chip { display: inline-flex; align-items: center; gap: 3px; min-height: 30px; padding: 0 9px; border: 2px solid #16a34a; border-radius: 999px; background: #fff; font: inherit; font-weight: 900; font-size: clamp(13px, 1.7vw, 18px); color: #14532d; cursor: pointer; }
.rk-chip.blk { background: #fef9c3; border-color: #ca8a04; color: #713f12; }
.rk-chip.cur { outline: 3px solid #7c3aed; }
.rk-chip.run { background: #bbf7d0; box-shadow: 0 0 0 3px #22c55e; }
.rk-chip.err { background: #fecaca; border-color: #dc2626; }
.rk-ind { display: block; flex: 0 0 100%; height: 0; }
.rk-caret { display: inline-block; width: 4px; align-self: stretch; min-height: 26px; background: #7c3aed; border-radius: 2px; }
.rk-empty { color: #64748b; font-weight: 700; font-size: clamp(11px, 1.4vw, 15px); padding: 4px; }
.rk-pal { display: flex; flex-wrap: wrap; gap: 5px; }
.rk-pal button { flex: 1 0 auto; min-width: 44px; min-height: clamp(38px, 6.4vh, 50px); border: 0; border-radius: 12px; background: #16a34a; color: #fff; font: inherit; font-weight: 900; font-size: clamp(17px, 2.4vw, 26px); cursor: pointer; box-shadow: 0 3px 0 rgba(15,23,42,.3); }
.rk-pal button.blk { background: #ca8a04; font-size: clamp(11px, 1.4vw, 15px); padding: 0 8px; flex: 0 1 auto; min-height: clamp(30px, 5vh, 40px); }
.rk-pal button:active { transform: translateY(2px); }
.rk-pal button:disabled { opacity: .4; }
.rk-cnt { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: clamp(11px, 1.4vw, 15px); }
.rk-cnt button { width: clamp(32px, 5.4vh, 42px); height: clamp(32px, 5.4vh, 42px); border: 0; border-radius: 50%; background: #dcfce7; color: #14532d; font: inherit; font-weight: 900; font-size: 1.2rem; cursor: pointer; padding: 0; box-shadow: 0 3px 0 rgba(15,23,42,.25); }
.rk-cnt b { min-width: 2ch; text-align: center; font-size: clamp(18px, 2.8vh, 26px); }
.rk-ctl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.rk-go { grid-column: 1 / -1; min-height: clamp(38px, 6.6vh, 50px); border: 0; border-radius: 999px; background: #dc2626; color: #fff; font: inherit; font-weight: 900; font-size: clamp(15px, 2vw, 22px); cursor: pointer; box-shadow: 0 4px 0 rgba(15,23,42,.3); }
.rk-go:active { transform: translateY(2px); } .rk-go:disabled { opacity: .45; cursor: default; }
.rk-sec { min-height: clamp(28px, 4.8vh, 38px); border: 2px solid #16a34a; border-radius: 999px; background: #fff; color: #15803d; font: inherit; font-weight: 800; font-size: clamp(10px, 1.3vw, 14px); cursor: pointer; padding: 0 3px; }
.rk-sec:disabled { opacity: .4; cursor: default; } .rk-sec[hidden] { display: none; }
.rk-next { position: absolute; left: 30%; transform: translateX(-50%); bottom: 12%; min-height: 48px; padding: 0 26px; border: 0; border-radius: 999px; background: #7c3aed; color: #fff; font: inherit; font-weight: 900; font-size: clamp(16px, 2.2vw, 24px); cursor: pointer; box-shadow: 0 5px 0 rgba(15,23,42,.3); z-index: 5; }
.rk-next[hidden] { display: none; }
.rk-stars { font-size: clamp(32px, 7vh, 60px); color: #f59e0b; letter-spacing: 6px; line-height: 1; } .rk-stars .off { color: #cbd5e1; }
@media (max-height: 520px) { .rk-prog { flex-basis: 60px; } .rk-pal button.blk { min-height: 28px; } .rk-wrap { padding: 3px 6px; } .rk-stage { border-width: 2px; border-radius: 12px; } .rk-hud { padding: 3px 6px; } .rk-msg { min-height: 2.2em; padding-bottom: 2px; } .rk-panel { gap: 3px; padding: 4px 8px; } .rk-prog { min-height: 56px; } .rk-pal button { min-height: 34px; } .rk-go { min-height: 34px; } .rk-sec { min-height: 26px; } }
@media (max-width: 700px) and (orientation: portrait) { .rk-stage { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; } .rk-panel { border-left: 0; border-top: 3px solid #fff; } .rk-next { left: 50%; } }
