/* "Watch her" stroke mode: dock toggle, Spine portrait layer, auto-move trail. */
.stroke-mode-toggle { position:relative;flex:none; }
.wager-surrender[hidden] ~ .stroke-mode-toggle:not([data-wager-entry="true"]) { display:none!important; }
.stroke-mode-toggle[aria-pressed="true"] { box-shadow:0 0 0 1px rgba(242,138,184,.75),0 0 14px rgba(224,109,155,.45); }
/* Spine JOI figure replaces the normal character layers while the stroke loop runs; keep the table-view background behind her. */
.stroke-spine-layer {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:3;
  pointer-events:none;
  display:block;
  opacity:0;
  transition:opacity 200ms ease;
}
.stroke-spine-layer[hidden] { display:none; }
.stroke-spine-layer.is-visible { opacity:1; }
/* Feet clip extends to the bottom of the 1000x832 canvas, in front of the tabletop board. */
body[data-stroke-spine="on"][data-stroke-clip="feet"] .stroke-spine-layer { z-index:5; }
/* Under-table view during stroke mode: his lap animation plays over the under-table background; FX stay on top.
   Her normal under-table shoe/feet layers and the shoe-peek hotspot are hidden (the animation has its own legs). */
body[data-stroke-spine="on"][data-stroke-clip="under"] .stroke-spine-layer { z-index:8; }
body[data-stroke-under="on"] .stroke-fx-layer { z-index:9; }
body[data-stroke-under="on"] :is(.under-table-shoe-hotspot, .hostess-under-table-shoe-layer, .hostess-under-table-shoe-off-layer,
  .hostess-under-table-feet-off-layer, .hostess-under-table-feet-up-layer, .under-table-steam-particles) { display:none!important; }
body[data-stroke-spine="on"] .hostess-stage .hostess-character-slot {
  opacity:0;
  visibility:hidden;
  transition:opacity 200ms ease, visibility 0ms linear 200ms;
}
body[data-stroke-spine="on"] .hostess-stage :is(.hostess-ai-move-hand-layer, .hostess-ai-move-press-layer) {
  visibility:hidden!important;
}
.cell.stroke-auto-trail::after { content:"";position:absolute;inset:-6%;border-radius:50%;pointer-events:none;z-index:3;
  background:radial-gradient(circle,rgba(242,138,184,0) 38%,rgba(242,138,184,.55) 52%,rgba(224,109,155,.22) 66%,rgba(224,109,155,0) 74%);
  animation:stroke-auto-trail 1.6s ease-out var(--stroke-trail-delay,0ms) forwards; }
@keyframes stroke-auto-trail { 0% { opacity:0;transform:scale(.8); } 18% { opacity:1;transform:scale(1); } 100% { opacity:0;transform:scale(1.12); } }
html[data-motion="still"] .stroke-spine-layer,
body[data-motion="still"] .stroke-spine-layer,
body[data-layout-reduced="1"] .stroke-spine-layer,
html[data-motion="still"] body[data-stroke-spine="on"] .hostess-stage .hostess-character-slot,
body[data-motion="still"][data-stroke-spine="on"] .hostess-stage .hostess-character-slot,
body[data-layout-reduced="1"][data-stroke-spine="on"] .hostess-stage .hostess-character-slot { transition:none; }
html[data-motion="still"] .cell.stroke-auto-trail::after,
body[data-motion="still"] .cell.stroke-auto-trail::after,
body[data-layout-reduced="1"] .cell.stroke-auto-trail::after { animation:none;opacity:.7; }
/* Stroke-mode portrait FX overlay: inner edge glow, 2D particle canvas, onomatopoeia, whispers. */
.stroke-fx-layer {
  position:absolute;
  inset:0;
  z-index:6;
  pointer-events:none;
  overflow:hidden;
}
.stroke-fx-layer[hidden] { display:none; }
.stroke-fx-vignette {
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:0;
  background:radial-gradient(ellipse at 50% 48%, rgba(224,109,155,0) 52%, rgba(224,109,155,.55) 86%, rgba(224,109,155,1) 100%);
  box-shadow:inset 0 0 42px rgba(224,109,155,.85);
}
.stroke-fx-canvas {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  pointer-events:none;
}
.stroke-fx-sfx {
  position:absolute;
  left:0;
  top:0;
  z-index:2;
  pointer-events:none;
  white-space:nowrap;
  font-size:0.96rem;
  font-weight:700;
  letter-spacing:0.04em;
  color:#ff94c8;
  text-shadow:
    -1px -1px 0 rgba(36,8,24,.94),
    1px -1px 0 rgba(36,8,24,.94),
    -1px 1px 0 rgba(36,8,24,.94),
    1px 1px 0 rgba(36,8,24,.94),
    0 2px 6px rgba(28,6,20,.82);
}
.stroke-fx-sfx[hidden] { display:none; }
.stroke-fx-whisper {
  position:absolute;
  left:0;
  top:0;
  z-index:3;
  max-height:74%;
  max-width:112px;
  padding:14px 10px;
  border:1px solid rgba(255,255,255,.25);
  border-radius:4px;
  background:rgba(34,38,42,.58);
  color:#fff;
  text-shadow:0 2px 4px rgba(0,0,0,.85);
  font-size:1.02rem;
  font-weight:700;
  line-height:1.35;
  writing-mode:vertical-rl;
  text-orientation:upright;
  overflow:hidden;
  box-shadow:0 0 22px rgba(255,91,167,.24),inset 0 0 26px rgba(255,255,255,.06);
  pointer-events:none;
  opacity:0;
}
.stroke-fx-whisper[hidden] { display:none; }

html[lang="en"] .stroke-fx-whisper {
  writing-mode:horizontal-tb;
  max-width:min(16rem,74%);
  padding:.55em .7em;
  overflow-wrap:anywhere;
}
/* Hand-lettered manga SFX images; the word stays in the DOM for assistive tech and QA. */
.stroke-fx-sfx.has-art { text-shadow:none; }
.stroke-fx-sfx-art { display:block; width:auto; pointer-events:none; user-select:none; }
.stroke-fx-sfx-art[hidden] { display:none; }
.stroke-fx-sfx.has-art .stroke-fx-sfx-text { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
