* { box-sizing: border-box; }
body { margin: 0; padding: 20px; background: #f4f4f4; font-family: system-ui, -apple-system, sans-serif; }
.stage { width: 1050px; margin: 0 auto; }
.layout { display: grid; grid-template-columns: 1fr 220px; gap: 20px; }
.machine { background: #e8e8e8; border-radius: 12px; padding: 20px; position: relative; border: 1px solid #ccc; }
.logo { text-align: center; margin-bottom: 15px; font-size: 13px; color: #666; letter-spacing: 1px; text-transform: uppercase; }
.panel { background: #fff; border-radius: 8px; padding: 15px; margin-bottom: 15px; border: 1px solid #ddd; }
.win-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.win { background: #fafafa; border: 1px solid #ccc; border-radius: 6px; padding: 10px; min-height: 70px; position: relative; }
.label { font-size: 11px; text-transform: uppercase; color: #888; display: flex; justify-content: space-between; margin-bottom: 8px; }
.value { font-family: monospace; font-size: 22px; font-weight: bold; text-align: right; color: #222; display: flex; justify-content: flex-end; gap: 2px; }
.odo-slot { display: inline-block; width: 16px; height: 22px; text-align: center; line-height: 22px; border: 1px solid #bbb; background: #fff; }
.toolbar { position: absolute; top: -12px; right: 20px; }
.reset-all { background: #fff; border: 1px solid #ccc; padding: 6px 12px; border-radius: 16px; cursor: pointer; font-weight: 600; font-size: 13px; }
.reset-all:hover { background: #f0f0f0; }
.stud { width: 16px; height: 16px; background: #c00; color: #fff; border: none; border-radius: 50%; cursor: pointer; font-size: 11px; display: grid; place-items: center; }
.handle-box { background: #e8e8e8; border-radius: 12px; min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; border: 1px solid #ccc; }
.drum { width: 180px; position: relative; }
.drum svg { width: 100%; }
.crank { transform-origin: 50% 50%; transition: transform 0.4s ease; }
.spin-block { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; }
.hotspot { cursor: pointer; }
.hotspot.left:hover { background: rgba(0,100,200,0.08); }
.hotspot.right:hover { background: rgba(200,0,0,0.08); }
.mark { position: absolute; font-weight: bold; font-size: 20px; user-select: none; }
.mark.minus { left: 12%; top: 50%; transform: translateY(-50%); color: #0056b3; }
.mark.plus { right: 12%; top: 50%; transform: translateY(-50%); color: #d00; }
.keybed { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.key { aspect-ratio: 1; background: #fff; border: 1px solid #aaa; border-radius: 50%; font-size: 18px; font-weight: 600; cursor: pointer; }
.key:hover { background: #f5f5f5; }
.key:active { background: #eee; }
.key.disabled { opacity: 0.4; cursor: not-allowed; }
.shift-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.arrow-btn { padding: 10px; background: #fff; border: 1px solid #aaa; border-radius: 6px; cursor: pointer; font-size: 16px; font-weight: 600; }
.arrow-btn:hover { background: #f0f0f0; }
.arrow-btn:active { background: #eee; }
@media (max-width: 920px) { .layout { grid-template-columns: 1fr; } }
/* === СТИЛИ ИНСТРУКЦИИ === */
#instruction {
    max-width: 1050px;
    width: 95%;
    margin: 30px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    color: #222;
}
#instruction h2 {
    text-align: center;
    margin: 0 0 15px;
    color: #333;
}
#instruction .note {
    background: #f8f9fa;
    padding: 12px;
    border-left: 3px solid #ffc107;
    margin-bottom: 20px;
    font-size: 14px;
}
#instruction h3 {
    margin: 20px 0 10px;
    color: #444;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}
#instruction ol {
    margin: 0 0 10px 20px;
    padding: 0;
}
#instruction li {
    margin-bottom: 6px;
}
#instruction p {
    margin: 5px 0;
}
#instruction em {
    color: #666;
    font-style: italic;
}
#instruction b {
    color: #d00;
    font-weight: 600;
}