
.bwl-shell{
  --bwl-card:#fff8ebeb;--bwl-line:#dfc8a8;--bwl-chip:#f6ecdb;--bwl-chip-line:#e3d1b5;--bwl-chip-text:#5b4a3b;
  --bwl-ink:#334339;--bwl-muted:#5d6b61;--bwl-sage:#5b785f;--bwl-sage-deep:#46674e;
  --bwl-terra:#a75d4a;--bwl-terra-deep:#8b473a;--bwl-ochre:#d6a260;
  --bwl-quiet:#f8eee6;--bwl-quiet-text:#8f5548;--bwl-quiet-line:#e6cfc1;
  --bwl-sheet:#fdf6e6;--bwl-sheet-line:#d9c19c;
  position:relative;max-width:660px;margin:auto;color:var(--bwl-ink);font-family:Arial,Helvetica,sans-serif;
  padding:clamp(12px,2vw,22px);border-radius:18px;border:1px solid #c9a676;
  background:#c99a58 url('/assets/playmat-bowling.webp') center/cover no-repeat;
  box-shadow:0 7px 22px #7c5b3833
}
.bwl-shell *{box-sizing:border-box}


.bwl-card{background:var(--bwl-card);border:1px solid var(--bwl-line);border-radius:10px;box-shadow:0 2px 6px #5a43301f}
.bwl-bar{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:8px;margin:0 0 8px}
.bwl-shell button,.bwl-shell select{font:700 var(--fs-14,14px) Arial,Helvetica,sans-serif;min-height:44px;border-radius:10px;cursor:pointer;border:1px solid transparent}
.bwl-seg{display:inline-flex}
.bwl-seg button{background:var(--bwl-quiet);color:var(--bwl-quiet-text);border-color:var(--bwl-quiet-line);padding:6px 12px;border-radius:0}
.bwl-seg button+button{margin-left:-1px}
.bwl-seg button:first-child{border-radius:10px 0 0 10px}
.bwl-seg button:last-child{border-radius:0 10px 10px 0}
.bwl-seg button:hover{background:#f1e2d6}
.bwl-opp{display:inline-flex;align-items:center;gap:6px;font-size:var(--fs-12,12px);font-weight:700;color:var(--bwl-chip-text)}
.bwl-opp[hidden]{display:none!important}
.bwl-opp select{background:var(--bwl-quiet);color:var(--bwl-quiet-text);border-color:var(--bwl-quiet-line);padding:6px 8px}
.bwl-primary{margin-left:auto;padding:8px 16px}
.bwl-shell button:focus-visible,.bwl-shell select:focus-visible,.bwl-rules summary:focus-visible{outline:3px solid var(--bwl-ink);outline-offset:2px}


.bwl-sheet{padding:6px 8px 4px;margin:0 0 8px;background:var(--bwl-sheet)}
.bwl-row{padding:3px 4px 5px;border-radius:8px;border-left:4px solid transparent}
.bwl-row+.bwl-row{margin-top:3px}
.bwl-row.is-active{background:#f6e7cc;border-left-color:var(--bwl-sage)}
.bwl-row.is-cpu.is-active{border-left-color:var(--bwl-terra)}
.bwl-pname{display:flex;align-items:center;gap:6px;font-size:var(--fs-12,12px);font-weight:700;color:var(--bwl-chip-text);margin:0 0 3px}
.bwl-pname small{font-weight:400;font-size:var(--fs-12,12px);color:var(--bwl-muted)}
.bwl-dot{width:10px;height:10px;border-radius:50%;background:var(--bwl-sage);flex:none}
.is-cpu .bwl-dot{background:var(--bwl-terra)}
.bwl-tot{margin-left:auto;font:400 var(--fs-20,20px)/1 Georgia,serif;color:var(--bwl-ink)}
.bwl-frames{display:grid;grid-template-columns:repeat(9,minmax(0,1fr)) minmax(0,1.42fr);border:1.5px solid var(--bwl-sheet-line);border-radius:6px;overflow:hidden;background:#fffbf2}
.bwl-frame{position:relative;display:grid;grid-template-rows:auto auto;min-width:0;border-left:1px solid var(--bwl-sheet-line)}
.bwl-frame:first-child{border-left:0}
.bwl-frame.is-cur{background:#f9ead2}
.bwl-no{position:absolute;left:3px;top:1px;font-size:var(--fs-12,12px);line-height:1;color:#77654f;font-family:Arial,Helvetica,sans-serif}
.bwl-boxes{display:flex;justify-content:flex-end;height:20px}
.bwl-box{width:17px;max-width:50%;display:inline-flex;align-items:center;justify-content:center;border-left:1px solid var(--bwl-sheet-line);border-bottom:1px solid var(--bwl-sheet-line);font:700 var(--fs-12,12px)/1 Georgia,serif;color:var(--bwl-chip-text)}
.is-tenth .bwl-box{max-width:33.4%}
.bwl-box.is-mark{color:var(--bwl-terra-deep)}
.bwl-sum{display:flex;align-items:center;justify-content:center;height:22px;font:400 var(--fs-16,16px)/1 Georgia,serif;color:var(--bwl-ink)}
.bwl-foot{display:flex;justify-content:space-between;gap:8px;padding:5px 4px 1px;font-size:var(--fs-12,12px);color:var(--bwl-muted)}
.bwl-foot b{font:400 var(--fs-16,16px) Georgia,serif;color:var(--bwl-sage-deep)}

.bwl-status{margin:0 0 8px;padding:9px 12px;font-size:var(--fs-14,14px);line-height:1.45;min-height:3.1em}
.bwl-status.is-result{font-family:Georgia,serif;font-size:var(--fs-16,16px);color:var(--bwl-terra-deep);background:#fff6e4;border-color:var(--bwl-ochre)}


.bwl-lanewrap{position:relative;width:100%;border-radius:14px;overflow:hidden;box-shadow:0 0 0 3px #f3e3c4,0 6px 16px #4a382855;background:#8d6a48}
.bwl-lane{display:block;width:100%;height:560px;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;cursor:grab}
.bwl-lane:focus{outline:none}
.bwl-lane:focus-visible{outline:3px solid var(--bwl-ink);outline-offset:-3px}
.bwl-meter{position:absolute;left:10px;right:10px;top:10px;display:grid;grid-template-columns:auto 1fr;align-items:center;gap:6px 10px;padding:8px 12px;font-size:var(--fs-12,12px);font-weight:700;color:var(--bwl-chip-text)}
.bwl-meter[hidden]{display:none}
.bwl-power,.bwl-hook{position:relative;height:14px;border-radius:7px;background:var(--bwl-chip);border:1px solid var(--bwl-chip-line);overflow:hidden}
.bwl-power i{position:absolute;left:0;top:0;bottom:0;width:0;background:var(--bwl-terra);border-radius:7px}
.bwl-hook::before{content:"";position:absolute;left:50%;top:2px;bottom:2px;width:1px;background:#b39c80}
.bwl-hook i{position:absolute;top:1px;bottom:1px;width:10px;margin-left:-5px;left:50%;background:var(--bwl-sage-deep);border-radius:5px}

.bwl-rules{margin:10px 0 0;padding:8px 12px;font-size:var(--fs-14,14px);line-height:1.5}
.bwl-rules summary{cursor:pointer;font-weight:700;min-height:28px;display:flex;align-items:center}
.bwl-rules ul{margin:6px 0 2px;padding-left:1.2em}
.bwl-rules li{margin:3px 0}

@media (max-width:520px){
  .bwl-shell{padding:8px}
  .bwl-bar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;padding:6px;margin:0 0 6px}
  .bwl-seg{display:flex;min-width:0;grid-column:1/-1}
  .bwl-seg button{flex:1 1 0;font-size:var(--fs-12,12px);padding:6px 6px}
  .bwl-opp{grid-row:2;grid-column:1;font-size:var(--fs-12,12px)}
  .bwl-opp select{padding:6px 4px}
  .bwl-primary{grid-row:2;grid-column:2;margin-left:0;padding:6px 12px;font-size:var(--fs-14,14px)}
  .bwl-sheet{padding:4px 5px 2px;margin:0 0 6px}
  .bwl-row{padding:2px 2px 3px;border-left-width:3px}
  .bwl-pname{margin:0 0 2px}
  .bwl-tot{font-size:var(--fs-18,18px)}
  .bwl-boxes{height:18px}
  .bwl-box{width:15px;font-size:var(--fs-12,12px)}
  .bwl-sum{height:19px;font-size:var(--fs-12,12px)}
  .bwl-no{display:none}
  .bwl-status{font-size:var(--fs-14,14px);padding:6px 10px;min-height:calc(2.9em + 12px);margin:0 0 6px}
  .bwl-lanewrap{border-radius:12px}
}
@media (prefers-reduced-motion:reduce){
  .bwl-shell *{animation:none!important;transition:none!important}
}

.bwl-primary{background:var(--akzent);color:#fff}
.bwl-primary:hover{background:var(--akzent-hover)}
.bwl-seg button[aria-pressed="true"]{background:var(--akzent);border-color:var(--akzent);color:#fff}
