.bb-strike {
  --bb-paper: #f5ecd5;
  --bb-ink: #173f34;
  --bb-red: #af3e29;
  --bb-trim: #a7462c;
  color: var(--bb-ink);
  background-color: var(--bb-paper);
  background-image: radial-gradient(ellipse at 18% 47%, rgba(255,251,228,.92), transparent 67%),
    repeating-linear-gradient(92deg, transparent 0 7px, rgba(148,109,56,.027) 8px, transparent 10px);
  position: relative;
  isolation: isolate;
  width: 100%;
  padding: max(16px,env(safe-area-inset-top)) clamp(16px,5vw,72px) max(20px,env(safe-area-inset-bottom));
  box-sizing: border-box;
  font-family: "PingFang HK","PingFang TC","Microsoft JhengHei",sans-serif;
}
.bb-strike *, .bb-strike *::after, .bb-strike *::before { box-sizing:border-box; }
.bb-strike button { font:inherit; cursor:pointer; color:inherit; -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
.bb-strike button:focus-visible, .bb-strike input:focus-visible { outline:3px solid #eb8546; outline-offset:3px; }
.bb-strike button:disabled { cursor:wait; opacity:.55; }
.bb-strike svg { display:inline-block; width:1.15em; height:1.15em; flex:none; }
.bb-strike--tile { --bb-trim:#367369; }
.bb-strike--wood { --bb-trim:#78583a; }
.bb-strike__controls {
  border-block: 1px solid #173f344d;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:6px 0;
  margin:0 auto;
  max-width:1020px;
  gap:10px;
}
.bb-strike__back, .bb-strike__sound, .bb-strike__write { border:none; background:transparent; display:inline-flex; align-items:center; gap:.45em; }
.bb-strike__controls button { min-width:44px; min-height:44px; justify-content:center; }
.bb-strike__sound { border-radius:100%; }
.bb-strike__sound svg { width:21px; height:21px; }
.bb-strike__place { font-size:14px; font-weight:800; letter-spacing:.1em; }
.bb-strike__layout { display:grid; grid-template-columns:minmax(240px,.86fr) minmax(220px,1fr); align-items:center; max-width:940px; margin:0 auto; gap:clamp(25px,7vw,90px); padding:clamp(18px,3.7vh,44px) 0; }
.bb-strike__copy { padding-left:clamp(0px,3vw,40px); }
.bb-strike h2 { font-family:"Songti TC","Songti SC","PMingLiU",serif; font-weight:900; font-size:clamp(64px,8vw,110px); margin:0; color:var(--bb-ink); line-height:1.05; letter-spacing:-.075em; }
.bb-strike h2 span { display:block; color:var(--bb-red); }
.bb-strike__copy p { line-height:1.8; margin:1.4em 0; font-size:clamp(16px,1.5vw,21px); }
.bb-strike__write { padding:.65em 0; min-height:44px; text-decoration:underline; text-underline-offset:.32em; font-weight:700!important; }
.bb-strike__keyboard { display:block; font-size:12px; color:#526557; margin-top:2.5em; }
.bb-strike__keyboard kbd { font-family:ui-monospace, monospace; font-size:11px; padding:3px 6px; border:1px solid #52655770; border-bottom-width:2px; border-radius:3px; margin-right:3px; }
.bb-strike__mount { width:min(100%, 40svh,420px); min-width:220px; justify-self:center; padding:5px; background:var(--bb-trim); box-shadow:0 2px 0 #253b2c, 5px 6px 0 #44301824; }
.bb-strike__canvas { position:relative; aspect-ratio:498/1010; width:100%; overflow:hidden; display:block; padding:0; border:0; background:#d59b59; user-select:none; -webkit-user-select:none; touch-action:manipulation; }
.bb-strike__frame { width:100%; height:100%; position:absolute; inset:0; display:block; object-fit:contain; opacity:0; pointer-events:none; }
.bb-strike__canvas[data-pose="lift"] [data-frame="lift"],
.bb-strike__canvas[data-pose="slap"] [data-frame="slap"],
.bb-strike__canvas[data-pose="return"] [data-frame="return"] { opacity:1; }
.bb-strike__impact { position:absolute; pointer-events:none; top:43%; left:12%; opacity:0; color:#ffedaf; font:900 clamp(42px,5vw,76px)/1 "Songti TC",serif; -webkit-text-stroke:1px #6c3824; text-shadow:3px 3px #682f23; }
.bb-strike__paperword { position:absolute; pointer-events:none; left:30%; top:59%; width:39%; max-height:14%; overflow:hidden; color:#3a261a; font:bold clamp(11px,1.5vw,19px)/1.1 "Songti TC",serif; text-wrap:balance; overflow-wrap:anywhere; transform:rotate(-3deg); text-shadow:0 0 5px #ffd75f; }
.bb-strike__canvas[data-pose="slap"] .bb-strike__paperword { opacity:0; }
.bb-strike__mobile-note { display:none; }
.bb-strike__error { display:block; max-width:1020px; margin:auto; color:var(--bb-red); }
@media (max-width:650px) {
  .bb-strike { padding-inline:12px; padding-top:max(8px,env(safe-area-inset-top)); }
  .bb-strike__layout { display:block; padding:12px 0 8px; }
  .bb-strike__copy { display:none; }
  .bb-strike__mount { width:min(100%, calc((100svh - 142px) * .493)); min-width:min(100%,208px); margin:0 auto; padding:3px; }
  .bb-strike__mobile-note { display:flex; align-items:center; justify-content:center; gap:1.2em; font-size:14px; }
  .bb-strike__paperword { font-size:14px; }
}
@media (prefers-reduced-motion:reduce) {
  .bb-strike__impact { display:none; }
}
.bb-strike__marks,.bb-strike__helper-shoe{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.bb-strike__canvas:not([data-pose="lift"]) .bb-strike__marks{opacity:0}
.bb-strike__helper-shoe{opacity:0;background:url('./assets/strike-lift.jpg') center/100% 100% no-repeat;transform-origin:50% 0;clip-path:polygon(81% 0,100% 0,100% 16%,94% 20%,82% 25%,74% 30%,59% 36%,46% 40%,38% 41%,34% 39%,34% 34%,38% 30%,49% 25%,61% 19%,64% 16%,61% 14%,60% 11%,65% 7%,69% 4%)}
.bb-strike__holder{position:absolute;left:3%;top:2%;display:flex;align-items:center;gap:5px;padding:3px 8px 3px 3px;border:1px solid #c8ba91;background:#fcf2d9ee;color:#294435;border-radius:3px;pointer-events:none;font-size:12px;font-weight:760}
.bb-strike__holder img{width:28px;height:28px;object-fit:cover;object-position:48% 19%;border-radius:2px}.bb-strike__new{background:transparent;border:1px solid #9a9578;padding:6px 12px;border-radius:2px;font-size:13px!important;min-height:40px;margin-inline-start:10px}.bb-strike__mobile-note .bb-strike__new{margin-inline-start:0}
.bb-strike .bb-strike__layout .bb-strike__mount{position:relative;width:min(100%,calc(34svh - 13px),380px)}
.bb-strike__scene{position:relative}
.bb-strike__paving{display:block;width:100%;height:auto}
@media (max-width:650px) {
  .bb-strike .bb-strike__layout .bb-strike__mount{width:min(100%,calc((100svh - 173px)*.419));}
}
.bb-strike__canvas{touch-action:none!important}
.bb-strike__basin {
  position:absolute;z-index:2;right:4%;bottom:.5%;width:clamp(97px,37%,140px);
  min-height:44px;display:grid;justify-items:center;gap:0;
  padding:1px 0 4px;border:0;background:transparent;touch-action:manipulation;
}
.bb-strike__basin-art { display:block;width:100%;height:auto;filter:drop-shadow(0 2px 2px #271a1859); }
.bb-strike__basin-label {
  display:inline-flex;align-items:center;gap:5px;white-space:nowrap;
  margin-top:-3px;padding:4px 6px;color:#fff2d3;background:#342e27;
  border:1px solid #bda783;border-radius:3px;box-shadow:0 2px 2px #271b1988;
}
.bb-strike__basin-label b {font:750 12px/1.1 "Songti TC","PMingLiU",serif;}
.bb-strike__basin-label small {color:#f1c998;font:inherit;font-weight:650;font-size:10px;line-height:1.3;border-left:1px solid #aa9071;padding-left:5px;}
.bb-strike__basin.over .bb-strike__basin-label,.bb-strike__basin:focus-visible .bb-strike__basin-label {background:#543326;border-color:#ffe6aa;box-shadow:0 0 0 2px #fcba63;}
.bb-strike .bb-drag-sheet:not([hidden]) {position:fixed;display:grid;place-items:center;z-index:12;pointer-events:none;transform:translate(-50%,-65%) rotate(9deg);font:700 11px serif;color:#7c4328;border:1px solid #b59452;background:#ffdf8c;box-shadow:2px 3px 7px #372c2b55;width:38px;height:50px;}
.bb-strike__raised-shoe{position:absolute;inset:0;pointer-events:none;opacity:0;background:url('./assets/strike-lift.jpg') center/100% 100% no-repeat;clip-path:polygon(81% 0,100% 0,100% 16%,94% 20%,82% 25%,74% 30%,59% 36%,46% 40%,38% 41%,34% 39%,34% 34%,38% 30%,49% 25%,61% 19%,64% 16%,61% 14%,60% 11%,65% 7%,69% 4%);transform-origin:87% 4%}
.bb-strike__canvas.is-held .bb-strike__raised-shoe{opacity:1;transform:translateY(calc(var(--height)*-3%)) rotate(calc(var(--height)*14deg))}
.bb-strike.is-burning .bb-strike__paperword,.bb-strike.is-burning .bb-strike__marks,.bb-strike.is-burning .bb-strike__basin-art {visibility:hidden;}
.bb-strike__fold:not([hidden]) {position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1;}
.bb-strike.is-burning .bb-strike__holder {z-index:2;}
.bb-strike.is-burning .bb-strike__basin {cursor:wait;}

/* The stack in the framed photograph sits against the right edge of the table. */
.bb-strike__stack {
  position:absolute; z-index:2; right:0; top:28.5%; width:22%; height:10%;
  min-width:44px; min-height:44px; padding:0; border:0; background:transparent;
  display:flex; align-items:flex-end; justify-content:flex-end; touch-action:manipulation;
}
.bb-strike__stack span {
  color:#fff1cc; background:#60472fe8; border:1px solid #e6c58c; border-radius:2px;
  font:700 11px/1.1 var(--sans); padding:3px 5px;
}

.bb-strike__basin {touch-action:none!important;-webkit-touch-callout:none;user-select:none}
.bb-strike__basin-label {position:relative}
.bb-strike__basin[data-offering-state="hold"] .bb-strike__basin-label::after {
  content:"";position:absolute;left:3px;right:3px;bottom:0;height:2px;border-radius:1px;
  background:#ffd07c;transform-origin:left;transform:scaleX(var(--offering-progress,0));pointer-events:none;
}

.bb-strike__tools {display:flex;align-items:center;gap:3px;flex:none}
.bb-strike__tools .bb-stall-language {display:grid;place-items:center;border:0;background:transparent;padding:0}
.bb-strike .bb-strike__bridge {color:var(--bb-ink)}
.bb-strike__place {text-align:center}
html:not(:lang(zh)) .bb-strike h2 {font-size:clamp(60px,6.5vw,94px);letter-spacing:-.045em}
html:not(:lang(zh)) .bb-strike__basin-label {flex-direction:column;gap:1px;max-width:100%;text-align:center;white-space:normal}
html:not(:lang(zh)) .bb-strike__basin-label small {border:0;padding-left:0}
.bb-strike__back {white-space:nowrap;flex:none}
html:not(:lang(zh)) .bb-strike__place {font-size:clamp(12px,3.2vw,14px);letter-spacing:.025em;min-width:0}
html:lang(ko) .bb-strike__basin-label,html:lang(ko) .bb-strike__place {word-break:keep-all}
