/* A two-pixel ink outline and enamel name tab keep character voices distinct from instruments. */
.speech-balloon,.ship-talk-targets {
 position:absolute;inset:0;z-index:1;pointer-events:none;
}
.speech-balloon {
 --paper:#fff1ce;--ink:#17212b;--voice:#99d3c9;
 filter:drop-shadow(2px 3px 0 #090e1b80);
}
.speech-balloon[data-tone=chief] {--voice:#ffb290;--paper:#fff0d6}
.speech-balloon[data-tone=big] {--voice:#f0c67e}
.speech-balloon[data-tone=x] {--voice:#a9df80}
.speech-balloon[data-tone=y],.speech-balloon[data-tone=observatory] {--voice:#a0c8ed}
.speech-balloon[data-tone=archive] {--voice:#d8b9e9}
.speech-balloon[data-tone=mess] {--voice:#edae99}
.speech-balloon[data-tone=tiko] {--voice:#9ddbd6;--paper:#e9f5e9}
.speech-card {
 --corners:polygon(0 6px,3px 6px,3px 3px,6px 3px,6px 0,calc(100% - 6px) 0,calc(100% - 6px) 3px,calc(100% - 3px) 3px,calc(100% - 3px) 6px,100% 6px,100% calc(100% - 6px),calc(100% - 3px) calc(100% - 6px),calc(100% - 3px) calc(100% - 3px),calc(100% - 6px) calc(100% - 3px),calc(100% - 6px) 100%,6px 100%,6px calc(100% - 3px),3px calc(100% - 3px),3px calc(100% - 6px),0 calc(100% - 6px));
 position:absolute;inset:0 auto auto 0;isolation:isolate;clip-path:var(--corners);
 width:max-content;max-width:min(320px,calc(100% - 18px));margin:0;padding:9px 12px 11px;
 border:0;border-radius:0;background:transparent;color:#222437;text-align:left;z-index:1;
 display:grid;grid-template-columns:48px minmax(0,1fr);align-items:start;gap:10px;pointer-events:none;
}
button.speech-card {pointer-events:auto;cursor:pointer;touch-action:manipulation}
.speech-card:focus-visible {outline:2px solid #df995a;outline-offset:-5px}
.speech-avatar {
 display:block;width:48px;height:48px;margin-top:1px;image-rendering:pixelated;
 background:#283340;border:2px solid #39434b;box-shadow:2px 2px 0 #b2ac98;
}
.speech-copy {display:flex;min-width:0;flex-direction:column;align-items:flex-start;gap:5px}
.speech-name {
 display:block;background:var(--voice);box-shadow:inset 2px 0 0 #46545a;
 color:#25303a;padding:1px 5px 2px 7px;text-transform:uppercase;
 font:14px/1 Tiny,monospace;letter-spacing:.035em;
}
.speech-words {font:500 15px/1.28 Rubik,system-ui,sans-serif;text-wrap:pretty;overflow-wrap:anywhere}
.speech-text-copy {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.speech-tail {
 position:absolute;pointer-events:none;overflow:visible;z-index:0;
}
.speech-tail path {fill:var(--paper);stroke:var(--ink);stroke-width:2;stroke-linejoin:miter}
.ship-talk-target {
 position:absolute;left:0;top:0;border:0;background:transparent;padding:0;cursor:pointer;
 pointer-events:auto;touch-action:manipulation;transform-origin:center;
}
.ship-talk-target:hover,.ship-talk-target:focus-visible {outline:1px dashed #f2e4ba9e;outline-offset:1px}
@media (max-width:600px),(max-height:480px) {
 .speech-card {max-width:min(254px,calc(100% - 16px));padding:8px 10px 9px;grid-template-columns:38px minmax(0,1fr);gap:8px}
 .speech-avatar {width:38px;height:38px}
 .speech-copy {gap:4px}
 .speech-name {font-size:12px}
 .speech-words {font-size:13px;line-height:1.25}
}

.fridge-speech .speech-name{font-family:Rubik,system-ui,sans-serif;font-weight:700}
