.proto-grid { background-size: var(--grid-size-x, 64px) var(--grid-size-y, 64px); }
.proto-token .initials { font-size:clamp(.5rem,calc(var(--token-size,24px)*.42),3rem); line-height:1; }
.proto-token .number { font-size:clamp(.5rem,calc(var(--token-size,24px)*.42),3rem); line-height:1; border-width:max(1px,calc(var(--token-size,24px)*.04)); }
.proto-fog { position:absolute; z-index:8; pointer-events:none; overflow:hidden; }
.proto-fog-fill { fill:#030303; opacity:.72; }
.projector-body .proto-fog-revealed-outline { display:none; }
.proto-shell .proto-fog-fill { opacity:.16; }
.projector-body .proto-fog-fill { opacity:1; }
.proto-stage-wrap { cursor:grab; }
.proto-stage-wrap.map-dragging { cursor:grabbing; }
.projector-notes-toggle { position:fixed; right:.8rem; top:.8rem; z-index:60; border:1px solid #8be9ff; background:rgba(8,18,24,.92); color:#fff; cursor:pointer; opacity:.9; }
.projector-body .projector-notes-toggle { display:block; z-index:1001; pointer-events:auto; touch-action:manipulation; }
.projector-badge { top:3.7rem; }
.projector-notes { position:fixed; right:.8rem; top:3.7rem; z-index:60; width:min(22rem,calc(100vw - 1.6rem)); max-height:70vh; overflow:auto; padding:.75rem; border:2px solid #8be9ff; border-radius:.7rem; background:rgba(8,18,24,.96); color:#fff; box-shadow:0 .8rem 2.5rem #000; cursor:default; }
.projector-notes header,.projector-notes form,.projector-notes li { display:flex; align-items:center; gap:.5rem; }
.projector-notes header { justify-content:space-between; margin-bottom:.65rem; }
.projector-notes-visibility { display:flex; width:100%; align-items:center; gap:.4rem; margin:.35rem 0; }
.projector-notes header button { padding:.2rem .45rem; }
.projector-notes form input { min-width:0; flex:1; }
.projector-notes ul { display:grid; gap:.4rem; margin:.7rem 0; padding:0; list-style:none; }
.projector-notes li { justify-content:space-between; padding:.45rem .55rem; border:1px solid #31596b; border-radius:.45rem; background:#142631; }
.projector-notes li span { overflow-wrap:anywhere; }
.projector-notes li button { flex:none; padding:.15rem .4rem; color:#ffaaa1; }
.projector-notes li .projector-note-edit { flex:1; border:0; background:transparent; color:#fff; text-align:left; }
.projector-note-detail-indicator { flex:none; width:.7rem; height:.7rem; border-radius:50%; background:#ff4b4b; box-shadow:0 0 .45rem #ff3030; }
.projector-note-detail-indicator[hidden] { display:none; }
.projector-notes li .projector-note-delete { display:grid; place-items:center; width:2rem; height:2rem; padding:0; border-color:#743b37; color:#fff; font-size:1rem; }
.projector-note-editor { position:fixed; left:50%; top:50%; z-index:1000; display:grid; width:min(38rem,calc(100vw - 2rem)); max-height:calc(100vh - 2rem); overflow:auto; transform:translate(-50%,-50%); gap:.75rem; margin:0; padding:1rem; border:2px solid #8be9ff; border-radius:.8rem; background:#101e27; color:#fff; box-shadow:0 0 0 100vmax rgba(0,0,0,.78),0 1rem 3rem #000; isolation:isolate; }
.projector-note-editor[hidden] { display:none; }
.projector-note-editor>strong { font-size:1.15rem; color:#9feaff; }
.projector-note-editor label { display:grid; gap:.3rem; font-size:.85rem; }
.projector-note-editor input[type=text] { width:100%; min-width:0; }
.projector-note-editor textarea { width:100%; min-height:12rem; resize:vertical; border:1px solid #41738a; border-radius:.45rem; padding:.65rem; background:#081218; color:#fff; font:inherit; line-height:1.4; }
.projector-note-editor .projector-note-detail-toggle { display:flex; align-items:center; gap:.4rem; }
.projector-note-editor footer { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.45rem; }
.projector-note-editor footer button { min-width:7rem; }
.projector-notes-clear { width:100%; border-color:#a8403a; background:#4a1714; color:#ffd0cc; }
.projector-notes-history { margin:.6rem 0; padding:.55rem; border:1px solid #31596b; border-radius:.45rem; background:#0d1b23; }
.projector-notes-history ul { max-height:13rem; overflow:auto; }
.projector-notes-history li span { font-size:.72rem; }
.projector-notes small { color:#b9dbe8; }
.projector-body .proto-token.locked { cursor:not-allowed; filter:grayscale(.35); }
.proto-fog-preview { position:absolute; z-index:9; border:2px dashed #ffe18b; background:rgba(255,225,139,.22); pointer-events:none; }
.proto-stage-wrap.fog-reveal-mode {
  cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='%23000' stroke-width='3'%3E%3Cpath d='M16 1v11M16 20v11M1 16h11M20 16h11'/%3E%3Ccircle cx='16' cy='16' r='3.5'/%3E%3C/g%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.4'%3E%3Cpath d='M16 1v11M16 20v11M1 16h11M20 16h11'/%3E%3Ccircle cx='16' cy='16' r='3.5'/%3E%3C/g%3E%3C/svg%3E") 16 16,crosshair;
}
.proto-pings { position:absolute; z-index:14; pointer-events:none; overflow:visible; }
.proto-notes { position:absolute; z-index:13; pointer-events:none; overflow:visible; }
.proto-map-note { position:absolute; transform:translate(-50%,-100%); max-width:calc(var(--note-size,11px) * 12); padding:calc(var(--note-size,11px) * .22) calc(var(--note-size,11px) * .38); border:2px solid #ffe36e; border-radius:.4rem; background:rgba(20,15,4,.94); color:#fff4b0; font-weight:800; font-size:var(--note-size,11px); line-height:1.15; text-align:center; overflow-wrap:anywhere; box-shadow:0 0 .7rem #000,0 0 .5rem #ffc400; }
.projector-body .proto-map-note { border-width:1px; box-shadow:0 2px 8px rgba(0,0,0,.72),0 0 2px rgba(255,196,0,.35); }
.proto-map-note.editable { pointer-events:none; }
.proto-map-note strong { display:block; }
.proto-map-note.compact { width:calc(var(--note-size,11px) * 1.5); height:calc(var(--note-size,11px) * 1.5); min-width:0; min-height:0; padding:0; border-radius:50%; transform:translate(-50%,-50%); }
.proto-map-note.compact.expanded { width:max-content; height:auto; min-width:0; min-height:0; max-width:14rem; padding:0; border-radius:.4rem; transform:translate(-50%,-100%); }
.proto-map-note.compact.expanded .proto-note-compact-toggle { width:max-content; height:auto; max-width:14rem; padding:calc(var(--note-size,11px) * .24) calc(var(--note-size,11px) * .42); white-space:normal; overflow-wrap:normal; word-break:normal; }
.proto-note-compact-toggle { display:block; width:100%; height:100%; min-width:0; min-height:0; padding:0; border:0; border-radius:inherit; background:transparent; color:inherit; font:inherit; font-weight:900; line-height:1; pointer-events:auto; touch-action:manipulation; }
.proto-map-note.compact:not(.expanded) .proto-note-compact-toggle { font-size:calc(var(--note-size,11px) * .78); }
.proto-map-note.details-visible { width:min(24rem,42vw); max-width:24rem; text-align:left; }
.proto-note-details { display:block; margin-top:.4rem; padding-top:.4rem; border-top:1px solid #ffe36e88; color:#fff; font-weight:500; white-space:pre-wrap; overflow-wrap:anywhere; }
.proto-map-note [data-note-action] { position:absolute; z-index:2; display:grid; place-items:center; width:1.35rem; height:1.35rem; padding:0; border:1px solid #ffe36e; border-radius:50%; background:#251d08; color:#fff4b0; font-size:.75rem; line-height:1; pointer-events:auto; touch-action:none; cursor:grab; }
.proto-note-move { right:calc(100% + .35rem); bottom:calc(100% + .35rem); left:auto; top:auto; }
.proto-note-resize { left:calc(100% + .35rem); top:calc(100% + .35rem); right:auto; bottom:auto; cursor:nwse-resize!important; }
.proto-map-note::after { content:""; position:absolute; left:50%; top:100%; transform:translateX(-50%); border:.35rem solid transparent; border-top-color:#ffe36e; }
.projector-body.notes-hidden .proto-notes { display:none; }
.proto-map-ping { position:absolute; width:1px; height:1px; transform:translate(-50%,-50%); }
.proto-map-ping i,.proto-map-ping b { position:absolute; left:50%; top:50%; width:.3rem; height:.3rem; border-radius:50%; transform:translate(-50%,-50%); }
.proto-map-ping i { border:.09rem solid #fff176; box-shadow:0 0 .25rem #ffca28; animation:proto-ping-wave 1.6s ease-out infinite; }
.proto-map-ping i:nth-child(2) { animation-delay:.5s; }
.proto-map-ping b { background:#fff; box-shadow:0 0 .3rem .08rem #ffc400; animation:proto-ping-flash 1.15s ease-in-out infinite; }
@keyframes proto-ping-wave { 0%{width:.3rem;height:.3rem;opacity:1} 100%{width:1.35rem;height:1.35rem;opacity:0} }
@keyframes proto-ping-flash { 0%,20%{opacity:1;transform:translate(-50%,-50%) scale(1.5)} 100%{opacity:0;transform:translate(-50%,-50%) scale(.2)} }
.projector-pointer-button { position:fixed; left:.75rem; bottom:.75rem; z-index:130; display:flex; align-items:center; gap:.5rem; min-height:3.25rem; padding:.6rem .9rem; border:2px solid #ffe36e; border-radius:999px; background:rgba(24,31,36,.94); color:#fff; font:inherit; box-shadow:0 .4rem 1.4rem #000b; touch-action:manipulation; }
.projector-pointer-button span { color:#ffe36e; font-size:1.75rem; line-height:1; }
.projector-pointer-button.active { border-color:#fff176; background:#765b00; box-shadow:0 0 0 .22rem #fff17655,0 0 1.5rem #ffc400aa; }
.projector-pointer-button.active span { animation:projector-pointer-button-pulse 1s ease-in-out infinite alternate; }
.projector-pointer-mode .proto-stage-wrap { cursor:crosshair!important; touch-action:none; }
@keyframes projector-pointer-button-pulse { to { transform:scale(1.25); filter:brightness(1.4); } }
.proto-token.turn-active { animation:proto-active-turn 1.15s ease-in-out infinite; }
@keyframes proto-active-turn { 0%,100%{filter:drop-shadow(0 0 .15rem #43d8ff);outline:2px solid #8be9ff;outline-offset:3px} 50%{filter:drop-shadow(0 0 1rem #00aaff);outline:5px solid #d6f8ff;outline-offset:7px} }
.proto-hp-peek { position:absolute; z-index:40; left:50%; bottom:calc(100% + .65rem); width:max(7rem,calc(var(--token-size,24px)*2.8)); transform:translateX(-50%); padding:.28rem; border:2px solid #f0d88e; border-radius:.45rem; background:#110d09; color:#fff; font-size:.72rem; pointer-events:none; overflow:visible; }
.proto-hp-peek span { display:block; height:.62rem; border-radius:.3rem; background:#25130f; overflow:hidden; }
.proto-hp-peek i { display:block; height:100%; background:linear-gradient(90deg,#d94b3d,#e7c75e,#87d36b); }
.proto-hp-peek strong { display:block; margin-top:.15rem; text-align:center; white-space:nowrap; }
.proto-character-peek { position:absolute; z-index:45; left:50%; top:50%; width:min(34rem,76%); transform:translate(-50%,-50%); display:grid; grid-template-columns:auto 1fr; gap:.65rem; padding:1rem; border:4px solid #8be9ff; border-radius:1rem; background:rgba(12,20,27,.96); color:#fff; box-shadow:0 0 2rem #00aaff,0 1rem 3rem #000; pointer-events:none; }
.proto-character-peek>img { grid-row:1/4; width:7rem; height:7rem; object-fit:cover; border-radius:.7rem; border:2px solid #d6f8ff; }
.proto-character-peek h2 { margin:0; font-size:clamp(1.3rem,3vw,2.4rem); color:#d6f8ff; }
.proto-character-vitals,.proto-character-abilities { display:flex; flex-wrap:wrap; gap:.45rem; }
.proto-character-vitals b,.proto-character-abilities span { padding:.35rem .55rem; border:1px solid #41738a; border-radius:.45rem; background:#182c38; font-size:clamp(.8rem,1.7vw,1.15rem); }
.proto-character-abilities { grid-column:1/-1; justify-content:center; }
.proto-character-peek { width:min(70rem,92%); max-height:86%; display:block; overflow:auto; padding:1.1rem 1.25rem; pointer-events:auto; }
.proto-character-peek header { display:flex; align-items:center; gap:1rem; padding-right:3rem; }
.proto-character-peek header img { width:7rem; height:7rem; object-fit:cover; border-radius:.7rem; border:2px solid #d6f8ff; }
.proto-character-peek header h2 { margin:0; font-size:clamp(1.5rem,3.5vw,2.8rem); color:#d6f8ff; }
.proto-character-peek header p { margin:.25rem 0; color:#b9dbe8; }
.proto-character-close { position:absolute; right:.8rem; top:.8rem; z-index:2; width:2.7rem; height:2.7rem; padding:0; border:2px solid #8be9ff; border-radius:50%; background:#182c38; color:#fff; font-size:1.35rem; pointer-events:auto; }
.proto-character-peek section { margin-top:.65rem; padding:.65rem .8rem; border:1px solid #41738a; border-radius:.65rem; background:#101e27; }
.proto-character-peek section h3 { margin:0 0 .35rem; color:#9feaff; font-size:1rem; }
.proto-character-peek section p { margin:.25rem 0; line-height:1.4; }
.proto-character-peek .proto-sheet-primary { border-width:3px; border-color:#ffd66b; background:#2b2414; }
.proto-character-peek .proto-sheet-primary h3 { color:#ffe49a; font-size:1.2rem; }
.proto-sheet-zone { margin-top:.65rem; border:1px solid #41738a; border-radius:.7rem; background:#101e27; overflow:hidden; }
.proto-sheet-zone summary { min-height:4rem; display:flex; align-items:center; gap:.75rem; padding:.45rem .75rem; color:#9feaff; font-size:1.1rem; font-weight:800; cursor:pointer; list-style:none; }
.proto-sheet-zone summary::-webkit-details-marker { display:none; }
.proto-sheet-zone summary::after { content:'＋'; margin-left:auto; font-size:1.4rem; }
.proto-sheet-zone[open] summary::after { content:'−'; }
.proto-sheet-zone summary img { width:3.2rem; height:3.2rem; object-fit:cover; border-radius:.55rem; }
.proto-sheet-zone>div { padding:.7rem .9rem; border-top:1px solid #31596b; }
.proto-sheet-zone.proto-sheet-primary { border:3px solid #ffd66b; background:#2b2414; }
.proto-sheet-zone.proto-sheet-primary summary { color:#ffe49a; }
.proto-sheet-attacks { display:grid; grid-template-columns:repeat(auto-fit,minmax(15rem,1fr)); gap:.45rem; }
.proto-sheet-attacks span { padding:.65rem; border:1px solid #846e32; border-radius:.5rem; background:#19170f; font-size:1rem; }
.proto-sheet-skills { display:grid; grid-template-columns:repeat(auto-fit,minmax(10rem,1fr)); gap:.35rem; }
.proto-sheet-skills span { display:flex; justify-content:space-between; gap:.5rem; padding:.4rem .55rem; border:1px solid #31596b; border-radius:.45rem; background:#182c38; }
.proto-sheet-skills em { font-style:normal; }
.proto-sheet-skills b { color:#9feaff; }
.projector-body.embedded-projector .projector-badge{display:none!important}
