.tim-world { position: fixed; inset: 0; z-index: 9900; pointer-events: none; overflow: hidden; contain: strict; }
.tim-buddy { position: absolute; width: 50px; height: 76px; padding: 0; margin: 0; border: 0; background: none; color: inherit; border-radius: 14px; pointer-events: auto; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; outline-offset: 5px; }
.tim-buddy:focus-visible { outline: 2px dashed #b92635; }
.tim-buddy[data-state="held"] { cursor: grabbing; }
[data-tim-puzzle] .tim-buddy { cursor: default; touch-action: pan-y; }
.tim-art { position: absolute; left: 25px; top: 76px; pointer-events: none; }
.tim-art svg { position: absolute; width: 120px; height: 120px; left: -49.5px; top: -96px; overflow: visible; pointer-events: none; filter: drop-shadow(0 1px 0 #ffffff80); }
.tim-bubble { position: absolute; left: 37px; bottom: 80px; padding: 2px 7px; min-width: 12px; background: #fffdf4; color: #413b34; border: 1.5px solid #413b34; border-radius: 9px 9px 9px 0; font: bold 17px/1.2 Georgia, serif; text-align: center; white-space: nowrap; pointer-events: none; box-shadow: 1px 2px 0 #00000012; }
.tim-bubble:empty { display: none; }
.tim-buddy[data-facing="left"] .tim-bubble { border-radius: 9px 9px 0 9px; }
.tim-buddy[data-occasion-speaking="true"] .tim-bubble { max-width: 190px; min-width: 80px; white-space: normal; font-size: 14px; line-height: 1.2; }
.tim-shadow { position: absolute; left: 9px; bottom: -3px; width: 32px; height: 5px; border-radius: 50%; background: #302a2926; pointer-events: none; }
.tim-crab { position: absolute; width: 40px; height: 34px; pointer-events: none; transform-origin: 50% 100%; }
.tim-crab svg { width: 100%; height: 100%; overflow: visible; }
.tim-debris { position: absolute; pointer-events: none; transform-origin: center; }
.tim-debris svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tim-magic-smoke { --smoke-shadow:#a5a6a5;--smoke-body:#d6d5ce;--smoke-light:#f5f2e8; position: absolute; left: 0; top: 0; width: 160px; height: 150px; pointer-events: none; }
.tim-magic-smoke svg { display: block; width: 100%; height: 100%; overflow: visible; }
html[data-theme="dark"] .tim-magic-smoke {--smoke-shadow:#999ca6;--smoke-body:#cdced2;--smoke-light:#f1edef;}
.tim-spring { position: absolute; width: 32px; height: 46px; pointer-events: none; transform-origin: 50% 100%; }
.tim-spring svg { width: 100%; height: 100%; overflow: visible; }
.tim-toggle { position: fixed; left: 12px; bottom: 12px; z-index: 9901; padding: 6px 10px; border: 1px solid var(--theme-edge, #776c60); border-radius: 13px 4px 12px 5px; background: var(--theme-surface, #fffdf5); color: var(--theme-ink, #51483c); font: 12px/1.2 system-ui, sans-serif; cursor: pointer; box-shadow: 1px 2px 0 #00000012; }
.tim-toggle:hover { border-color: #bd2738; }
.tim-toggle:focus-visible { outline: 2px solid #bd2738; outline-offset: 3px; }
.tim-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tim-world[hidden], .tim-toggle[hidden] { display: none; }
.tim-ink-layer { position: absolute; left: 0; top: 0; width: 100%; height: 0; pointer-events: none; z-index: 1; }
.tim-card-ink-layer {z-index:21;}
.tim-ink { position: absolute; overflow: visible; pointer-events: none; color: var(--theme-ink, #696352); opacity: .65; }
.tim-ink path { fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.tim-paper-layer {position:absolute;left:0;top:0;width:100%;height:0;pointer-events:none;z-index:1;}
.tim-paper-objects {position:absolute;left:0;top:0;width:100%;height:0;pointer-events:none;z-index:20;}
.tim-paper-trace {position:absolute;pointer-events:none;overflow:visible;opacity:.7;}
.tim-paper-trace[data-kind="plane"] {opacity:1;}
.tim-paper-trace[data-kind="bolt"] {opacity:1;}
.tim-weapon-shot,.tim-weapon-blast {position:absolute;left:0;top:0;pointer-events:none;}
.tim-weapon-shot svg,.tim-weapon-blast svg {width:100%;height:100%;overflow:visible;}
.tim-weapon-blast {width:140px;height:112px;transform-origin:70px 62px;}
.tim-surprise { position:absolute; left:0; top:0; width:300px; height:240px; overflow:visible; pointer-events:none; }
@media print { .tim-world, .tim-toggle { display: none !important; } }
