.idle-dialog-backdrop{z-index:50;background:#1c241f80;justify-content:center;align-items:center;padding:16px;display:flex;position:fixed;inset:0}.idle-dialog{border-radius:var(--card-radius);background:#fff;flex-direction:column;width:min(100%,460px);max-height:min(86dvh,720px);display:flex;overflow:hidden;box-shadow:0 18px 50px #1c241f40}.idle-dialog-head{justify-content:space-between;align-items:center;gap:12px;padding:16px 18px 8px;display:flex}.idle-dialog-head h2{margin:0;font-size:19px;line-height:1.4}.idle-dialog-x{background:var(--wash);border-radius:50%;flex:none;width:40px;height:40px;font-size:24px;line-height:1}.idle-dialog-body{overscroll-behavior:contain;padding:4px 18px 12px;overflow:auto}.idle-dialog-body>p{white-space:pre-line;margin:8px 0;line-height:1.65}.idle-dialog-actions{border-top:1px solid var(--border);flex-wrap:wrap;justify-content:flex-end;gap:8px;padding:12px 18px 16px;display:flex}.idle-dialog-actions button,.idle-settings button{border:1px solid var(--border);border-radius:var(--control-radius);min-height:44px;padding:10px 16px;font-weight:650}.idle-primary{color:#fff;background:var(--accent)!important;border-color:var(--accent)!important}.idle-danger{color:#fff;background:#b23b2e!important;border-color:#b23b2e!important}.idle-settings{gap:18px;display:grid}.idle-settings-group{gap:8px;display:grid}.idle-settings-group+.idle-settings-group{border-top:1px solid var(--border);padding-top:16px}.idle-settings h3{margin:0;font-size:15px}.idle-hint{color:var(--muted);margin:0;font-size:14px;line-height:1.6}.idle-hint:empty{display:none}.idle-row{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.idle-code{word-break:break-all;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px!important;line-height:1.4!important}.idle-sound{flex:none;display:inline-flex;position:relative}.idle-sound-toggle{border:2px solid var(--accent);background:var(--accent);color:#fff;cursor:pointer;border-radius:50%;justify-content:center;align-items:center;width:44px;height:44px;padding:0;line-height:1;display:inline-flex;box-shadow:0 2px 8px #1c241f40}.idle-sound-toggle:hover{filter:brightness(1.08)}.idle-sound-toggle:focus-visible{outline-offset:2px;outline:3px solid #f2b84b}.idle-sound-toggle.is-muted{color:#b23b2e;background:#fff;border-color:#b23b2e}.idle-sound-pop{z-index:40;border:1px solid var(--border);border-radius:var(--control-radius);background:#fff;width:min(280px,100vw - 16px);padding:12px;position:absolute;top:calc(100% + 8px);right:0;box-shadow:0 12px 32px #1c241f33}.idle-sound-pop button{border:1px solid var(--border);border-radius:var(--control-radius);background:#fff;min-height:40px;padding:8px 12px;font-weight:650}.idle-sound-mute{white-space:nowrap;align-items:center;gap:6px;display:inline-flex}.idle-sound-mute.is-muted{color:#b23b2e;border-color:#b23b2e!important}.idle-sound-controls{gap:10px;display:grid}.idle-sound-controls input[type=range]{width:100%;accent-color:var(--accent);margin:0}.idle-sound-head{justify-content:space-between;align-items:center;gap:8px;display:flex}.idle-settings .idle-sound-controls{max-width:360px}.idle-sound-value{text-align:right;font-variant-numeric:tabular-nums;min-width:3.2em;font-weight:650}.idle-notice{min-height:0;color:var(--muted);margin:8px 0 0;font-size:14px;line-height:1.6}.idle-notice:empty{display:none}.idle-notice-warn{border-radius:var(--control-radius);color:#6b4a12;background:#fff7e6;border:1px solid #e6c48a;padding:10px 12px}.idle-canvas{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;display:block}.idle-ending .idle-dialog-body{position:relative}.idle-ending-sparkles{pointer-events:none;position:absolute;inset:0;overflow:hidden}.idle-ending-sparkles i{opacity:0;background:#f2c14e;border-radius:2px;width:8px;height:8px;animation:2.8s ease-in infinite idle-sparkle;position:absolute;top:100%}.idle-ending-sparkles i:nth-child(3n){background:#7fc8a9}.idle-ending-sparkles i:nth-child(3n+1){background:#f39ab6;border-radius:50%}.idle-ending-sparkles i:first-child{animation-delay:0s;left:6%}.idle-ending-sparkles i:nth-child(2){animation-delay:1.1s;left:14%}.idle-ending-sparkles i:nth-child(3){animation-delay:.5s;left:23%}.idle-ending-sparkles i:nth-child(4){animation-delay:1.9s;left:31%}.idle-ending-sparkles i:nth-child(5){animation-delay:.2s;left:40%}.idle-ending-sparkles i:nth-child(6){animation-delay:1.5s;left:48%}.idle-ending-sparkles i:nth-child(7){animation-delay:.8s;left:57%}.idle-ending-sparkles i:nth-child(8){animation-delay:2.2s;left:65%}.idle-ending-sparkles i:nth-child(9){animation-delay:.4s;left:73%}.idle-ending-sparkles i:nth-child(10){animation-delay:1.3s;left:81%}.idle-ending-sparkles i:nth-child(11){animation-delay:2.5s;left:88%}.idle-ending-sparkles i:nth-child(12){animation-delay:.9s;left:95%}@keyframes idle-sparkle{0%{opacity:0;transform:translateY(0)rotate(0)}15%{opacity:1}to{opacity:0;transform:translateY(-260px)rotate(300deg)}}.idle-ending.is-calm .idle-ending-sparkles{display:none}@media (prefers-reduced-motion:reduce){.idle-ending-sparkles{display:none}}.idle-ending-badge{border-radius:var(--card-radius);background:linear-gradient(135deg,#fffaf0,#fff3d6);border:1px solid #ecd9a0;align-items:center;gap:14px;margin:12px 0;padding:14px;display:flex;position:relative}.idle-ending-badge div{flex-direction:column;gap:2px;display:flex}.idle-ending-badge strong{font-size:17px}.idle-ending-badge span{color:var(--muted,#5f6b64);font-size:14px}.idle-medal{color:#fff;text-shadow:0 1px 2px #8a5a0a;background:radial-gradient(circle at 35% 30%,#fff6c9,#f2c14e 55%,#c98a17);border-radius:50%;flex:none;place-items:center;width:56px;height:56px;font-size:26px;display:inline-grid;box-shadow:0 0 0 4px #fbe6a6,0 4px 12px #c98a1755}.idle-medal-small{width:28px;height:28px;font-size:14px;box-shadow:0 0 0 2px #fbe6a6}.idle-badges h3{margin:12px 0 6px;font-size:15px}.idle-badges ul{gap:6px;margin:0;padding:0;list-style:none;display:grid}.idle-badges li{align-items:center;gap:10px;font-size:14px;line-height:1.5;display:flex}.idle-ending .idle-dialog-body>:not(.idle-ending-sparkles){z-index:1;position:relative}.idle-ending-badge span,.idle-badges li span{word-break:keep-all}.idle-ending-hall{justify-content:center;margin:10px 0 4px;display:flex}
