/* Battleship 2026: setup/editor only; the match screen remains unchanged. */
.sea-page #sea-setup{width:min(100%,1470px);max-width:1470px;margin:0 auto;padding:16px 24px 22px;min-width:0}
.sea-page #sea-setup .sea-setup-header{width:auto;margin:0 0 13px;display:flex;align-items:center}
.sea-page #sea-setup .sea-setup-header h1{margin:0;color:#f3f8f1;font-size:clamp(27px,2.5vw,38px);font-weight:680;letter-spacing:-.035em;line-height:1.16}
.sea-page #sea-setup .sea-setup-layout{display:grid;width:100%;margin:0;grid-template-columns:minmax(0,1.08fr) minmax(310px,.92fr);gap:18px;align-items:stretch}
.sea-page #sea-setup .sea-setup-card{width:auto;margin:0;padding:20px;border:1px solid #395661;border-radius:17px;background:#112933;box-shadow:none;min-width:0}
.sea-page #sea-setup .sea-editor-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}
.sea-page #sea-setup .sea-editor-head h2,.sea-page #sea-setup .sea-settings-head h2{margin:0;font-size:clamp(20px,1.75vw,26px);font-weight:670;letter-spacing:-.03em;line-height:1.25;color:#f1f6f0}
.sea-page #sea-setup .sea-editor-counter{display:inline-flex;align-items:baseline;gap:6px;padding:8px 11px;border-radius:100px;background:#243e39;color:#c6daca;font-size:12px;white-space:nowrap}
.sea-page #sea-setup .sea-editor-counter b{font-size:16px;color:#dbf4ad}
.sea-page #sea-setup .sea-editor-modes{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:5px;background:#0a2029;border:1px solid #2d454d;border-radius:12px;margin-bottom:15px}
.sea-page #sea-setup .sea-editor-modes button{min-width:0;min-height:39px;border:0;border-radius:9px;background:transparent;color:#adc7c2;font-size:13px;font-weight:580}
.sea-page #sea-setup .sea-editor-modes button.is-active{background:#f2f6ed;color:#1a2b29;font-weight:700}
.sea-page #sea-setup .sea-list-editor{display:flex;flex-direction:column;min-height:0;min-width:0}
.sea-page #sea-setup .sea-list-editor label{font-size:13px;color:#d7e3de;font-weight:630;margin-bottom:9px}
.sea-page #sea-setup #sea-tasks-input{display:block;width:100%;height:285px;min-height:125px;resize:vertical;overflow:auto;border:1px solid #648079;border-radius:11px;padding:14px 15px;background:#0a2029;color:#f3f8f4;line-height:1.55;font-size:14px;font-weight:440;outline-offset:2px;white-space:pre-wrap}
.sea-page #sea-setup #sea-tasks-input::placeholder{color:#879f9b}
.sea-page #sea-setup :is(input,textarea,select):focus-visible{outline:2px solid #a9d85d;outline-offset:2px}
.sea-page #sea-setup .sea-editor-hint{flex:0 0 auto;font-size:11px;line-height:1.45;color:#a7beb9;margin:10px 0 0}
.sea-page #sea-setup .sea-editor-hint code{color:#d9efbc;background:#2a443f;border-radius:4px;padding:1px 5px}
.sea-page #sea-setup .sea-card-editor{display:flex;flex-direction:column;gap:10px;min-height:0}
.sea-page #sea-setup .sea-card-editor.hidden{display:none}
.sea-page #sea-setup .sea-cards-list{display:grid;gap:11px;max-height:285px;overflow:auto;padding-right:5px;scrollbar-width:thin}
.sea-page #sea-setup .sea-task-card{border:1px solid #44646b;border-radius:12px;padding:12px;background:#0b222c;display:grid;gap:7px}
.sea-page #sea-setup .sea-task-card-head{display:flex;justify-content:space-between;align-items:center;gap:10px;color:#a7c4bd;font-size:12px;font-weight:650}
.sea-page #sea-setup .sea-task-card-head button{border:0;border-radius:8px;background:#274049;color:#e1efeb;min-width:30px;min-height:29px}
.sea-page #sea-setup .sea-task-card label{font-size:11px;color:#b3cfca}
.sea-page #sea-setup .sea-task-card :is(input,textarea){font-size:13px;font-weight:450;display:block;width:100%;padding:9px 11px;border:1px solid #5a7779;border-radius:8px;background:#102e35;color:#f2f8f2;resize:vertical}
.sea-page #sea-setup .sea-task-card textarea{min-height:66px}
.sea-page #sea-setup .sea-secondary-action{border:1px solid #55746e;background:#18353c;color:#e3f4ea;border-radius:9px;min-height:37px;padding:8px 12px;font-size:12px;font-weight:650}
.sea-page #sea-setup .sea-editor-actions{display:flex;flex:0 0 auto;flex-wrap:wrap;gap:8px 15px;align-items:center;position:relative;margin-top:14px;padding-top:5px;min-height:34px}
.sea-page #sea-setup .sea-editor-actions :is(button,.sea-file-upload){border:0;background:transparent;padding:6px 0;color:#c0dfb0;font-size:12px;line-height:1.4;font-weight:650;cursor:pointer}
.sea-page #sea-setup .sea-editor-actions :is(button,.sea-file-upload):hover{text-decoration:underline;text-underline-offset:3px}
.sea-page #sea-setup .sea-editor-message{min-height:17px;font-size:12px;color:#d6ecc3;line-height:1.4;margin-top:7px}
.sea-page #sea-setup .sea-library{margin-top:14px;border:1px solid #36555a;border-radius:11px;background:#10252d;min-width:0;scrollbar-width:thin}
.sea-page #sea-setup .sea-library summary{list-style:none;display:flex;justify-content:space-between;align-items:center;cursor:pointer;min-height:42px;padding:10px 13px;color:#f0f6ed;font-size:13px;font-weight:650}
.sea-page #sea-setup .sea-library summary::-webkit-details-marker{display:none}
.sea-page #sea-setup .sea-library[open] summary{border-bottom:1px solid #35555a}
.sea-page #sea-setup .sea-library-controls{padding:12px 13px 0}
.sea-page #sea-setup .sea-library-controls label{display:block;color:#b7d0ca;font-size:11px;margin:0 0 7px}
.sea-page #sea-setup .sea-library-controls input{width:100%;min-height:39px;background:#0b2028;border:1px solid #537274;border-radius:8px;color:#f3faf4;padding:8px 11px;font-size:13px}
.sea-page #sea-setup .sea-library-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px}
.sea-page #sea-setup .sea-library-filters select{width:100%;min-width:0;min-height:37px;background:#18353c;border:1px solid #537274;border-radius:8px;color:#ecf6ed;font-size:12px;padding:8px}
.sea-page #sea-setup .sea-library-results{padding:8px 13px;max-height:230px;overflow:auto;scrollbar-width:thin}
.sea-page #sea-setup .sea-library-result{padding:11px 0;border-bottom:1px solid #31505a;display:flex;gap:11px;justify-content:space-between;align-items:center}
.sea-page #sea-setup .sea-library-result:last-child{border:0}
.sea-page #sea-setup .sea-library-result-info{min-width:0}
.sea-page #sea-setup .sea-library-result strong{display:block;color:#ecf4ee;font-size:12px;overflow-wrap:anywhere;font-weight:650}
.sea-page #sea-setup .sea-library-result small{color:#9dbcb5;font-size:11px;line-height:1.55}
.sea-page #sea-setup .sea-library-result button{flex:none;min-height:32px;border:1px solid #87a67e;background:#294638;color:#e4f3db;border-radius:8px;font-size:11px;padding:6px 10px;font-weight:650}
.sea-page #sea-setup .sea-library-results>.sea-library-empty{font-size:12px;color:#bed2cc;margin:10px 0}
.sea-page #sea-setup .sea-library-footer{border-top:1px solid #36555a;padding:9px 13px;display:flex;justify-content:space-between;align-items:center;gap:8px}
.sea-page #sea-setup .sea-library-footer button{border:1px solid #526e68;background:#19323b;color:#e4f1e5;border-radius:7px;padding:6px 9px;font-size:11px}
.sea-page #sea-setup .sea-library-footer button:disabled{opacity:.35}
.sea-page #sea-setup #sea-library-pages{font-size:11px;color:#c1d4ce;font-variant-numeric:tabular-nums}
.sea-page #sea-setup .sea-settings{display:flex;flex-direction:column}
.sea-page #sea-setup .sea-settings-head{background:#123c48;border:1px solid #477482;padding:11px 14px;border-radius:12px;display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px;min-height:70px}
.sea-page #sea-setup .sea-settings-head h2{font-size:clamp(19px,1.7vw,24px)}
.sea-page #sea-setup .sea-mini-board{position:relative;display:block;flex:0 0 133px;height:53px;border-radius:5px;border:1px solid #b6e8e6a1;background:repeating-linear-gradient(0deg,transparent 0,transparent 12px,#a6d6d442 12px,#a6d6d442 13px),repeating-linear-gradient(90deg,#126073,#126073 12px,#338ba020 12px,#338ba020 13px)}
.sea-page #sea-setup .sea-mini-board i{display:block;position:absolute}
.sea-page #sea-setup .sea-mini-ship{height:6px;border-radius:3px;background:#d8e8df;border:1px solid #f4ffeb}
.sea-page #sea-setup .sea-mini-ship-a{top:12px;left:19px;width:38px}
.sea-page #sea-setup .sea-mini-ship-b{bottom:10px;right:19px;width:26px;transform:rotate(90deg)}
.sea-page #sea-setup .sea-mini-hit{top:28px;left:78px;width:8px;height:8px;border-radius:50%;background:#d9f35f;box-shadow:0 0 0 3px #d8f35f26}
.sea-page #sea-setup .sea-teams{display:grid;grid-template-columns:1fr 1fr;column-gap:12px;row-gap:8px}
.sea-page #sea-setup .sea-teams label{font-size:12px;color:#b9d3ce;font-weight:650}
.sea-page #sea-setup .sea-teams label:nth-of-type(1){grid-column:1;grid-row:1}
.sea-page #sea-setup .sea-teams label:nth-of-type(2){grid-column:2;grid-row:1}
.sea-page #sea-setup .sea-teams input{display:block;width:100%;min-width:0;border:1px solid #597e7e;border-radius:9px;background:#0a222c;color:#f3f8f2;padding:10px 12px;min-height:43px;font-size:14px}
.sea-page #sea-setup .sea-teams input#sea-name-a{grid-column:1;grid-row:2;border-left:4px solid #ff786a}
.sea-page #sea-setup .sea-teams input#sea-name-b{grid-column:2;grid-row:2;border-left:4px solid #7ba5ff}
.sea-page #sea-setup .sea-settings .sea-check{padding:13px 12px;margin:17px 0 0;min-height:50px}
.sea-page #sea-setup .sea-settings .sea-start-group{margin-top:auto;padding-top:15px}
.sea-page #sea-setup .sea-question-count{margin:0 0 12px;padding:11px 0;border-top:1px solid #405b60;text-transform:none;font-weight:600;font-size:13px;letter-spacing:0}
.sea-page #sea-setup .sea-question-count strong{font-size:18px;color:#e1f5b7}
.sea-page #sea-setup .sea-start{display:flex;align-items:center;justify-content:space-between;gap:15px;background:#d0f15c;color:#182a20;font-size:15px;font-weight:720}
.sea-page #sea-setup .sea-start:disabled{opacity:.48}
.sea-page #sea-setup .sea-start span{font-size:19px}
@media(min-width:1060px) and (min-height:700px){
 .sea-page #sea-setup{height:calc(100dvh - 76px);min-height:0;overflow:hidden;display:flex;flex-direction:column}
 .sea-page #sea-setup .sea-setup-header{flex:0 0 auto}
 .sea-page #sea-setup .sea-setup-layout{flex:1 1 auto;min-height:0}
 .sea-page #sea-setup .sea-setup-card{min-height:0;overflow:hidden}
 .sea-page #sea-setup .sea-editor{display:flex;flex-direction:column}
 .sea-page #sea-setup .sea-list-editor{flex:1 1 auto;min-height:0}
 .sea-page #sea-setup .sea-editor-head,.sea-page #sea-setup .sea-editor-modes{flex:0 0 auto}
 .sea-page #sea-setup .sea-editor-actions,.sea-page #sea-setup .sea-editor-message{flex:0 0 auto}
 .sea-page #sea-setup #sea-tasks-input{flex:1 1 auto;min-height:105px;height:auto;resize:none}
 .sea-page #sea-setup .sea-card-editor:not(.hidden){flex:1 1 auto;overflow:hidden}
 .sea-page #sea-setup .sea-cards-list{flex:1 1 auto;min-height:0;max-height:none}
 /* The library uses the spare settings-column space. Never shrink the editor to accommodate it. */
 .sea-page #sea-setup .sea-settings>.sea-library{flex:0 0 auto}
 .sea-page #sea-setup .sea-settings>.sea-library[open]{flex:1 1 auto;min-height:138px;overflow-y:auto;overflow-x:hidden}
 .sea-page #sea-setup .sea-settings>.sea-start-group{flex:0 0 auto;margin-top:auto}
 .sea-page #sea-setup .sea-library[open] .sea-library-results{max-height:140px}
 .sea-page #sea-setup .sea-settings>.sea-library:not([open]){flex:0 0 auto}
}
/* Compact landscape desktops: keep both the kickoff and resume controls fully visible. */
@media (min-width:1060px) and (min-height:700px) and (max-height:780px){
 .sea-page #sea-setup{padding-top:10px;padding-bottom:10px}
 .sea-page #sea-setup .sea-setup-header{margin-bottom:9px}
 .sea-page #sea-setup .sea-setup-header h1{font-size:28px}
 .sea-page #sea-setup .sea-setup-card{padding:14px 17px}
 .sea-page #sea-setup .sea-settings-head{min-height:58px;margin-bottom:10px;padding:7px 12px}
 .sea-page #sea-setup .sea-mini-board{height:40px}
 .sea-page #sea-setup .sea-teams{row-gap:5px}
 .sea-page #sea-setup .sea-teams input{min-height:37px;padding:7px 10px}
 .sea-page #sea-setup .sea-settings .sea-check{min-height:38px;padding:7px 9px;margin-top:7px}
 .sea-page #sea-setup .sea-library{margin-top:8px}
 .sea-page #sea-setup .sea-settings>.sea-library[open]{min-height:91px}
 .sea-page #sea-setup .sea-settings .sea-start-group{padding-top:7px}
 .sea-page #sea-setup .sea-question-count{margin-bottom:6px;padding:7px 0}
 .sea-page #sea-setup .sea-start{min-height:43px;padding:10px 12px}
 .sea-page #sea-setup .sea-resume{min-height:34px;margin-top:6px;padding:7px 11px}
}
@media(max-width:1059px),(max-height:699px){
 .sea-page #sea-setup{height:auto;max-height:none;overflow:visible}
 .sea-page #sea-setup .sea-setup-layout{grid-template-columns:minmax(0,1fr)}
 .sea-page #sea-setup .sea-list-editor #sea-tasks-input{height:230px;resize:vertical}
}
/* Short, narrow laptops: let the whole setup scroll instead of clipping a resume button. */
@media (min-width:1060px) and (max-width:1199px) and (min-height:700px) and (max-height:739px){
 .sea-page #sea-setup{height:auto;max-height:none;overflow:visible}
 .sea-page #sea-setup .sea-setup-layout{flex:none;min-height:auto}
 .sea-page #sea-setup .sea-setup-card{height:auto;min-height:auto;overflow:visible}
 .sea-page #sea-setup .sea-list-editor{flex:0 0 auto}
 .sea-page #sea-setup #sea-tasks-input{flex:0 0 auto;height:230px;min-height:150px;resize:vertical}
 .sea-page #sea-setup .sea-settings>.sea-library[open]{flex:0 0 auto;min-height:160px;max-height:330px;overflow-y:auto}
}
@media(max-width:650px){
 .sea-page #sea-setup{padding:15px 12px 28px}
 .sea-page #sea-setup .sea-setup-layout{gap:12px}
 .sea-page #sea-setup .sea-setup-card{padding:16px;border-radius:14px}
 .sea-page #sea-setup .sea-settings-head{min-height:60px}
 .sea-page #sea-setup .sea-mini-board{flex-basis:109px;height:43px}
 .sea-page #sea-setup .sea-setup-header h1{font-size:28px}
 .sea-page #sea-setup .sea-editor-counter{padding:6px 8px;font-size:11px}
 .sea-page #sea-setup .sea-library-filters{grid-template-columns:1fr 1fr}
}
@media(max-width:370px){
 .sea-page #sea-setup .sea-teams{grid-template-columns:minmax(0,1fr)}
 .sea-page #sea-setup .sea-teams label:nth-of-type(n),.sea-page #sea-setup .sea-teams input#sea-name-a,.sea-page #sea-setup .sea-teams input#sea-name-b{grid-column:1;grid-row:auto}
 .sea-page #sea-setup .sea-editor-actions{gap:7px 11px}
 .sea-page #sea-setup .sea-mini-board{flex-basis:90px}
}
