/* Shared base: reset, type, buttons, focus, access gate. */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--forest);font:400 17px/1.5 var(--font)}
h1,h2,p{margin:0}
a{color:inherit}
[hidden]{display:none}
.btn[hidden]{display:none}
img{max-width:100%;height:auto}
:focus-visible{outline:4px solid var(--berry);outline-offset:3px}
/* finish and settings dialogs: a slimmer ring (the first button is focused when the dialog opens), and buttons in a footer share the width evenly */
dialog :focus-visible{outline:3px solid var(--forest,#27402f);outline-offset:2px}
dialog footer>.btn,dialog footer>button{flex:1 1 0;min-width:120px;justify-content:center;text-align:center}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:var(--tap);padding:10px 22px;
  border:0;border-radius:var(--r-sm);background:var(--forest);color:var(--card);font:700 17px/1.2 var(--font);
  text-decoration:none;cursor:pointer;touch-action:manipulation;box-shadow:var(--shadow)}
.btn:hover{background:var(--forest-2)}
.btn.quiet{background:var(--card);color:var(--forest);border:1px solid var(--line);box-shadow:none}
.btn.quiet:hover{background:var(--sand)}
/* access gate (ids are read by pilot-access.js) */
.gate:not([hidden]){min-height:100vh;display:grid;grid-template-columns:minmax(0,1fr);place-items:center;padding:24px;box-sizing:border-box}
.gate form{box-sizing:border-box;min-width:0;grid-template-columns:minmax(0,1fr)}
.gate input{min-width:0}
.gate form{width:min(420px,100%);display:grid;gap:12px;padding:28px;background:var(--card);
  border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--shadow)}
.gate h1{font-size:30px}
.gate label{font-weight:700}
.gate input{min-height:var(--tap);padding:8px 14px;border:2px solid var(--line);border-radius:var(--r-sm);
  font:600 20px var(--font);letter-spacing:.06em;text-transform:uppercase;background:#fff;color:var(--forest)}
.gate small,.gate .note{color:var(--muted);font-size:14px;line-height:1.4}
.gate .error{min-height:1.4em;color:var(--berry);font-weight:600}
dialog footer{margin-top:14px}

/* v304: the round Home button, the same as Fruit Beat's (Note Quest, RhyCreate, Rhy Echo) */
.homeIcon{width:48px;height:48px;border-radius:50%;border:2px solid #d9ceb0;background:#fffdf6;display:grid;place-items:center;box-shadow:0 3px 10px rgba(36,58,50,.12);padding:0;flex:0 0 auto;text-decoration:none}
.homeIcon svg{width:24px;height:24px;stroke:#243A32;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.homeIcon:focus-visible{outline:3px solid #D9A23C;outline-offset:3px}
