.bridge-delegated{max-width:1100px;margin:auto;padding:24px 0 40px}
.bridge-editor .bridge-game-link{float:right;min-height:44px;display:inline-flex;align-items:center}
#bridge-message{min-height:44px;display:flex;align-items:center;color:var(--muted)}
#bridge-message[data-error=true]{color:var(--bad)}
.bridge-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;clear:both}
.bridge-toolbar span{margin-right:auto;min-width:0;overflow-wrap:anywhere}
.bridge-editor button:not(.primary){border:1px solid var(--line);background:var(--panel);color:var(--text)}
.bridge-editor button:not(.primary):hover:not(:disabled){background:var(--soft)}
.bridge-editor :is(button,input,select){min-height:44px}
.bridge-editor input[type=checkbox]{min-height:18px;margin:0}
.bridge-editor .bridge-layout{display:grid;grid-template-columns:minmax(150px,210px) minmax(0,1fr);gap:16px;margin:16px 0}
.bridge-layout aside{display:flex;flex-direction:column;gap:8px;min-width:0}
.bridge-layout aside :is(input,select){margin:0}
#bridge-cards{max-height:620px;overflow:auto;display:grid;gap:5px;align-content:start;padding:4px}
#bridge-cards button{text-align:left;min-width:0;padding-inline:10px}
#bridge-cards button[aria-current=true]{background:var(--accent-soft);border-color:var(--line-strong);color:var(--accent-strong)}
#bridge-cards small{float:right;color:var(--muted)}
#bridge-card,.bridge-editor details{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:16px}
#bridge-card h3{margin:0 0 12px;font-size:17px}
.bridge-editor .fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(160px,100%),1fr));gap:8px 12px}
.bridge-editor label{margin:0}
.bridge-editor .check{display:flex;flex-direction:row;align-items:center;gap:8px;min-height:40px}
.bridge-editor fieldset{border:1px solid var(--line);border-radius:8px;margin-top:14px;padding:12px}
.bridge-editor legend{padding:0 6px;color:var(--accent-strong)}
.bridge-editor details{margin:12px 0}
.bridge-editor summary{min-height:28px;font-weight:600}
.bridge-editor details[open]>summary{margin-bottom:8px}
#bridge-history>div,#bridge-grants>div{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;padding:8px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
#bridge-grant-form{display:flex;align-items:end;gap:8px;flex-wrap:wrap}
.bridge-editor dialog{width:min(850px,94vw);max-height:85dvh;background:var(--panel);border:1px solid var(--line);border-radius:10px;color:var(--text)}
.bridge-editor dialog::backdrop{background:rgb(0 0 0 / .38)}
.bridge-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
.bridge-editor pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}
@media(max-width:680px){
  .bridge-editor .bridge-layout{grid-template-columns:1fr;gap:12px}
  .bridge-layout aside{display:grid;grid-template-columns:1fr 1fr}
  #bridge-cards{grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr));max-height:156px}
  #bridge-cards small{display:none}
  .bridge-toolbar span{width:100%}
  .bridge-toolbar button{padding-inline:10px}
  .bridge-editor details,#bridge-card{padding:10px}
}
