Drum Head Harmonics Transitions (Fermi's Golden Rule)
by Chantal Roth
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Fermi’s Golden Rule — Drum‑Head Toy (Two‑State Drive)</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
html, body { margin:0; height:100%; background:#0b0f14; color:#e8eef7; }
#container { width:100%; height:100%; }
/* Info button + panel */
#infoBtn {
position:absolute; top:12px; right:12px; z-index:10;
width:40px; height:40px; border-radius:20px; line-height:40px; text-align:center;
border:1px solid #3a506b; background:rgba(20,25,35,0.85); color:#a8dadc;
cursor:pointer; user-select:none; transition:transform .12s ease;
}
#infoBtn:hover { transform:scale(1.05); }
#infoPanel {
position:absolute; top:60px; right:12px; z-index:10; max-width:460px;
background:rgba(10,14,20,0.96); border:1px solid #3a506b; border-radius:8px;
padding:14px 16px; display:none; box-shadow:0 12px 36px rgba(0,0,0,0.45);
}
#infoPanel h3 { margin:.2em 0 .6em; font-weight:600; color:#f0f4ff; }
#infoPanel p, #infoPanel li { color:#cfe0f5; line-height:1.35; }
#infoPanel .fine { color:#a9bedc; font-size:.96em; }
#infoPanel code { color:#f1fa8c; }
.dg { z-index: 9 !important; } /* dat.GUI above canvas but below info */
/* HUD: status + population meter */
#status {
position:absolute; left:12px; bottom:12px; z-index:10;
background:rgba(10,14,20,0.72); border:1px solid #3a506b; border-radius:6px;
padding:8px 10px; color:#cfe0f5; font:13px system-ui,Segoe UI,Roboto,sans-serif;
}
#meter {
margin-top:6px; width:320px;
}
.row {
display:flex; align-items:center; gap:8px; margin:4px 0;
font-size:12px; color:#d9e7ff;
}
.label { width:18px; text-align:right; opacity:.9; }
.barOuter {
flex:1; height:10px; background:#1a2330; border:1px solid #36475e; border-radius:6px; overflow:hidden;
}
.barInnerI { height:100%; width:0; background:#ffd166; }
...