:root{
  --bg:#000; --fg:#c8c8c8; --hi:#fff; --dim:#a8a8a8;
  --blue:#0000aa; --cyan:#55ffff; --green:#55ff55; --yellow:#ffff55; --red:#ff6b6b; --magenta:#ff77ff;
  --panel:#0a0a1e; --line:#3a3a7a; --focus:#ffff55;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
}
*{box-sizing:border-box}
html{background:var(--bg);-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--fg);font:16px/1.5 var(--mono);overflow-x:hidden}
h1,h2{color:var(--hi);font-weight:700;margin:0}
h1{font-size:1.35rem}
h2{font-size:1.05rem;margin-bottom:.5rem;color:var(--cyan)}
a{color:var(--cyan)}
code,kbd{font-family:var(--mono);color:var(--yellow)}
kbd{border:1px solid var(--line);padding:0 .25em;border-radius:3px}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.skip{position:absolute;left:.5rem;top:-4rem;background:var(--yellow);color:#000;padding:.5rem .75rem;z-index:10;font-weight:700;text-decoration:none}
.skip:focus{top:.5rem}
:focus{outline:none}
:focus-visible,.skip:focus{outline:3px solid var(--focus);outline-offset:2px}
input:focus,button:focus,.log:focus,a:focus{outline:3px solid var(--focus);outline-offset:2px}
.bar{background:var(--blue);color:var(--hi);padding:.75rem 1rem;border-bottom:3px solid var(--cyan)}
.bar .dim{color:var(--yellow)}
.tag{margin:.15rem 0 0;color:#e8e8ff;font-size:.9rem}
main{max-width:60rem;margin:0 auto;padding:1rem}
.term{border:2px solid var(--line);background:var(--bg);padding:.5rem;border-radius:4px}
.log{min-height:14rem;max-height:58vh;overflow-y:auto;overflow-x:hidden;padding:.25rem .5rem;overflow-wrap:anywhere;word-break:break-word}
.log p{margin:0;white-space:pre-wrap}
.entry{padding:.35rem 0;border-bottom:1px dashed #222}
.entry:last-child{border-bottom:0}
.echo{color:var(--yellow)}
.ok{color:var(--green)} .hi{color:var(--hi)} .err{color:var(--red)} .info{color:var(--cyan)} .warm{color:var(--magenta)} .dimt{color:var(--dim)}
.cmdline{display:flex;align-items:center;gap:.5rem;margin-top:.5rem;border-top:2px solid var(--line);padding-top:.5rem}
.prompt{color:var(--yellow);font-weight:700;white-space:nowrap}
#cmd{flex:1;min-width:0;background:#000;color:var(--hi);border:2px solid var(--line);border-radius:3px;padding:.55rem .5rem;font:inherit;font-size:16px;caret-color:var(--yellow)}
button{font:inherit;cursor:pointer;background:var(--panel);color:var(--hi);border:2px solid var(--cyan);border-radius:4px;padding:.55rem .8rem;min-height:44px}
button:hover{background:#14144a}
button[aria-pressed="true"]{background:var(--yellow);color:#000;border-color:var(--yellow)}
.run{background:var(--blue)}
.hint{margin:.4rem 0 0;color:var(--dim);font-size:.85rem}
section+section{margin-top:1.25rem}
.choice-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(10.5rem,1fr));gap:.5rem}
.choice-list button{width:100%;text-align:left}
.sound-row{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem;margin:.5rem 0}
#vol{flex:1;min-width:8rem;accent-color:var(--yellow);height:44px}
#vol-out{min-width:3.5rem;color:var(--yellow)}
.about p{max-width:46rem}
.foot{max-width:60rem;margin:1rem auto 2rem;padding:0 1rem;color:var(--dim);font-size:.85rem}
@media (max-width:480px){
  body{font-size:15px}
  main{padding:.6rem}
  .log{max-height:52vh;min-height:12rem}
  .choice-list{grid-template-columns:1fr 1fr}
  .choice-list button{padding:.5rem .55rem}
}
@media (prefers-reduced-motion:no-preference){
  #cmd:focus{box-shadow:0 0 0 1px var(--yellow)}
  .entry.new{animation:fadein .25s ease-out}
  @keyframes fadein{from{opacity:.3}to{opacity:1}}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media (forced-colors:active){button,#cmd{border:2px solid ButtonText}}

.sound-row .hint{margin:0;flex-basis:100%}
#key-sounds{width:1.4rem;height:1.4rem;margin:0;accent-color:#ffd75f}

/* Home launcher and app windows */
h3{font-size:1rem;color:var(--cyan);margin:1rem 0 .5rem}
[hidden]{display:none!important}
.view{border:2px solid var(--line);background:var(--bg);padding:.75rem;border-radius:4px}
.view-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.5rem}
.view-head h2{margin:0}
.close{border-color:var(--yellow)}
h2:focus{outline:3px solid var(--focus);outline-offset:2px}
.launcher{list-style:none;margin:.75rem 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(13rem,1fr));gap:.6rem}
.launcher button{width:100%;min-height:56px;text-align:left;font-weight:700}
.launcher .desc{font-weight:400;color:var(--dim)}
.launcher li:first-child button{border-color:var(--yellow)}
.app-log{min-height:10rem;max-height:46vh}
.view .choice-list{margin-top:.5rem}
#app-form label{color:var(--yellow);white-space:nowrap}
.facts{margin:0;display:grid;gap:.35rem}
.facts div{display:grid;grid-template-columns:minmax(8rem,12rem) 1fr;gap:.5rem;border-bottom:1px dashed #222;padding:.2rem 0}
.facts dt{color:var(--yellow)}
.facts dd{margin:0;overflow-wrap:anywhere}
.about p{max-width:46rem}
@media (max-width:480px){
  .launcher{grid-template-columns:1fr 1fr}
  .facts div{grid-template-columns:1fr}
  #app-form{flex-wrap:wrap}
  #app-form label{flex-basis:100%}
}
.launcher li.static{grid-column:1/-1}
.launch-link{display:inline-flex;align-items:center;min-height:44px;padding:.4rem .2rem;font-weight:700}
.launcher li.static .hint{display:inline;margin:0;font-size:.9rem}
.disclosure{margin-top:1rem}
#sound-toggle .tri{color:var(--yellow);display:inline-block;margin-right:.4rem;transition:transform .15s}
#sound-toggle[aria-expanded="true"] .tri{transform:rotate(90deg)}
#sound-panel{margin-top:.5rem;border-top:2px solid var(--line);padding-top:.25rem}

/* Beat style picker */
#beat-genre,#ec-format{font:inherit;background:#000;color:var(--hi);border:2px solid var(--cyan);border-radius:4px;padding:.45rem .5rem;min-height:44px;max-width:100%}
#beat-genre:focus,#ec-format:focus,#ec-input:focus{outline:3px solid var(--focus);outline-offset:2px}

/* Apps with their own window: Insomnia OS and Meme Projects (their sites' own files, framed), Easyconvert (native) */
.src-link{margin:0 0 .4rem}
.src-link a{display:inline-flex;align-items:center;min-height:44px;font-weight:700}
.app-frame{display:block;width:100%;height:100vh;height:100svh;min-height:520px;max-height:1000px;margin-top:.6rem;border:2px solid var(--line);border-radius:4px;background:#000}
#easyconvert-view .ec-field{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem .75rem;margin:.6rem 0}
#easyconvert-view .ec-field label{color:var(--yellow);min-width:9rem}
#ec-input{font:inherit;color:var(--hi);max-width:100%;min-height:44px}
#ec-input::file-selector-button{font:inherit;background:var(--panel);color:var(--hi);border:2px solid var(--cyan);border-radius:4px;padding:.5rem .8rem;min-height:44px;margin-right:.6rem;cursor:pointer}
.ec-files{list-style:none;margin:0;padding:0;display:grid;gap:.6rem}
.ec-files li{border:1px solid var(--line);border-radius:4px;padding:.5rem}
.ec-actions{display:flex;flex-wrap:wrap;gap:.5rem}
.ec-actions .ec-name{flex:1 1 12rem;text-align:left;overflow-wrap:anywhere;min-width:0}
.ec-files pre{margin:.5rem 0 0;padding:.5rem;background:#050514;border:1px solid var(--line);white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;max-height:16rem;overflow-y:auto;overflow-x:hidden;font:inherit;font-size:.9rem;color:var(--fg)}
.ec-files pre:focus{outline:3px solid var(--focus);outline-offset:2px}
.ec-status{min-height:1.5em;color:var(--green);margin:.6rem 0 0}
.ec-list > p{margin:0;color:var(--dim)}
@media (max-width:480px){ #easyconvert-view .ec-field label{flex-basis:100%} }
