html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #193e3d; }
* { box-sizing: border-box; }
.mirror-game { height: 100%; min-height: 0; width: min(100%, 1020px); justify-self: center; display: grid; grid-template-rows: 82px minmax(0,1fr) 70px; gap: 6px; color: #fff7df; font-family: Fredoka, sans-serif; }
.mirror-guide { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 0; }
.mirror-guide img { width: 82px; height: 82px; object-fit: contain; }
.mirror-guide p { font-size: clamp(18px, 2.6vmin, 25px); line-height: 1.15; margin: 0; padding: 10px 18px; border-radius: 24px; background: #193e3ded; max-width: 470px; text-align: center; }
.mirror-water { position: relative; min-height: 0; background: radial-gradient(ellipse, #123f42eb 35%, #123f42b8 75%, #123f4270); border-radius: 45% 45% 40% 40% / 12% 12% 15% 15%; }
.mirror-side-label { position: absolute; top: 7px; font-size: 16px; line-height: 20px; color: #e2f4e9; transform: translateX(-50%); }
.mirror-left-label { left: 25%; } .mirror-right-label { left: 75%; }
#mirror-path { width: 100%; height: 100%; display: block; overflow: visible; }
.mirror-axis { stroke: #dbeddf; stroke-width: 2; stroke-dasharray: 8 10; opacity: .65; }
.mirror-dot { fill: #a5c9c7; opacity: .32; }
.mirror-reference, .mirror-candidate, .mirror-hint { fill: none; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.mirror-reference { stroke: #ffdc83; }
.mirror-candidate { stroke: #b5f0db; }
.mirror-hint { stroke: #fff0b6; stroke-width: 5; stroke-dasharray: 6 10; opacity: .8; }
.mirror-end { fill: #ffdc83; stroke: #103a3d; stroke-width: 3; }
.mirror-cursor { fill: #c9f7e6; stroke: #103a3d; stroke-width: 3; }
.mirror-start { fill: #fff3cb; stroke: #103a3d; stroke-width: 3; }
.mirror-node { fill: #173f42; stroke: #fff6d6; stroke-width: 2.5; }
.mirror-controls { display: flex; justify-content: center; gap: 14px; align-items: center; }
.mirror-controls button { min-width: 76px; min-height: 60px; padding: 8px 20px; background: #ffe9b1; color: #234342; border: 0; border-radius: 18px; font: 600 18px Fredoka, sans-serif; cursor: pointer; box-shadow: 0 4px 8px #102e3040; touch-action: manipulation; }
.mirror-controls button svg { width: 32px; height: 32px; display: block; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; fill: none; margin: auto; }
.mirror-controls .undo { background: #e4d4b3; min-width: 76px; }
.mirror-controls button:active { transform: translateY(2px); }
.mirror-controls button:disabled { opacity: .45; cursor: default; }
.mirror-controls button:focus-visible { outline: 4px solid #fff6da; outline-offset: 4px; }
.mirror-demo-hand { position: fixed; pointer-events: none; width: 64px; height: 78px; object-fit: contain; z-index: 60; transform: translate(-20%, -8%); }
.mirror-demo-hand[hidden] { display: none; }
.mirror-step { fill: #cfe8df; font-size: 18px; font-family: Fredoka,sans-serif; text-anchor: middle; }
@media (orientation: portrait) { .mirror-game { grid-template-rows: 92px minmax(0,1fr) 74px; gap: 5px; } .mirror-guide { gap: 4px; } .mirror-guide img { width: 66px; height: 82px; } .mirror-guide p { padding: 10px 12px; font-size: 18px; } .mirror-controls { gap: 12px; } .mirror-controls button { min-width: 76px; } }
@media (orientation: landscape) and (max-height: 600px) { .mirror-game { grid-template-rows: 36px minmax(0,1fr) 56px; gap: 2px; } .mirror-guide img { height: 42px; width: 52px; } .mirror-guide p { font-size: 17px; padding: 4px 14px; } .mirror-controls button { min-height: 50px; height: 50px; padding: 5px 20px; } .mirror-controls button svg { width: 30px; height: 30px; } }
@media (prefers-reduced-motion: reduce) { .mirror-controls button:active { transform: none; } }
