.abac-encounter,.abac-form{color:#eee;font:15px/1.55 'Courier New',monospace;--abac-white:#efefea;--abac-gray:#777;--abac-black:#050505;box-sizing:border-box;isolation:isolate;text-align:left}
.abac-encounter *,.abac-form *{box-sizing:border-box}
.abac-encounter{position:fixed;z-index:260;top:32dvh;left:clamp(12px,4vw,56px);width:min(310px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:12px 10px 12px;scrollbar-width:thin;overscroll-behavior:contain}
.abac-encounter[hidden]{display:none}
.abac-drag{width:112px;margin:0 auto 25px;position:relative}
.abac-encounter .abac-circle{width:112px}
.abac-name{display:block;position:absolute;left:50%;bottom:-18px;transform:translateX(-50%);font-size:10px;letter-spacing:.15em;background:#000;padding:0 5px;color:#aaa}
.abac-circle{width:126px;aspect-ratio:1;background:var(--abac-white);border-radius:50%;position:relative;overflow:hidden;flex-shrink:0}
.abac-circle img{display:block;position:absolute;max-width:none;width:155%;height:155%;left:-27.5%;top:-13%;image-rendering:pixelated;object-fit:contain;clip-path:polygon(47%12%,62%15%,72%22%,76%36%,74%61%,68%70%,60%79%,43%79%,31%70%,23%57%,24%35%,26%22%,35%15%);filter:grayscale(1) contrast(1.35)}
.abac-encounter .abac-circle img{opacity:0}
.abac-encounter[data-face-ready="true"] .abac-circle img{opacity:1;animation:abac-arrive .85s cubic-bezier(.2,.7,.3,1) both}
.abac-speech{display:grid;gap:10px}
.abac-bubble{position:relative;margin:0!important;padding:11px 13px;background:#080808;border:1px solid #888;box-shadow:2px 2px 0 #000;font:inherit!important;min-height:48px;overflow-wrap:anywhere;max-width:100%}
.abac-bubble,.abac-measure{grid-area:1/1;align-self:start}
.abac-bubble{align-self:stretch}
.abac-measure{visibility:hidden;pointer-events:none;padding:11px 13px;border:1px solid transparent;min-width:0;overflow-wrap:anywhere}
.abac-foreign{font-family:Georgia,'Times New Roman','Yu Mincho',serif;font-size:1.08em;font-style:italic;letter-spacing:.015em;unicode-bidi:isolate}
.abac-foreign:lang(ja){font-style:normal}
/* ABAC's site-review speech: one small arrival, then settled type. The hidden
   longest-line measures use this same structure, fonts, wrapping and aside. */
.abac-bubble,.abac-measure{min-width:0;max-width:100%;overflow-wrap:normal;word-break:normal;line-break:strict}
.abac-measure{min-height:48px}
.abac-typed{overflow-wrap:normal;word-break:normal;line-break:strict}
.abac-type-content:lang(ja){font-family:'Hiragino Mincho ProN','Yu Mincho','Noto Serif JP',serif;letter-spacing:.025em;font-style:normal}
.abac-typed .abac-foreign{font-family:Georgia,'Times New Roman',serif;font-size:1.08em;font-style:italic;letter-spacing:.015em;unicode-bidi:isolate}
.abac-typed .abac-foreign:lang(ja){font-family:'Hiragino Mincho ProN','Yu Mincho','Noto Serif JP',serif;font-size:1.02em;font-style:normal;letter-spacing:.025em}
.abac-typed .abac-foreign:lang(zh){font-family:'Songti SC','Noto Serif CJK SC',serif;font-style:normal}
.abac-typed .abac-foreign:lang(ko){font-family:Batang,'Noto Serif KR',serif;font-style:normal}
.abac-word{display:inline-block;white-space:nowrap;vertical-align:baseline}
.abac-char{position:relative;display:inline;opacity:0;top:var(--abac-rise,.12em)}
.abac-char.is-revealed{animation:abac-letter-settle 240ms cubic-bezier(.18,.7,.3,1) both}
.abac-aside{display:block;margin-top:.65em;color:#aaa;font-size:.88em;line-height:1.6;letter-spacing:.01em}
.abac-typed[data-abac-motion="still"] .abac-char{opacity:1;top:0;animation:none!important}
@keyframes abac-letter-settle{0%{opacity:0;top:var(--abac-rise,.12em)}65%{opacity:1}100%{opacity:1;top:0}}
.abac-bubble:before{content:'';position:absolute;left:calc(50% - 4px);top:-8px;width:8px;height:8px;border-left:1px solid #888;border-bottom:1px solid #888;background:#080808;transform:skewY(35deg)}
.abac-choices{display:flex;align-items:center;gap:10px;justify-content:flex-start;margin-top:12px;background:#000;padding:2px 5px;flex-wrap:wrap;min-height:48px}
.abac-choices button,.abac-form button{font:inherit;min-width:44px;min-height:44px;cursor:pointer;border-radius:0;border:0;color:inherit;background:transparent;padding:8px 12px;text-align:center}
.abac-choices [data-abac-yes]{border:1px solid #ddd}
.abac-choices [data-abac-close]{margin-left:auto;font-size:23px}
.abac-choices .abac-sound{min-width:44px;padding-inline:7px;color:#aaa}
.abac-choices button:hover,.abac-form button:hover{text-decoration:underline;text-underline-offset:4px}
.abac-encounter :focus-visible,.abac-form :focus-visible{outline:2px dotted #fff;outline-offset:3px}
dialog.abac-form{position:fixed;inset:0;margin:auto;width:min(492px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;border:2px solid #aaa;padding:0;background:var(--abac-black);box-shadow:4px 4px 0 #000,6px 6px 0 #484848;overscroll-behavior:contain;scrollbar-width:thin}
.abac-form::backdrop{background:rgb(0 0 0/.75)}
.abac-form-handle{display:flex;align-items:center;justify-content:space-between;padding:2px 5px 2px 18px;border-bottom:1px dotted #555;font-size:12px;position:sticky;top:0;background:#050505;z-index:2}
.abac-form-handle>button{font-size:24px;padding:4px 12px}
.abac-post-signal{font-style:normal;letter-spacing:4px;color:#ccc;margin-left:8px;animation:abac-signal 3.8s steps(2,end) infinite}
.abac-form-body{padding:16px 24px 25px;position:relative}
.abac-form-body:after{content:'';position:absolute;bottom:7px;right:8px;width:14px;height:9px;border-bottom:1px dashed #777;border-right:1px dashed #555;transform:rotate(-7deg);pointer-events:none}
.abac-form-hero{position:relative;text-align:center;padding:5px 15px 19px;margin-bottom:21px;border-bottom:1px dotted #555;background:repeating-linear-gradient(0deg,#fff0 0 5px,#ffffff03 5px 6px)}
.abac-form-hero::before,.abac-form-hero::after{content:'';position:absolute;top:12px;width:12px;height:24px;border-block:2px solid #888;pointer-events:none}
.abac-form-hero::before{left:0;border-left:2px solid #888}.abac-form-hero::after{right:0;border-right:2px solid #888}
.abac-form-hero>.abac-circle{width:84px;margin:0 auto 14px;animation:none}
.abac-form-hero>.abac-circle img{animation:abac-arrive .65s cubic-bezier(.2,.7,.3,1) both}
.abac-form h2{font:700 24px/1.2 'Courier New',monospace;letter-spacing:-.04em;margin:0 0 9px}
.abac-form-hero p{font:12px/1.65 'Courier New',monospace;color:#bbb;margin:0}
.abac-form label,.abac-form legend{font:inherit;color:#ddd;display:block}
.abac-scope{display:grid!important;grid-template-columns:minmax(66px,.55fr) minmax(0,1.45fr);align-items:center;gap:12px;margin:0 0 17px}
.abac-scope[hidden]{display:none!important}
.abac-form select{font:inherit;font-size:16px;width:100%;min-height:44px;min-width:0;max-width:100%;color:#eee;background:#101010;border:1px solid #777;border-radius:0;padding:7px 5px}
.abac-essay{padding-bottom:18px;border-bottom:1px dotted #444}.abac-form select[aria-invalid=true]{outline:2px dotted #fff;outline-offset:3px}
.abac-form option{color:#eee;background:#080808}
.abac-rating{margin:0 0 24px;padding:0;border:0;min-width:0}
.abac-rating legend{font-size:13px}
.abac-rating [data-stars]{display:flex;justify-content:space-between;max-width:330px;margin:8px auto}
.abac-rating [data-star]{font-family:monospace;font-size:32px;line-height:1;min-width:44px;padding:5px 3px;color:#555;image-rendering:pixelated;transition:transform 90ms steps(2)}
.abac-rating [data-star][data-filled="true"]{color:#f5f5ec;filter:drop-shadow(0 0 4px #ffffff35);animation:abac-star .3s steps(4,end) both}
.abac-rating [data-star]:nth-child(2){animation-delay:35ms}.abac-rating [data-star]:nth-child(3){animation-delay:70ms}.abac-rating [data-star]:nth-child(4){animation-delay:105ms}.abac-rating [data-star]:nth-child(5){animation-delay:140ms}
.abac-rating [data-star]:active{transform:translateY(2px)}
.abac-rating-note{display:flex;gap:10px;align-items:center;justify-content:space-between;font-size:11px;line-height:1.4;color:#aaa}
.abac-rating-note [data-clear-stars]{font-size:11px;min-height:44px;padding:0 6px;text-decoration:underline}
.abac-form textarea{display:block;width:100%;min-height:102px;max-height:32dvh;font:16px/1.6 'Courier New',monospace;border:0;border-bottom:1px dotted #999;outline-offset:4px;padding:8px 0;color:#eee;background:transparent;resize:none;border-radius:0;box-shadow:none;overflow:auto}
.abac-form textarea::placeholder{color:#999}
.abac-note-bottom{display:flex;justify-content:space-between;gap:15px;margin-top:8px;color:#aaa}
.abac-note-bottom small{font:10px/1.5 'Courier New',monospace}
.abac-note-bottom #abacCount{white-space:nowrap}
.abac-form-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:22px}
.abac-form-actions [data-abac-send]{border:1px solid #ddd;min-width:120px;font-weight:bold}
.abac-form button:disabled{opacity:.45;cursor:wait}
.abac-status{font:12px/1.6 'Courier New',monospace!important;margin:16px 0 0!important;overflow-wrap:anywhere}
.abac-status[hidden]{display:none}
.abac-about{display:flex;align-items:flex-start;gap:15px;margin:28px 0 4px;padding:20px 0 4px;border-top:1px dotted #666;min-height:0}
.abac-about img{object-fit:contain;image-rendering:pixelated;flex-shrink:0;filter:grayscale(1)}
.abac-about h3{font-size:17px;margin:0 0 8px}
.abac-about p{font-size:13px;line-height:1.6;margin:0 0 8px}
.abac-about button{min-height:44px;text-decoration:underline;text-underline-offset:4px}
.abac-receipt{position:fixed;z-index:270;bottom:max(20px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 30px);padding:12px 18px;border:1px dotted #aaa;background:#050505;color:#eee;font:13px/1.6 'Courier New',monospace;overflow-wrap:anywhere}
.abac-preview-note{font-size:11px;background:#000;padding:6px;margin:0}
/* Small room and shop viewports reserve a place for Abac above their content.
   The full story and choices stay scrollable; keyboard entry remains unobscured. */
.abac-encounter.abac-room-docked{position:relative;inset:auto;z-index:1;display:grid;grid-template-columns:56px minmax(0,1fr);align-items:start;gap:6px 10px;width:calc(100% - 24px);margin:12px;padding:10px 4px;border-bottom:1px dotted #666;font-size:13px;line-height:1.6;overflow:auto;overscroll-behavior:auto;background:#050505}
.abac-room-docked .abac-drag{grid-column:1;grid-row:1/span 2;width:56px;margin:0;padding-bottom:19px}
.abac-encounter.abac-room-docked .abac-circle{width:56px}.abac-room-docked .abac-name{bottom:0;font-size:9px}
.abac-room-docked .abac-speech{grid-column:2;grid-row:1;min-width:0;gap:0}
.abac-room-docked .abac-bubble,.abac-room-docked .abac-measure{padding:9px 10px;min-width:0}
.abac-room-docked .abac-bubble:before{left:-5px;top:18px;width:8px;height:8px;transform:rotate(45deg)}
.abac-room-docked .abac-choices{grid-column:2;grid-row:2;margin-top:0;padding:0;gap:4px 7px;background:transparent}
.abac-room-docked .abac-choices button{padding:8px;font-size:12px}.abac-room-docked .abac-choices .abac-sound{margin-left:auto}
@keyframes abac-arrive{0%{transform:translateY(110%)}78%{transform:translateY(-3%)}100%{transform:translateY(0)}}
@keyframes abac-signal{0%,70%,100%{opacity:.8}80%{opacity:.3}}
@keyframes abac-star{0%{transform:translateY(2px) scale(.8)}55%{transform:translateY(-3px) scale(1.1)}100%{transform:none}}
@media(max-width:420px){.abac-encounter{font-size:14px}.abac-drag,.abac-encounter .abac-circle{width:96px}.abac-form-body{padding:14px 17px 22px}.abac-form h2{font-size:22px}.abac-form .abac-scope{grid-template-columns:1fr;gap:5px}.abac-form .abac-rating{margin-bottom:18px}.abac-form .abac-form-hero{padding-bottom:15px;margin-bottom:16px}.abac-form-hero>.abac-circle{width:72px}.abac-note-bottom{gap:8px}.abac-form-actions{margin-top:17px}}
@media(max-height:600px){.abac-form-hero>.abac-circle{width:60px;margin-bottom:9px}.abac-form-hero{padding-bottom:12px;margin-bottom:14px}.abac-form-body{padding-top:10px}}
@media(prefers-reduced-motion:reduce){.abac-encounter *,.abac-form *{animation:none!important;transition:none!important}}
@media(prefers-reduced-motion:reduce){.abac-typed .abac-char{animation:none!important;opacity:1;top:0}}
body.clash-still .abac-encounter *,body.clash-still .abac-form *{animation:none!important;transition:none!important}
body.clash-still .abac-typed .abac-char{animation:none!important;opacity:1;top:0}

.abac-encounter.abac-room-docked[hidden]{display:none}
