:root{--blue:#14467a;--teal:#007c7e;--ink:#18354d;--muted:#5b6f7e;--line:#dce6ec;--soft:#f3f7fa;--danger:#a72e47;color-scheme:light}
*{box-sizing:border-box}[hidden]{display:none!important}
body{margin:0;background:#f2f6f8;color:var(--ink);font:15px/1.5 "Bricolage Grotesque",Arial,Helvetica,sans-serif;-webkit-font-smoothing:antialiased}
a{color:var(--blue);text-underline-offset:4px}button,input,select,textarea{font:inherit;color:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button{display:inline-flex;align-items:center;justify-content:center;text-align:center;gap:7px;min-height:44px;padding:11px 15px;line-height:1.3;font-weight:600;border:1px solid #ccdae4;border-radius:11px;background:#fff;cursor:pointer;touch-action:manipulation;transition:background .15s,border-color .15s,box-shadow .15s;overflow-wrap:anywhere}
button.primary{background:var(--blue);color:#fff;border-color:var(--blue);box-shadow:0 3px 8px #14467a12}button.danger{color:var(--danger);border-color:#edcdd6;background:#fff8fa}button:disabled{opacity:.6;cursor:wait}
input,select,textarea{display:block;width:100%;min-width:0;min-height:46px;padding:11px 13px;font-size:16px;line-height:1.5;border:1px solid #ccdae4;border-radius:10px;background:#fff;box-shadow:0 1px 2px #18354d04}
textarea{min-height:108px;resize:vertical}input[type=checkbox],input[type=radio]{display:inline-block;min-height:0;width:17px;height:17px;flex:none;margin:0;accent-color:var(--teal)}input[type=file]{font-size:13px;background:var(--soft);padding:10px}input::file-selector-button{font:inherit;border:0;border-radius:6px;padding:6px 9px;background:#e2ebf2;color:var(--blue);margin-right:10px}
button:focus-visible,a:focus-visible,summary:focus-visible,#players:focus-visible{outline:3px solid var(--teal);outline-offset:3px}input:focus,select:focus,textarea:focus{outline:2px solid var(--teal);outline-offset:2px;border-color:var(--teal)}
label{display:block;font-size:13px;font-weight:600;margin:18px 0 7px;color:#425c70}p{margin:8px 0 16px;line-height:1.65;color:var(--muted)}h1,h2,h3{color:var(--ink);line-height:1.2;letter-spacing:-.5px}h1{font-size:27px;margin:3px 0 5px}h2{font-size:24px;margin:0 0 10px}h3{font-size:20px;margin:0 0 10px}small{font-size:12px;color:var(--muted)}
.eyebrow{display:block;text-transform:uppercase;letter-spacing:1.5px;font-size:10px;font-weight:700;color:var(--teal)}.studio-header{padding:24px max(20px,4vw);display:flex;align-items:center;justify-content:space-between;gap:24px;background:#fff;border-top:4px solid var(--blue);border-image:linear-gradient(90deg,#14467a 25%,#74488f 25%,#74488f 50%,#4e8736 50%,#4e8736 75%,#008181 75%) 1;border-bottom:1px solid var(--line)}.studio-brand{display:flex;gap:14px;align-items:center;min-width:0}.studio-brand img{flex:none;object-fit:contain}.studio-brand p{font-size:13px;margin:0}.site-links{display:flex;gap:8px;flex-wrap:wrap}.site-links a{min-height:44px;display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border:1px solid var(--line);border-radius:10px;text-decoration:none;font-size:13px;font-weight:600;background:#f9fbfc}
main{max-width:1480px;padding:0 24px 110px;margin:28px auto}.panel{padding:26px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 4px 18px #18354d04;min-width:0}.login-card{max-width:480px;margin:8vh auto 30px;padding:32px}.login-card h2{margin:12px 0;font-size:27px}.login-card .primary{width:100%;margin-top:16px}.login-card input{letter-spacing:2px}
/* Studio sections live beside the workspace rather than above the editor. */
#workspace{display:grid;grid-template-columns:210px minmax(0,1fr);gap:26px;align-items:start}
.workspace-content{min-width:0}
.studio-sidebar{position:sticky;top:20px;min-width:0;padding:16px 10px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 4px 18px #18354d04}
.studio-sidebar summary{display:none}
.sidebar-label{margin:3px 14px 16px;color:var(--muted)}
.workspace-tabs{display:flex;flex-direction:column;gap:6px;width:100%;margin:0;padding:0}
.workspace-tabs button{position:relative;justify-content:flex-start;min-width:0;min-height:50px;width:100%;padding:12px 14px;text-align:left;font-size:14px;line-height:1.4;color:var(--muted);background:transparent;border-color:transparent;box-shadow:none}
.workspace-tabs button.active{background:#edf7f6;border-color:#c8e3df;color:#14595c}
.workspace-tabs button.active::before{content:"";position:absolute;left:0;top:12px;bottom:12px;width:3px;background:var(--teal);border-radius:3px}
@media(hover:hover){.workspace-tabs button:not(:disabled):hover{background:#f1f6f8;border-color:#dce6ec}.workspace-tabs button.active:not(:disabled):hover{background:#e5f2ef;border-color:#b8d9d4}}

.layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:24px;align-items:start}.question-library{position:sticky;top:20px;padding:20px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 15px}.section-heading .eyebrow{letter-spacing:1px}.tools{display:flex;gap:9px;flex-wrap:wrap;margin:20px 0 0}.library-actions{display:grid;grid-template-columns:1fr 1fr;margin:12px 0 16px;gap:7px}.library-actions button{font-size:12px;padding:10px 8px}
.list{max-height:calc(100vh - 340px);max-height:calc(100dvh - 340px);min-height:80px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c6d5df transparent;padding:2px 3px 2px 0}.list button{display:block;text-align:left;width:100%;padding:12px;margin:0 0 7px;font-size:13px;font-weight:500;line-height:1.5;background:#f9fbfc;border-color:#edf1f4;border-left:3px solid transparent;border-radius:9px}.list button.selected{background:#edf7f6;border-color:#c8e3df;border-left-color:var(--teal);color:#14595c;font-weight:600}.list-empty{padding:16px 8px;font-size:13px}
.question-editor h2{padding-bottom:18px;border-bottom:1px solid #e7eef2;margin-bottom:20px}.question-editor h3{margin-top:28px}.question-editor>small{display:block;line-height:1.6}.row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.row>div{min-width:0}
#audiences{margin:0 0 10px;gap:7px}#audiences label{display:flex;align-items:center;gap:7px;margin:0;padding:9px 11px;border:1px solid var(--line);border-radius:9px;background:var(--soft);font-size:12px;cursor:pointer;min-height:40px}
.image-editor{padding:16px;background:#f6f9fb;border:1px dashed #d6e2e9;border-radius:12px;margin:18px 0}.image-editor>label{margin-top:0}.image-editor input+input{margin-top:9px}.image-editor button{font-size:12px;min-height:36px;padding:8px 11px;background:transparent;color:var(--muted)}.preview{max-width:100%;max-height:180px;display:block;object-fit:contain;margin:14px auto;background:#fff;border:1px solid #e1e9ee;border-radius:10px}.preview[hidden]{display:none}
.option{padding:17px;margin:12px 0;border:1px solid var(--line);border-radius:13px;background:#fbfcfd}.option>label{display:flex;align-items:center;gap:9px;margin:0 0 11px;color:var(--ink)}details{margin:12px 0 0}summary{min-height:36px;padding:7px 0;cursor:pointer;color:var(--teal);font-weight:600;font-size:13px}.option .image-editor{margin-bottom:0}
.settings-intro{margin:4px 0 24px}.settings-intro h2{font-size:29px;margin:7px 0}.settings-intro p{margin:0}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.settings-wide{grid-column:1/-1}.settings-card .section-number{display:block;font-size:11px;font-weight:700;letter-spacing:1px;color:var(--teal);margin-bottom:9px}.settings-card>p{max-width:75ch;font-size:14px}.settings-card .field-hint{font-size:12px;margin:8px 0 0;line-height:1.6}.settings-card .short-input{max-width:260px}.settings-card>.tools{padding-top:18px;border-top:1px solid #edf1f4;margin-top:22px}.tier-inputs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.tier-inputs label{display:flex;align-items:center;gap:6px;font-size:12px}.tier-inputs img{width:22px;height:25px}.moderation-tools{margin-bottom:18px}
#players{overflow-x:auto;border:1px solid var(--line);border-radius:12px}table{width:100%;border-collapse:collapse;font-size:13px}td,th{padding:13px 16px;text-align:left;border-bottom:1px solid #e7eef2}th{background:#f5f8fa;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:1px}td:first-child{font-weight:600;overflow-wrap:anywhere}td:last-child,th:last-child{text-align:right}tbody tr:last-child td{border-bottom:0}td button{font-size:12px;min-height:36px;padding:7px 11px}.pending-delete{color:#7a8995}.delete-note{display:block;color:#926033;font-size:11px;margin:4px 0}
.status{position:fixed;left:50%;bottom:20px;bottom:max(20px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:30;max-width:640px;width:calc(100% - 32px);padding:14px 18px;background:#eef8f4;border:1px solid #b7d9c9;border-radius:13px;color:#1c654b;box-shadow:0 7px 28px #18354d16;font-size:13px;line-height:1.5;font-weight:600}.status:empty{display:none}.status.error{background:#fff2f5;border-color:#edbac8;color:#9e2943}.sr-only{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(hover:hover){button:not(:disabled):hover,.site-links a:hover{background:#eef5f7;border-color:#adc5d3}button.primary:not(:disabled):hover{background:#103b69;border-color:#103b69}button.danger:not(:disabled):hover{background:#fdebf0;border-color:#dca8b6}.list button:hover{background:#eff5f8}.list button.selected:hover{background:#e5f2ef}}
@media(max-width:900px){.studio-header{padding:20px 24px}.layout{grid-template-columns:270px minmax(0,1fr);gap:18px}.panel{padding:20px}.question-library{padding:16px}.settings-grid{gap:18px}.tier-inputs{gap:8px}}
@media(max-width:760px){.studio-header{align-items:flex-start;flex-direction:column;gap:16px}.site-links{width:100%}.site-links a{flex:1}main{padding:0 16px 110px;margin:20px auto}.layout,.row,.settings-grid{grid-template-columns:minmax(0,1fr)}.settings-wide{grid-column:auto}.question-library{position:static}.list{max-height:230px;min-height:0}.question-editor{padding:20px}.login-card{margin:28px auto;padding:25px}.row{gap:0}.settings-card .short-input{max-width:none}}
@media(max-width:380px){.studio-header{padding:18px 16px}.studio-brand{gap:10px}.studio-brand img{width:36px;height:36px}h1{font-size:24px}.eyebrow{font-size:9px}.tier-inputs{gap:7px}.tier-inputs label{font-size:11px;gap:4px}.tier-inputs img{width:18px}.tier-inputs input{padding:10px 8px}.panel{padding:17px}.site-links a{font-size:12px;padding:10px}.tools>button{flex:1}.status{font-size:12px}}
.no-grid .layout,.no-grid .settings-grid{display:block}.no-grid .layout>.panel,.no-grid .settings-grid>.panel{margin-bottom:20px}.no-grid .row,.no-grid .tier-inputs{display:flex}.no-grid .row>div{width:49%;margin-right:1%}.no-grid .tier-inputs>div{width:32%;margin-right:1%}
@media(max-width:760px){.no-grid .row{display:block}.no-grid .row>div{width:100%;margin:0}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
.players-empty{padding:18px;margin:0;font-size:13px}
.settings-card:not(.settings-wide){display:flex;flex-direction:column}.settings-card:not(.settings-wide)>.tools{margin-top:auto}.settings-card:not(.settings-wide)>.field-hint,.settings-card:not(.settings-wide)>.tier-inputs{margin-bottom:22px}
/* Statistics and connection checks stay in the protected Studio workspace. */

.insights-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:4px 0 20px}.insights-header h2{font-size:29px;margin:7px 0}.insights-header p{margin:0;font-size:14px}.insights-header>button{flex:none}.insights-note{max-width:95ch;font-size:12px;line-height:1.7;margin:14px 0 22px}.field-hint{font-size:12px;line-height:1.6;color:var(--muted)}
.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:20px 0}.metric{padding:20px}.metric strong{display:block;font-size:29px;line-height:1.2;color:var(--blue);font-variant-numeric:tabular-nums}.metric span{display:block;margin-top:8px;font-size:12px;color:var(--muted)}
.insights-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,280px);gap:18px;margin-bottom:20px}.insights-filters label{margin-top:0}.insight-message{font-size:13px;color:var(--muted);margin:12px 0}.insight-message.error{color:var(--danger)}.insight-message:empty{display:none}.statistics-scroll{overflow:auto;border:1px solid var(--line);border-radius:12px;margin:15px 0;max-height:70vh;overscroll-behavior:contain}.statistics-scroll:focus-visible{outline:3px solid var(--teal);outline-offset:3px}
#statistics-table{min-width:760px}#statistics-table th{white-space:nowrap}#statistics-table thead th{position:sticky;top:0;z-index:1}#statistics-table th:last-child,#statistics-table td:last-child{text-align:left}#statistics-table td{vertical-align:top;font-variant-numeric:tabular-nums}#statistics-table .stat-question{width:40%;min-width:220px}#statistics-table .stat-question strong{display:block;font-size:13px;font-weight:600;line-height:1.55}#statistics-table .stat-question small{display:block;margin-top:6px;font-size:11px;font-weight:400}#statistics-table .stat-choices{min-width:210px;width:28%}.stat-choices>div{display:flex;justify-content:space-between;gap:15px;padding:5px 0;line-height:1.4;font-size:12px}.stat-choices span{min-width:0;overflow-wrap:anywhere}.stat-choices b{flex:none;font-variant-numeric:tabular-nums}.correct-choice{display:block;font-size:10px;font-weight:600;color:var(--teal);margin-top:2px}.accuracy-value{font-weight:700;color:var(--blue)}
.connection-summary{padding:17px 20px;border:1px solid var(--line);background:#edf3f7;color:var(--muted);border-radius:13px;line-height:1.6;font-weight:600;font-size:14px;margin:0 0 20px}.connection-summary.health-ok{background:#eef8f4;border-color:#b7d9c9;color:#1c654b}.connection-summary.health-error{background:#fff2f5;border-color:#edbac8;color:#9e2943}.connection-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.connection-card:last-child{grid-column:1/-1}.check-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.check-heading h3{font-size:18px;margin:0}.check-label{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700;white-space:nowrap;color:var(--muted)}.check-label i{width:7px;height:7px;display:inline-block;border-radius:50%;background:#899ba8}.health-ok .check-label{color:#267047}.health-ok .check-label i{background:#398b52}.health-error .check-label{color:#a72e47}.health-error .check-label i{background:#c23d59}.connection-card p{font-size:13px;line-height:1.65;margin:15px 0 9px}.connection-card>small{font-size:11px}
@media(max-width:760px){.insights-header{align-items:flex-start;flex-direction:column;gap:14px}.insights-header>button{width:100%}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.metric{padding:17px}.metric strong{font-size:25px}.insights-filters,.connection-grid{grid-template-columns:minmax(0,1fr)}.connection-card:last-child{grid-column:auto}.statistics-scroll{max-height:65vh}.check-heading{gap:8px}.check-heading h3{font-size:17px}}
@media(max-width:380px){.metric span{font-size:11px}.connection-summary{font-size:13px;padding:15px}.check-heading{align-items:flex-start;flex-direction:column;gap:8px}}
.no-grid .metric-grid,.no-grid .connection-grid,.no-grid .insights-filters{display:block}.no-grid .metric-grid>.panel,.no-grid .connection-grid>.panel{margin-bottom:14px}

.highlight-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0 18px}
.highlight-option{display:flex;align-items:flex-start;gap:10px;margin:0;padding:12px;border:1px solid #dce7ec;border-radius:12px;background:#f7fafb;cursor:pointer;min-width:0}
.highlight-option input[type="checkbox"]{width:18px;height:18px;flex:none;margin:2px 0 0;accent-color:#008181}
.highlight-option strong,.highlight-option small{display:block;line-height:1.4}
.highlight-option strong{font-size:14px;color:#183951}
.highlight-option small{font-size:12px;font-weight:400;color:#667f90;margin-top:3px}
@media(max-width:600px){.highlight-options{grid-template-columns:1fr}}

/* Calm control feedback and a consistent canvas for custom question artwork. */
button,.site-links a{transition:background-color .16s,border-color .16s,color .16s}
.image-editor .preview{padding:10px;background:linear-gradient(145deg,#fff,#edf4f8);border-color:#d7e5ec;border-radius:12px}
.metric strong,.accuracy-value,.check-label{font-variant-numeric:tabular-nums}
.status:not(:empty){animation:studio-feedback-in .2s ease-out both}
@keyframes studio-feedback-in{from{opacity:0;transform:translate(-50%,6px)}to{opacity:1;transform:translate(-50%,0)}}
@media(prefers-reduced-motion:reduce){button,.site-links a{transition:none}.status:not(:empty){animation:none}}

/* Private player directory: readable emails, compact categories, and safe narrow layouts. */
.contact-actions{display:flex;gap:9px;flex-wrap:wrap;flex:none}.contacts-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:18px}.contacts-toolbar>div{width:min(100%,420px)}.contacts-toolbar label{margin-top:0}.contacts-toolbar p{margin:0 0 12px;white-space:nowrap}.contacts-scroll{overflow:auto;border:1px solid var(--line);border-radius:12px;max-height:65vh;overscroll-behavior:contain}.contacts-scroll:focus-visible{outline:3px solid var(--teal);outline-offset:3px}#contacts-table{table-layout:fixed}#contacts-table th{position:sticky;top:0;z-index:1}#contacts-table th:first-child{width:24%}#contacts-table th:nth-child(2){width:34%}#contacts-table th:nth-child(3){width:24%}#contacts-table th:last-child{width:18%}#contacts-table{min-width:600px}#contacts-table td{vertical-align:top;overflow-wrap:anywhere;line-height:1.5}#contacts-table td:last-child,#contacts-table th:last-child{text-align:left}#contacts-more{margin-top:18px}.contacts-panel>.field-hint{margin-bottom:0}
@media(max-width:760px){.contact-actions{width:100%}.contact-actions button{flex:1}.contacts-toolbar{display:block}.contacts-toolbar>div{width:100%}.contacts-toolbar p{margin:12px 0 0}#contacts-table{font-size:12px}#contacts-table td,#contacts-table th{padding:12px 8px}.contacts-panel{padding:16px}}

.contact-download{display:inline-flex;align-items:center;min-height:44px;padding:10px 14px;border:1px solid #bfd7da;border-radius:10px;background:#f0f8f7;color:var(--teal);font-weight:600;font-size:13px;text-decoration:none;margin:0 0 12px}

.studio-video-layout{display:grid;grid-template-columns:minmax(180px,280px) minmax(0,1fr);gap:24px;align-items:start}.studio-video-preview{display:block;width:100%;aspect-ratio:1;object-fit:contain;background:#0c344e;border:1px solid #b7d2dc;border-radius:14px}.studio-video-layout label{margin-top:12px}#booth-video-progress{width:100%;height:10px;margin-top:18px;accent-color:var(--teal)}@media(max-width:600px){.studio-video-layout{grid-template-columns:1fr;gap:16px}.studio-video-preview{max-width:300px}}

/* Keep the full editor width on smaller screens; the vertical menu expands on demand. */
@media(max-width:1180px) and (min-width:901px){#question-panel.layout{grid-template-columns:minmax(0,1fr)}.question-library{position:static}.list{max-height:240px}}
@media(max-width:900px){
 #workspace{grid-template-columns:minmax(0,1fr);gap:20px}
 .studio-sidebar{position:static;padding:0}
 .studio-sidebar summary{display:flex;align-items:center;justify-content:space-between;min-height:50px;padding:14px 18px;margin:0;color:var(--blue);font-size:14px;list-style:none}
 .studio-sidebar summary::-webkit-details-marker{display:none}
 .studio-sidebar summary span{width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin:0 3px 4px 16px}
 .studio-sidebar details[open] summary span{transform:rotate(225deg);margin-top:5px}
 .studio-sidebar details[open] summary{border-bottom:1px solid var(--line)}
 .sidebar-label{display:none}
 .workspace-tabs{padding:8px;gap:3px}
 .workspace-tabs button{min-height:46px;font-size:14px;padding:11px 14px}
}
.no-grid #workspace{display:flex;align-items:flex-start;gap:26px}.no-grid .studio-sidebar{width:210px;flex:none}.no-grid .workspace-content{flex:1;min-width:0}
@media(max-width:900px){.no-grid #workspace{display:block}.no-grid .studio-sidebar{width:100%;margin-bottom:20px}}

.question-transfer{grid-column:1/-1;padding:0;margin:0;overflow:hidden}
.question-transfer>summary{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 22px;margin:0;list-style:none;font-size:15px;color:var(--ink)}
.question-transfer>summary::-webkit-details-marker{display:none}.question-transfer>summary::after{content:"+";font-size:24px;font-weight:500;color:var(--teal);flex:none}.question-transfer[open]>summary::after{content:"−"}
.question-transfer summary strong,.question-transfer summary small{display:block}.question-transfer summary small{margin-top:4px;font-weight:400;font-size:12px;color:var(--muted);line-height:1.5}
.question-transfer-body{padding:0 22px 22px;border-top:1px solid var(--line)}.question-pack-actions{margin-top:20px}.question-transfer-body .field-hint{font-size:12px;margin-top:10px}.question-import-preview{padding:20px;margin-top:22px;border:1px solid #c8e3df;border-radius:12px;background:#f4faf9}.question-import-preview h3{font-size:18px}.question-import-preview label{margin-top:12px}.question-import-preview p,.question-import-preview li{font-size:13px;line-height:1.6;overflow-wrap:anywhere}.question-import-preview ol{padding-left:20px}.question-import-preview li+li{margin-top:8px}.question-transfer .contact-download{max-width:100%;overflow-wrap:anywhere}
@media(max-width:760px){.question-transfer{grid-column:auto}.question-transfer>summary{padding:16px}.question-transfer-body{padding:0 16px 16px}.question-import-preview{padding:16px}.question-pack-actions button{flex:1}}
