/* Design view (design.js): a column on the phone, two from a wide screen (the map beside) */
button.nav-server{width:100%;background:transparent;justify-content:flex-start}
button.nav-current{width:100%;margin-top:8px}
.nav-server .nav-dot{display:none}
/* The sections of Design, under its workspace link while it is open */
.design-sections{display:flex;flex-direction:column;margin:4px 0 0 14px;padding-left:8px;border-left:1px solid #2a3a2a}
.design-sections button{background:transparent;border:0;color:#a2afa5;justify-content:flex-start;padding:9px 12px;margin:2px 0;font-weight:400}
.design-sections button:hover{background:#1c2b22}
.design-sections button.active{background:#243129;color:var(--green)}
body.design-mode .editor-heading,body.design-mode .toolbar,body.design-mode #discard,body.design-mode .stats{display:none!important}
body.design-mode #data-area{max-height:none!important;overflow:visible}
body.design-mode .editor{overflow:visible}
.design{padding:14px;display:flex;flex-direction:column;gap:14px}
.design-ships{display:flex;flex-direction:column;gap:10px}
.design-house{display:flex;flex-direction:column;gap:6px}
.design-house-name{font-size:10px;font-weight:700;letter-spacing:2px;color:#708170}
.design-ship-row{display:flex;gap:8px;overflow-x:auto;padding-bottom:6px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
.design-ship{flex:0 0 auto;flex-direction:column;gap:4px;width:92px;padding:8px 6px;scroll-snap-align:start;background:#fcfdf9}
.design-ship span{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:80px}
.design-ship small{font-size:10px;color:var(--muted);font-weight:500}
.design-ship.selected{background:#17271d;color:#fff;border-color:#17271d}
.design-ship.selected small{color:var(--green)}
.design-body{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start}
.design-col{display:flex;flex-direction:column;gap:14px;min-width:0}
.design-card{border:1px solid var(--line);border-radius:10px;padding:14px;background:#fcfdf9;display:flex;flex-direction:column;gap:10px;min-width:0}
.design-card h3{margin:0;font-size:16px}
.design-card h4{margin:4px 0 0;font-size:11px;letter-spacing:1px;text-transform:uppercase;color:#667b5c}
.design-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.design-toggle{display:flex;border:1px solid var(--line);border-radius:7px;padding:3px;gap:3px}
.design-toggle button{border:0;padding:8px 10px;background:transparent}
.design-toggle button.selected{background:#17271d;color:#fff}
.design-levels{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:4px}
.design-levels button{padding:10px 0;font-size:13px;min-width:0}
.design-levels button.selected{background:var(--green);border-color:var(--green);color:#233815}
.design-levels button:disabled{opacity:.3;cursor:not-allowed}
.design-head{display:flex;align-items:center;gap:12px}
.design-title{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.design-title small{color:var(--muted);font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.design-icon,.design-ship-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:32px;height:32px;background:#1b2a3a;border-radius:6px;overflow:hidden}
.design-icon img,.design-ship-icon img{max-width:88%;max-height:88%;width:auto;height:auto;image-rendering:pixelated;object-fit:contain;min-width:60%}
.design-ship-icon{width:52px;height:52px}
.design-ship-icon.big{width:64px;height:64px}
.design-icon.tiny{width:22px;height:22px;border-radius:4px}
.design-icon-missing{color:#c8d6ea;font-size:10px;font-weight:700}
.design-stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px}
.design-stat{border:1px solid var(--line);border-radius:8px;padding:8px 10px;display:flex;flex-direction:column;gap:2px;background:#fff}
.design-stat small{font-size:10px;color:var(--muted);overflow:hidden;text-overflow:ellipsis}
.design-stat strong{font-size:16px}
.design-costs{display:flex;flex-wrap:wrap;gap:6px}
.design-cost{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:8px;padding:4px 10px 4px 4px;background:#fff;font-weight:500;font-size:12px}
.design-cost strong{font-size:13px}
.design-cost small{color:var(--muted);font-size:11px}
.design-cost.selected{border-color:#6c9e39;background:#eef7df}
.design-warn{color:#b3452f;font-size:11px;font-style:normal}
.design-evolution{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:8px;background:#fff}
.design-evolution table{border-collapse:collapse;font-size:11px;min-width:100%}
.design-evolution th,.design-evolution td{padding:5px 6px;border-bottom:1px solid #eef1ea;text-align:right;white-space:nowrap}
.design-evolution th:first-child{text-align:left;position:sticky;left:0;background:#fff;font-weight:500;z-index:1}
.design-evo-name{display:flex;align-items:center;gap:6px}
.design-evolution th button{padding:4px 6px;font-size:10px;border-radius:5px}
.design-evolution .current{background:#eef7df}
.design-evolution th.current button{background:var(--green);border-color:var(--green)}
.design-chips{display:flex;flex-wrap:wrap;gap:6px}
.design-chip{padding:4px 10px 4px 4px;font-weight:500;gap:6px;background:#fff}
.design-chip.selected{background:#17271d;color:#fff;border-color:#17271d}
.design-map{background:#2d4a73;border:4px solid #0a0714;border-radius:6px;padding:6px;position:relative;overflow:hidden}
.design-map .star-svg{touch-action:pan-x pan-y}
.design-star{border:1px solid var(--line);border-radius:8px;padding:10px;display:flex;flex-direction:column;gap:8px;background:#fff}
.design-edit-rows{display:flex;flex-direction:column;gap:6px}
.design-edit-row{display:grid;grid-template-columns:minmax(0,1.6fr) repeat(3,minmax(0,1fr)) 36px;gap:6px;align-items:center}
.design-edit-row input,.design-edit-row select{min-width:0;padding:9px 6px}
.design-edit-row.legend span{font-size:10px;color:var(--muted)}
.small{font-size:12px!important;line-height:1.5!important}
@media(min-width:1100px){.design-body{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
@media(max-width:760px){.design{padding:8px}.design-card{padding:12px}.design-levels button{padding:12px 0}}
/* Comparing two ships */
.design-ship{position:relative}
.design-ship.compare{border:2px solid #4f7fd1;background:#eef3fc}
.design-badge{position:absolute;top:4px;right:6px;font-size:10px;background:var(--green);color:#233815;border-radius:4px;padding:1px 5px}
.design-ship.compare .design-badge{background:#4f7fd1;color:#fff}
.design-compare-table{border-collapse:collapse;font-size:12px;width:auto;min-width:100%}
.design-compare-table th,.design-compare-table td{padding:5px 6px;border-bottom:1px solid #eef1ea;text-align:right}
.design-compare-table th:not(:first-child){vertical-align:top;min-width:76px}
.design-compare-top{display:flex;align-items:center;gap:4px}
.design-compare-ship strong{max-width:84px;white-space:normal;line-height:1.15;font-size:11px}
.design-compare-tools{display:flex;gap:4px}
.design-badge.static{position:static;font-size:9px;padding:1px 4px}
.design-mini{padding:2px 6px;font-size:11px;min-height:0;line-height:1.3;border-radius:5px}
.design-compare-skilllist{display:flex;flex-wrap:wrap;gap:3px;justify-content:flex-end;max-width:84px;margin-left:auto}
.design-skill-btn{padding:0;border:0;background:none;min-height:0;cursor:pointer}
.design-skill-btn:disabled{opacity:.4}
.design-skill-btn:hover .design-icon{outline:2px solid #4f7fd1}
.design-compare-table th:first-child{text-align:left;font-weight:500;position:sticky;left:0;background:#fff}
.design-compare-table td.more{background:#eef7df;font-weight:700;color:#2f5a14}
.design-compare-ship{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}
.design-compare-ship small{color:var(--muted);font-weight:500;font-size:10px}
.design-compare-section th{background:#f4f6f0!important;font-size:10px;letter-spacing:1px;text-transform:uppercase;color:#667b5c;text-align:left!important}
/* Star levels against the ship */
.design-level-table{border-collapse:collapse;font-size:11px;min-width:100%}
.design-level-table th,.design-level-table td{padding:5px 6px;border-bottom:1px solid #eef1ea;text-align:center;white-space:nowrap}
.design-level-table th:first-child{text-align:left;position:sticky;left:0;background:#fff;font-weight:500;z-index:1}
.design-level-table .reach{box-shadow:inset 0 -3px 0 #bceb78}
.design-level-table th.reach{background:#eef7df}
.design-level-table td.has{background:rgba(108,158,57,var(--share,.3));color:#17271d;font-weight:600}
.design-level-table td.late{color:#b3452f;font-weight:700}
/* Recipes */
.design-recipe{border:1px solid var(--line);border-radius:8px;padding:8px;display:flex;flex-direction:column;gap:6px;background:#fff}
.design-edit-row.recipe{grid-template-columns:minmax(0,2fr) minmax(0,1fr) 36px}
/* Map zoom and legend */
.design-zoom{position:absolute;top:14px;right:14px;display:flex;flex-direction:column;gap:6px}
.design-zoom button{width:40px;height:40px;padding:0;font-size:22px;font-weight:700;background:rgba(16,25,22,.85);color:#fff;border-color:#35482a}
.design-zoom button:hover{background:#253520}
.design-legend{border:1px solid var(--line);border-radius:8px;padding:10px 12px;background:#fff;display:flex;flex-direction:column;gap:6px;font-size:12px;color:#435543}
.design-legend p{margin:0;line-height:1.5;color:var(--muted)}
.design-legend-item{display:flex;align-items:center;gap:8px}
.design-legend-item i{width:12px;height:12px;flex:0 0 auto;border-radius:2px}
.design-legend-item i.small{width:6px;height:6px;margin:0 3px}
.design-legend-hint{font-size:11px;border-top:1px solid #eef1ea;padding-top:6px}
.design-difficulty{margin-top:12px}
.design-diff-table,.design-diff-detail{border-collapse:collapse;font-size:12px;width:100%}
.design-diff-table th,.design-diff-table td,.design-diff-detail th,.design-diff-detail td{padding:4px 6px;border-bottom:1px solid var(--line);text-align:right;white-space:nowrap}
.design-diff-table th:first-child,.design-diff-detail td:first-child,.design-diff-detail th:first-child,.design-diff-detail td:last-child{text-align:left}
.design-diff-table td{cursor:pointer}
.design-diff-table td:hover{background:#eef3e6}
.design-diff-table tr.selected th{color:#2f5d2a}
.design-diff-table td.pick{outline:2px solid #6c9a4b;outline-offset:-2px}
.design-diff-table td.bad{background:#f7d9d4;color:#8a2a1c}
.design-diff-table td.warn{background:#f8e7c8;color:#7a4b0c}
.design-diff-table tr.fleet th,.design-diff-table tr.fleet td{font-weight:700;border-top:2px solid var(--line)}
.design-diff-el{display:inline-flex;align-items:center;gap:4px;margin:0 10px 2px 0;white-space:nowrap}
.design-diff-el.limiting{font-weight:700}
.design-diff-params{border:1px solid var(--line);border-radius:8px;padding:8px 10px;background:#f6f9f0}
.design-diff-params summary{cursor:pointer;font-size:12px;font-weight:700;color:#4d6343}
.design-diff-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px;margin:8px 0}
.design-diff-field{display:flex;flex-direction:column;gap:3px;font-size:11px;color:#55664d}
.design-diff-field small{font-size:10px;line-height:1.45;color:#839078}
.design-diff-field input{padding:5px 6px;font-size:13px}
/* Design · Materials (design-materials.js): the list beside the selected one from a wide screen */
.materials-list input[type=search]{width:100%}
.materials-cats{flex-wrap:wrap;align-self:flex-start}
.materials-items{display:flex;flex-direction:column;gap:4px;max-height:70vh;overflow:auto}
.materials-item{justify-content:flex-start;gap:10px;padding:6px 8px;background:#fcfdf9;text-align:left}
.materials-item.selected{background:#17271d;color:#fff;border-color:#17271d}
.materials-item-text{display:flex;flex-direction:column;flex:1;min-width:0}
.materials-item-text small{font-size:10px;color:var(--muted);font-weight:500}
.materials-item.selected .materials-item-text small{color:var(--green)}
.materials-uses{font-size:10px;background:#eef2e8;color:#435543;border-radius:4px;padding:2px 6px}
.materials-uses:empty{display:none}
.materials-title{display:flex;align-items:center;gap:10px}
.materials-wide{grid-column:1/-1}
.materials-table-wrap{overflow-x:auto}
.materials-table{font-size:12px}
.materials-table th,.materials-table td{padding:6px 8px;height:auto;text-align:right}
.materials-table th:first-child,.materials-table td:first-child{text-align:left;position:static}
.materials-who{display:flex;align-items:center;gap:6px;flex-wrap:wrap;white-space:normal;min-width:150px}
.materials-who small{flex-basis:100%;font-size:10px}
.materials-zero{color:#b3b7ac}
.materials-total{font-weight:700}
.materials-star{padding:4px 10px}
@media(min-width:1150px){.materials-body{grid-template-columns:minmax(280px,360px) minmax(0,1fr)}}

/* Design · Guild: the branches of the skill tree side by side, a card per skill */
.guild-branches{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.guild-branch{display:flex;flex-direction:column;gap:8px;min-width:0}
.guild-skill{display:flex;flex-direction:column;gap:4px;text-align:left;border:1px solid var(--line);border-radius:8px;padding:10px;background:#fff}
.guild-skill.selected{border-color:#17271d;box-shadow:0 0 0 2px #17271d inset}
.guild-levels{margin:2px 0 0;padding-left:20px;font-size:12px}

/* Materials: the stars that have the material, sorted, and the universe map */
.materials-stars{display:flex;flex-direction:column;gap:4px;max-height:360px;overflow-y:auto}
.materials-star-row{display:grid;grid-template-columns:1fr auto auto auto;gap:10px;align-items:center;padding:5px 8px;border:1px solid var(--line);border-radius:6px;background:#fff;font-size:12px;text-align:left;font-weight:500}
.materials-star-row.selected{border-color:#17271d;background:#eef7df}
.materials-star-row small{color:var(--muted);font-size:11px}
/* Comparison: a narrow first column on the phone, so more ships fit before scrolling */
.design-compare-table th:first-child{white-space:normal;min-width:84px;max-width:120px;line-height:1.2}
.design-compare-table .design-evo-name span{white-space:normal}
.design-compare-top .design-mini{color:#2d4f8f;border-color:#b8c8e6;background:#eef3fc}
@media (max-width:600px){.design-compare-table td{padding:5px 4px}.design-compare-table th:not(:first-child){min-width:68px}}
