#dialog[data-kind="help"] { width: min(94vw,670px,calc(100% - var(--phone-left,0px) - var(--phone-right,0px))); }

.control-guide-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; padding-right: 51px; }
.control-guide-head h2 { margin: 0; }
.control-guide-switch { display: inline-flex; gap: 3px; padding: 2px; border: 1px solid #9e86ab; border-radius: 9px; background: #eee2f2; }
.control-guide-switch button { min-width: 48px; min-height: 44px; padding: 4px 7px; border: 1px solid transparent; border-radius: 7px; color: #553f69; font-size: 13px; font-weight: 850; }
.control-guide-switch button[aria-pressed="true"] { border-color: #ac91ba; background: #fff8e9; color: #3e2e56; }
.control-guide-body { display: grid; grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); align-items: stretch; gap: 11px; }

.guide-device {
  min-width: 0;
  min-height: 142px;
  position: relative;
  overflow: hidden;
  border: 1px solid #7e6b96;
  border-radius: 11px;
  color: #fef1d1;
  background:
    linear-gradient(130deg,#4d3c657c,#282743dc),
    repeating-linear-gradient(0deg,transparent 0 15px,#cfd4f82d 15px 16px),
    repeating-linear-gradient(90deg,#715a89 0 15px,#b9a4dc 15px 16px);
}
.guide-joystick { position: absolute; bottom: 17px; left: 12px; display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid #f6ded58a; border-radius: 50%; background: #29223dc7; }
.guide-joystick::before { content: ""; position: absolute; inset: 7px; border: 1px dashed #e9d9f6a1; border-radius: 50%; }
.guide-joystick i { display: block; width: 23px; height: 23px; transform: translate(6px,-5px); border: 1px solid #6a5381; border-radius: 50%; background: #fff2cb; box-shadow: 0 2px 0 #76528b; }
.guide-swipe { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; color: #fcf0e0; font-size: 11px; font-weight: 850; white-space: nowrap; }
.guide-swipe [data-icon]:first-child { transform: rotate(180deg); }
.guide-swipe .glyph { width: 14px; height: 14px; }
.guide-touch-buttons { position: absolute; bottom: 16px; right: 11px; display: flex; align-items: flex-end; gap: 4px; }
.guide-touch-buttons > span { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid #604b7a; border-radius: 50%; color: #453359; background: #d8f0e7; box-shadow: 0 2px 0 #765d8d; }
.guide-touch-buttons > span[data-control="dash"] { background: #e9d6fa; }
.guide-touch-buttons > span[data-control="jump"] { width: 35px; height: 35px; background: #ffe195; }
.guide-touch-buttons .glyph { width: 14px; height: 14px; }
.guide-touch-buttons [data-control="jump"] .glyph { width: 19px; height: 19px; }
.guide-keyboard { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.96fr); align-content: center; align-items: center; gap: 8px; padding: 12px 9px; }
.guide-wasd { display: grid; justify-items: center; gap: 4px; }
.guide-wasd div, .guide-key-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; }
.guide-device kbd { display: grid; place-content: center; height: 27px; min-width: 24px; padding-inline: 3px; border: 1px solid #dbc9ec; border-radius: 5px; background: #fff3d9; color: #45324d; font: 850 11px system-ui,sans-serif; box-shadow: 0 2px 0 #6b557f; }
.guide-key-actions span { width: 100%; margin-top: 3px; text-align: center; color: #f6eafa; font-size: 10px; font-weight: 800; }

.control-guide-tips { display: grid; gap: 5px; min-width: 0; margin: 0; }
.control-guide-tips > div { padding: 5px 8px; border: 1px solid #977eaa68; border-radius: 7px; background: #f5edf7; }
.control-guide-tips dt { margin-bottom: 2px; color: #453459; font-size: 12px; font-weight: 950; }
.control-guide-tips dd { margin: 0; color: #594865; font-size: 11px; font-weight: 700; line-height: 1.43; }

.practice-receipt { padding: 7px 8px; border: 1px solid #a18ab58c; border-radius: 8px; background: #f4edf7; color: #493855; }
.practice-receipt strong { font-size: 12px; }
.practice-receipt ul { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 3px 0 0; padding: 0; list-style: none; }
.practice-receipt li { display: flex; align-items: center; gap: 4px; color: #5d5367; font-size: 11px; font-weight: 800; }
.practice-receipt li[data-complete] { color: #2c6654; }
.practice-receipt li span:last-child { font-size: 10px; font-weight: 650; }
.practice-receipt .glyph { width: 13px; height: 13px; }
.pause-camera { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #9e88ae6f; }
.pause-camera button { min-height: 44px; }
.pause-camera span { color: #3b6154; font-size: 12px; font-weight: 800; }

@media (orientation: portrait) and (max-width: 490px) {
  .control-guide-body { grid-template-columns: minmax(0,1fr); gap: 7px; }
  .control-guide-head { flex-wrap: wrap; }
  .guide-device { min-height: 121px; }
}
