/* V306: intrinsic-height cards, robust narrow columns, and layered portraits. */
body.titanium-studio #workspace #matchList{
 display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:max-content;
 align-content:start;gap:10px;max-height:66vh;overflow-y:auto;overflow-x:hidden;
 padding:3px;scrollbar-gutter:stable;min-width:0;
}
body.titanium-studio #workspace #matchList .library-match{
 display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;
 align-content:start;align-items:start;justify-content:stretch;gap:10px;
 flex:none;height:auto;min-height:104px;max-height:none;min-width:0;width:100%;
 padding:14px;text-align:left;white-space:normal;overflow-wrap:anywhere;
}
body.titanium-studio #workspace #matchList .library-match>div{
 display:block;flex:none;min-width:0;width:100%;height:auto;
}
body.titanium-studio #workspace #matchList .library-match strong{
 display:block;font-size:14px;line-height:1.4;white-space:normal;overflow-wrap:anywhere;
 margin:0;position:static;
}
body.titanium-studio #workspace #matchList .library-match small{
 display:block;line-height:1.5;font-size:11px;margin:7px 0 0;white-space:normal;overflow-wrap:anywhere;
}
body.titanium-studio #workspace #matchList .library-match>.tag{
 position:static;justify-self:start;align-self:start;max-width:100%;white-space:normal;line-height:1.2;
}
body.titanium-studio #workspace #matchList .library-match[hidden]{display:none!important}
.titanium-studio :is(.ts-matches,.ts-content,.control-grid,.score-pair,.link-grid,.ts-tabs,.ts-toolbar-actions){min-width:0}
.titanium-studio .score-pair,.titanium-studio .link-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.titanium-studio #workspace :is(.panel,.player-control,.event-heading,.section-head){min-width:0;max-width:100%}
.titanium-studio .event-heading{flex-wrap:wrap}
.titanium-studio .event-heading>div{flex:1 1 180px;min-width:0}
.titanium-studio .event-heading h2{margin:8px 0 16px;white-space:normal;overflow-wrap:anywhere}
.titanium-studio .event-heading .race-chip{flex:0 0 auto;max-width:100%}
.titanium-studio .ts-tabs{flex-wrap:wrap}
.titanium-studio #workspace .ts-tabs button{flex:1 1 95px;white-space:normal;min-width:0;overflow-wrap:anywhere}
.titanium-studio .ts-portrait{position:relative;display:block;flex:none;isolation:isolate}
.titanium-studio .ts-portrait>b{position:absolute;inset:0;display:grid;place-items:center;margin:0;z-index:0}
.titanium-studio .ts-portrait>img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;z-index:1;background:#313a40}
.titanium-studio #workspace .player-control h3{height:auto;max-height:none;white-space:normal;line-height:1.35;margin:10px 0}
.titanium-studio .group-list{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;grid-auto-rows:max-content}
.titanium-studio .group-row{min-width:0;max-width:100%;height:auto;align-items:flex-start;flex-wrap:wrap}
.titanium-studio .group-row>span:first-child{flex:1 1 180px}
.titanium-studio .group-row .tag{flex:none;white-space:normal}
.titanium-studio .ticker-match-choices{align-content:start;grid-auto-rows:max-content}
.titanium-studio .ticker-choice{height:auto;min-width:0;align-items:start}
.titanium-studio .ticker-choice-copy :is(strong,small){white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.45}
.titanium-studio #workspace .ticker-choice input[type=checkbox]{min-height:18px;height:18px;width:18px;margin:2px 0}
.titanium-studio .ticker-choice-score{align-self:center}
.titanium-studio :is(.inline-actions,.section-head,.ticker-link-row){flex-wrap:wrap;min-width:0}
.titanium-studio #workspace :is(input,select){max-width:100%;min-width:0}
.titanium-studio #workspace .match-actions button{white-space:normal;overflow-wrap:anywhere;max-width:100%}
@media(min-width:901px) and (max-width:1400px){
 .titanium-studio .ts-shell{grid-template-columns:110px minmax(0,1fr);gap:14px}
 .titanium-studio .ts-matches{grid-template-columns:minmax(240px,280px) minmax(0,1fr);gap:14px}
 .titanium-studio .score-pair,.titanium-studio .link-grid{grid-template-columns:minmax(0,1fr)}
 .titanium-studio .ts-toolbar{flex-wrap:wrap}
 .titanium-studio .ts-toolbar-actions{flex-wrap:wrap}
}
@media(max-width:900px){
 body.titanium-studio #workspace #matchList{max-height:none;overflow:visible;scrollbar-gutter:auto}
 .titanium-studio .group-list,.titanium-studio .link-grid{grid-template-columns:minmax(0,1fr)}
 .titanium-studio .ts-toolbar-actions{flex-wrap:wrap}
 .titanium-studio #workspace .ts-toolbar-actions button{flex:1 1 140px}
}
@media(max-width:480px){
 .titanium-studio .score-pair{grid-template-columns:minmax(0,1fr)}
 .titanium-studio .ticker-choice{grid-template-columns:auto minmax(0,1fr)}
 .titanium-studio .ticker-choice-score{grid-column:2;justify-self:start}
}

/* V307: Matches is the sole Studio workspace. Legacy direct links remain valid. */
body.titanium-studio .ts-shell{grid-template-columns:minmax(0,1fr)!important}body.titanium-studio .ts-nav,body.titanium-studio #groupsPanel,body.titanium-studio #tickerBuilder,body.titanium-studio #createGroup,body.titanium-studio #groupEditor{display:none!important}
