*{box-sizing:border-box}
:root{color-scheme:light;font:16px/1.45 "DM Sans",system-ui,sans-serif;color:#20392e;background:#eeeee7}
body{margin:0;min-height:100svh;display:grid;align-items:center;justify-items:center;padding:20px}
main{--accent:#245442;width:min(1190px,100%);aspect-ratio:16/9;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;background:#fafbf5;border:1px solid #ccd2c5;border-radius:20px;box-shadow:0 20px 70px #26352413;overflow:hidden}
header,footer{display:flex;align-items:center;gap:18px;padding:13px 30px;border-bottom:1px solid #d8dccf;font-size:14px}
header strong{letter-spacing:-.06em;font-size:19px}header span,footer a{margin-left:auto}
a{color:var(--accent);text-underline-offset:3px}
.intro{padding:21px 30px 14px}h1,h2,p{margin:0}h1,.big{font:500 clamp(32px,3.7vw,54px)/1.06 Georgia,serif;letter-spacing:-.05em}.intro p,.quiet{color:#566858;margin-top:7px}
.workspace{display:grid;grid-template-columns:minmax(0,1.48fr) minmax(0,1fr);gap:24px;min-height:0;padding:0 30px 20px}
#stage,#panel{min-width:0;min-height:0;overflow:auto;border-radius:14px}
#stage{background:#173e35;color:#f5fae9;padding:22px;display:flex;flex-direction:column;align-items:stretch;justify-content:safe center}
#stage .quiet{color:#ceddcc}#panel{padding:4px 5px;display:flex;flex-direction:column;gap:12px;justify-content:safe center}
button,textarea,input,select{font:inherit}button,select,input:not([type=range]),textarea{border:1px solid #b7c3b7;border-radius:9px;padding:10px 12px;color:inherit;background:#fff}
button{cursor:pointer;font-weight:600;min-height:42px}button:disabled{opacity:.48;cursor:default}button.primary{color:white;background:var(--accent);border-color:transparent}
button:hover:enabled{filter:brightness(.94)}:focus-visible{outline:3px solid #bd873d;outline-offset:2px}
label{display:grid;gap:5px;font-weight:600;font-size:14px}input,textarea,select{min-width:0;width:100%}textarea{resize:vertical;line-height:1.5}input[type=range]{accent-color:var(--accent)}
.row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.row>*{flex:1}.big{text-align:center;overflow-wrap:anywhere}
.caption{text-align:center;margin-top:10px;color:#d8e4d7}.stage-btn{align-self:center;background:#dfeecc;color:#173e35}
#status{font-size:13px;overflow-wrap:anywhere}footer{min-height:42px;border-top:1px solid #d8dccf;border-bottom:0;justify-content:space-between}footer a{white-space:nowrap}
[hidden]{display:none!important}.image{object-fit:contain;max-height:100%;max-width:100%;align-self:center}.center{text-align:center}
#reader{height:100%;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font:32px/1.55 Georgia,serif}
#reader.playing{padding-bottom:35%}.list{display:grid;gap:6px}.item{display:flex;align-items:center;gap:6px}.item span{flex:1;min-width:0;overflow-wrap:anywhere}.item button{padding:6px 10px}
.wheel{width:min(100%,195px);aspect-ratio:1/1;border-radius:50%;border:6px solid #e8efcf;align-self:center;transition:transform .65s ease-out}.pointer{text-align:center;color:#edf3cb}
.wheel{position:relative;flex-shrink:0}.wheel span{position:absolute;transform:translate(-50%,-50%);color:#192b22;font-size:12px;font-weight:650;max-width:40%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center;margin-top:12px}.calendar-grid button{min-height:35px;padding:4px 0;color:white;background:transparent;border-color:#517164}.calendar-grid .selected{background:#e5efc7;color:#173e35}.calendar-grid .has-note{box-shadow:inset 0 -3px #c3984a}
#stage textarea{height:100%;min-height:180px;color:#243b30;background:#fffef6;resize:none}
.beat{display:flex;gap:10px;justify-content:center;margin:24px 0}.beat i{width:20px;height:20px;border:1px solid #b7d3b6;border-radius:50%}.beat i.on{background:#e3efa2}
.library{aspect-ratio:auto}.library nav{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(215px,100%),1fr));gap:12px;padding:8px 30px 30px}.library nav a{display:grid;align-content:start;gap:8px;background:white;border:1px solid #cdd8c9;border-radius:12px;padding:17px;text-decoration:none}.library nav b{font:26px Georgia,serif}.library nav span{color:#526455}
@media(max-width:1023px){body{padding:12px}main{aspect-ratio:auto}header,footer{padding:12px 16px}.intro{padding:18px 16px}.workspace{padding:0 7px 12px;gap:12px}#stage{min-height:330px;max-height:480px}#panel{padding:6px}.calendar-grid button{min-height:38px}}
@media(max-width:700px){.workspace{grid-template-columns:100%}#stage{min-height:160px;max-height:330px;padding:15px}#stage:has(#reader){height:230px}#stage:has(.image:not([hidden])){height:245px}.library nav{padding:0 12px 16px}#panel{overflow:visible}input:not([type=range]),textarea,select{font-size:16px}header,footer,.intro{padding-left:7px;padding-right:7px}.wheel{width:140px}}
@media(prefers-reduced-motion:reduce){.wheel{transition:none}}
.icon-action { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px }
.icon-action::before { content:""; width:20px; height:20px; flex:none; background:currentColor; mask:var(--action-icon) center/contain no-repeat; -webkit-mask:var(--action-icon) center/contain no-repeat }
button.icon-only { flex:0 0 44px; width:44px; min-width:44px; min-height:44px; padding:0 }
