* { box-sizing: border-box; }
:root { font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #20362d; background: #f4f5f1; }
body { margin: 0; }
main { max-width: 600px; margin: auto; padding: max(28px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom)); }
header { display: flex; align-items: center; gap: 14px; margin: 12px 0 28px; }
.mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: #254e3e; color: white; font-size: 23px; }
h1 { font-size: 25px; letter-spacing: -.6px; margin: 0 0 5px; }
header p { font-size: 13px; color: #69766c; margin: 0; }
.card { background: #fff; border: 1px solid #e4e8df; border-radius: 22px; padding: 22px; margin: 0 0 16px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.muted { color: #647366; font-size: 14px; line-height: 1.6; }
.hint { color: #687568; font-size: 12px; line-height: 1.7; margin-bottom: 0; }
.status-line { display: flex; align-items: center; gap: 9px; font-size: 19px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #a5afa3; flex-shrink: 0; }
.dot.running { background: #37845a; box-shadow: 0 0 0 5px #e5f2e8; }
button, input, textarea { font: inherit; font-size: 16px; }
button { cursor: pointer; min-height: 48px; border: 0; border-radius: 13px; padding: 12px 18px; background: #254e3e; color: #fff; font-weight: 600; }
button:disabled { cursor: default; opacity: .5; }
.secondary { background: #edf1e9; color: #254e3e; }
.actions { display: flex; gap: 10px; margin-top: 22px; }
.actions button:first-child { flex: 1; }
form { display: grid; gap: 10px; }
label { font-size: 13px; margin-top: 6px; color: #526354; }
input, textarea { width: 100%; border: 1px solid #cfd8cc; background: #fbfcfa; border-radius: 11px; padding: 12px; color: #20362d; }
input:focus, textarea:focus { outline: 2px solid #7aa78c; outline-offset: 2px; }
form button { margin-top: 10px; }
.presets { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.preset { flex: 1; min-width: 115px; padding: 14px; background: #f4f6f0; border-radius: 15px; text-align: center; }
canvas { width: 100px; height: 100px; display: block; margin: auto auto 10px; }
.preset code { font-size: 14px; letter-spacing: 2px; }
details { border-top: 1px solid #e7ebe4; padding-top: 16px; }
summary { cursor: pointer; font-size: 14px; min-height: 30px; }
details form { margin-top: 8px; }
#notice { background: #fff0dc; border: 1px solid #edd6b4; padding: 14px 17px; font-size: 14px; line-height: 1.6; border-radius: 14px; overflow-wrap: anywhere; }
#events { list-style: none; padding: 0; margin: 0; max-height: 300px; overflow: auto; }
#events li { font-size: 13px; line-height: 1.65; padding: 10px 0; border-bottom: 1px solid #edf0e9; overflow-wrap: anywhere; }
#events li:last-child { border-bottom: 0; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #71806f; font-size: 12px; }
footer button { padding: 0; background: transparent; color: #516b56; font-size: 12px; }
[hidden] { display: none !important; }
@media (max-width: 360px) { main { padding-left: 12px; padding-right: 12px; } .card { padding: 18px; } }
