.joint-drive { display: grid; grid-template-columns: 1fr 1.05fr 1.15fr; gap: 1.6rem; align-items: center; padding: 1.25rem; border-top: 1px solid #53604e; }
.joint-drive[hidden] { display: none; }
.drive-heading h4 { font-size: 1.1rem; margin-bottom: .4rem; }
.drive-heading span { color: #c4e7a4; font-size: .875rem; }
.drive-copy p { color: #bdc9b6; font-size: 1rem; line-height: 1.6; margin-top: .5rem; }
.drive-speeds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.drive-speeds div { border-left: 2px solid #718465; padding-left: .7rem; min-width: 0; }
.drive-speeds span { display: block; font-size: .875rem; color: #c7cebf; margin-bottom: .5rem; }
.drive-speeds strong { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem; font-weight: 500; }
.drive-speeds output { font-family: Anton, Impact, sans-serif; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.drive-speeds small { font-size: .8125rem; color: #b8c7ae; }
.drive-control label { display: flex; justify-content: space-between; gap: .5rem; font-size: .875rem; }
.drive-control input { display: block; width: 100%; min-height: 32px; margin-block: .4rem; accent-color: #c4e7a4; }
.drive-control .studio-actions { gap: .5rem; }
.drive-state { min-height: 1.5em; font-size: .875rem; color: #becbb5; line-height: 1.5; margin-top: .5rem; }
.pet-controls { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; max-width: 27rem; margin: 1.8rem 0; }
.pet-controls button { border: 2px solid var(--ink); border-radius: 3px; padding: .85rem 1rem; background: var(--paper-light); box-shadow: 3px 3px 0 var(--ink); font-size: 1rem; text-align: left; }
.pet-controls button:hover { background: #e7efd9; }
.pet-controls button[aria-pressed="true"] { background: var(--ink); color: var(--paper-light); box-shadow: none; transform: translate(2px, 2px); }
.roki-stage { height: auto; min-height: 0; aspect-ratio: 640 / 420; }
#pet-scene { display: block; width: 100%; height: auto; aspect-ratio: 640 / 420; touch-action: pan-y; cursor: crosshair; outline-offset: -5px; }
.pet-ground { stroke: #a5ae96; stroke-width: 1.5; stroke-dasharray: 4 7; }
.pet-link-outline, .pet-link-shell { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pet-link-outline { stroke: #202520; stroke-width: 30; }
.pet-link-shell { stroke: #e5dcc2; stroke-width: 23; }
.pet-hip { fill: var(--robot-color); stroke: #293c34; stroke-width: 4; }
#pet-leg-0, #pet-leg-1 { opacity: .88; }
#pet-body { cursor: pointer; }
.pet-stage-hint { position: absolute; bottom: .55rem; width: 100%; text-align: center; font-size: .875rem; color: #64705e; pointer-events: none; }
.roki-window .window-bar { font-size: .8125rem; }
.roki-window-bottom { min-height: 4.1rem; gap: 1rem; align-items: center; }
#roki-status { font-size: .875rem; line-height: 1.6; }
#pet-reset { flex: 0 0 auto; border: 1px solid #606d57; background: transparent; padding: .5rem .65rem; border-radius: 2px; font-size: .875rem; }
.roki-description { line-height: 1.9; }
@media (max-width: 1000px) {
  .joint-drive { grid-template-columns: 1fr 1.1fr; gap: 1rem; }
  .drive-copy { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
  .drive-copy p { max-width: 23rem; margin: 0; }
}
@media (max-width: 700px) {
  .joint-drive { grid-template-columns: 1fr; padding: 1.25rem; }
  .drive-copy { display: block; }
  .drive-copy p { margin-top: .6rem; }
  .drive-speeds { padding-block: .5rem; }
  .pet-controls { max-width: none; margin-block: 1.4rem; }
  .pet-controls button { padding: .75rem; font-size: .875rem; }
  .pet-stage-hint { font-size: .8125rem; bottom: .3rem; }
  .roki-window-bottom { flex-wrap: wrap; gap: .4rem; padding: .8rem; }
  #roki-status { flex: 1 1 12rem; }
  .roki-window .window-bar { font-size: .7rem; }
}
