html.troom-on{scrollbar-gutter:auto!important}
html.troom-on,html.troom-on body{overflow:hidden;height:100%}
.troom{position:fixed;inset:0;z-index:1000;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto auto auto auto;grid-template-columns:minmax(0,1fr);height:100vh;height:100dvh;background:#faf6ee;color:#121010;font-family:"Fraunces",Georgia,serif;overflow:hidden}
.troom[hidden]{display:none}
.troom a{color:#004946}
.tr-top{display:flex;align-items:center;gap:.8rem;height:34px;padding:0 .8rem;border-bottom:1px solid #e4dac6;background:#f6f0e4;min-width:0}
.tr-brand{display:flex;align-items:center;gap:.4rem;text-decoration:none;flex:none;font-family:"VT323",monospace;font-size:1.15rem;color:#121010!important}
.tr-brand img{width:26px;height:22px}
.tr-nav{display:flex;gap:1rem;overflow-x:auto;scrollbar-width:none;min-width:0;flex:1;justify-content:flex-end;mask-image:linear-gradient(90deg,transparent 0,#000 14px,#000 calc(100% - 14px),transparent)}
.tr-nav::-webkit-scrollbar{display:none}
.tr-nav a{flex:none;font-family:"IBM Plex Mono",monospace;font-size:.72rem;letter-spacing:.02em;color:#5b524a!important;text-decoration:none;padding:.5rem 0;opacity:.85}
.tr-nav a:hover{color:#004946!important;opacity:1;text-decoration:underline}
.tr-head{display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding:.45rem .8rem .35rem;min-width:0}
.tr-hello{margin:0;font-family:"VT323",monospace;font-size:1.3rem;line-height:1.05;min-width:0}
.tr-modes{display:flex;flex:none;border:1px solid #8f8370;border-radius:999px;overflow:hidden}
.tr-modes button{border:0;background:transparent;font-family:"IBM Plex Mono",monospace;font-size:.75rem;padding:.35rem .7rem;cursor:pointer;color:#3d3630;min-height:32px}
.tr-modes button[aria-selected=true]{background:#00635f;color:#fff}
.tr-stage{position:relative;margin:0 .8rem;border:1px solid #8f8370;border-radius:14px;background:#fffaf0;overflow:hidden;min-height:0}
.tr-canvas{position:absolute;inset:0;display:block;width:100%;height:100%;touch-action:manipulation}
.tr-say{position:absolute;left:.5rem;right:.5rem;top:.5rem;display:none;font-family:"IBM Plex Mono",monospace;font-size:.78rem;line-height:1.4;background:rgba(226,245,243,.96);border:1px solid #bde8e4;border-radius:10px;padding:.4rem .6rem;max-width:560px}
.tr-say.on{display:block;animation:trin .25s ease-out}
@keyframes trin{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.tr-knock{position:absolute;left:.5rem;right:.5rem;bottom:.5rem;max-width:560px;border:1px dashed #b5651d;background:#fffaf0;border-radius:12px;padding:.55rem .7rem;font-size:.9rem;box-shadow:0 4px 16px rgba(0,0,0,.08)}
.tr-knock p{margin:0 0 .35rem;line-height:1.4}
.tr-why{font-size:.8rem;color:#3d3630}
.tr-answers{display:flex;flex-wrap:wrap;gap:.35rem}
.tr-answers button{border:1px solid #8f8370;background:#fffaf0;border-radius:999px;padding:.35rem .7rem;cursor:pointer;min-height:34px;font-family:"IBM Plex Mono",monospace;font-size:.76rem}
.tr-answers button[data-a=yes]{background:#b5651d;border-color:#b5651d;color:#fff}
.tr-studio{position:absolute;right:.5rem;bottom:.5rem;width:min(42%,250px);background:#fffaf0;border:1px dashed #b5651d;border-radius:10px;padding:.25rem}
.tr-studio span{display:block;font-family:"IBM Plex Mono",monospace;font-size:.6rem;line-height:1.2;color:#7a4a17}
.tr-studio canvas{display:block;width:100%;height:clamp(84px,17vh,160px)}
.tr-knock:not([hidden])~.tr-studio{display:none}
.tr-ledger-btn{position:absolute;right:.5rem;top:.5rem;border:1px solid #c9bda6;background:rgba(255,250,240,.9);border-radius:999px;font-family:"IBM Plex Mono",monospace;font-size:.68rem;padding:.25rem .55rem;cursor:pointer;color:#004946;opacity:0;pointer-events:none}
.troom.drawn .tr-ledger-btn{opacity:1;pointer-events:auto}
.tr-say.on~.tr-ledger-btn{top:auto;bottom:.5rem;left:.5rem;right:auto}
.tr-ledger{position:absolute;right:.5rem;top:2.3rem;width:min(80%,320px);max-height:70%;overflow:auto;background:#fffaf0;border:1px solid #c9bda6;border-radius:10px;padding:.4rem .5rem;font-family:"IBM Plex Mono",monospace;font-size:.74rem;box-shadow:0 4px 16px rgba(0,0,0,.08);z-index:2}
.tr-ledger ol{margin:0;padding-left:1.3rem;line-height:1.5;overflow-wrap:anywhere}
.tr-who{display:inline-block;min-width:3.4em;font-weight:700}.tr-who.you{color:#00635f}.tr-who.turtle{color:#b5651d}
.tr-talk{position:absolute;inset:0;overflow:auto;background:#fffaf0;padding:.7rem;z-index:3;overscroll-behavior:contain}
.tr-turn{border:1px solid #c9bda6;border-radius:12px;padding:.55rem .7rem;margin:0 0 .5rem;line-height:1.45;white-space:pre-wrap;font-size:.92rem}
.tr-turn b{display:block;font-family:"IBM Plex Mono",monospace;font-size:.72rem;margin-bottom:.15rem}
.tr-turn.turtle b{color:#00635f}.tr-turn.learner{background:#faf6ee;margin-left:10%}
.tr-consent{display:flex;gap:.5rem;align-items:flex-start;font-size:.78rem;line-height:1.4;color:#3d3630;margin:.2rem 0 .6rem}
.tr-consent input{margin-top:.2rem;flex:none;width:18px;height:18px}
.tr-meta{font-family:"IBM Plex Mono",monospace;font-size:.68rem;color:#4a5d5b;margin:.2rem 0}
.tr-spec pre{white-space:pre-wrap;word-break:break-word;font-size:.72rem;max-height:220px;overflow:auto;background:#faf6ee;border:1px solid #c9bda6;border-radius:8px;padding:.5rem}
.tr-moves{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.35rem;padding:.45rem .8rem 0}
.tr-move{display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid #004946;background:#0f1f1e;color:#e2f5f3;border-radius:10px;padding:.3rem .1rem;cursor:pointer;min-height:46px;min-width:0}
.tr-move b{font-family:"VT323",monospace;font-weight:400;font-size:1.12rem;line-height:1;letter-spacing:.02em;color:#7fd8cf}
.tr-move span{font-family:"IBM Plex Mono",monospace;font-size:.62rem;line-height:1.15;color:#cfe9e6;text-align:center}
.tr-move.on{outline:2px solid #b5651d;outline-offset:1px}
.tr-prompt{display:flex;align-items:center;gap:.5rem;margin:.4rem .8rem 0;background:#0f1f1e;border:1px solid #004946;border-radius:12px;padding:.3rem .35rem .3rem .75rem;min-width:0}
.tr-q{font-family:"VT323",monospace;font-size:1.5rem;color:#7fd8cf;line-height:1}
.tr-line{position:relative;flex:1;min-width:0}
.tr-in{width:100%;min-width:0;background:transparent;border:0;outline:0;color:#e2f5f3;caret-color:#7fd8cf;font-family:"IBM Plex Mono",monospace;font-size:16px;padding:.35rem 0}
.tr-in::placeholder{color:#6f9c97}
.troom[data-mode=talk] .tr-in{font-family:"Fraunces",Georgia,serif}
.tr-ghost{position:absolute;left:0;top:50%;transform:translateY(-50%);pointer-events:none;white-space:pre;font-family:"IBM Plex Mono",monospace;font-size:16px;max-width:100%;overflow:hidden}
.tr-mirror{visibility:hidden}
.tr-cursor{display:inline-block;width:.55em;height:1.1em;vertical-align:-.18em;background:#7fd8cf;animation:trblink 1.05s steps(1) infinite}
@keyframes trblink{50%{opacity:0}}
.tr-run{flex:none;font-family:"VT323",monospace;font-size:1.15rem;background:#7fd8cf;color:#0f1f1e;border:0;border-radius:9px;padding:.3rem .7rem;cursor:pointer;min-height:38px}
.tr-run:disabled{opacity:.45;cursor:default}
.tr-chips{display:flex;gap:.35rem;padding:.4rem .8rem;overflow-x:auto;scrollbar-width:none;min-width:0}
.tr-chips::-webkit-scrollbar{display:none}
.tr-chips[hidden]{display:none}
.tr-chip{flex:none;border:1px solid #8f8370;background:#fffaf0;color:#004946;border-radius:999px;padding:.3rem .7rem;font-family:"IBM Plex Mono",monospace;font-size:.76rem;cursor:pointer;min-height:32px;display:inline-flex;align-items:center;text-decoration:none}
.tr-chip.ghost{border-style:dashed;color:#5b524a!important}
.tr-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.1rem .45rem;min-height:28px;padding:.25rem .8rem calc(.25rem + env(safe-area-inset-bottom));border-top:1px solid #e4dac6;background:#f6f0e4;font-size:.7rem;color:#5b524a;line-height:1.3;text-align:center}
.tr-foot a{color:#3d3630!important;text-decoration:none;font-weight:600}
.tr-foot a:hover{text-decoration:underline}
.tr-dot{opacity:.5}
.troom button:focus-visible,.troom a:focus-visible{outline:2px solid #00635f;outline-offset:2px}
@media(max-width:600px){
 .tr-hello{font-size:1.08rem}
 .tr-head{padding:.35rem .6rem .25rem}
 .tr-top{padding:0 .6rem;gap:.6rem}.tr-nav{justify-content:flex-start;gap:.85rem}
 .tr-brand span{display:none}
 .tr-stage{margin:0 .6rem}.tr-moves{padding:.4rem .6rem 0;gap:.25rem}.tr-prompt{margin:.35rem .6rem 0}.tr-chips{padding:.35rem .6rem}
 .tr-move b{font-size:.98rem}
 .tr-move span{font-size:.54rem}
 .tr-hello .long{display:none}
 .tr-foot{font-size:.62rem;gap:0 .35rem}
}
@media(max-height:560px){.tr-hello{display:none}.tr-head{padding:.25rem .8rem;justify-content:flex-end}.tr-move span{display:none}.tr-move{min-height:34px}}
@media(prefers-reduced-motion:reduce){.tr-cursor,.tr-say.on{animation:none}}

.tr-hello .short{display:none}
@media(max-width:600px){.tr-hello .short{display:inline}}
