*{box-sizing:border-box}
body{font-family:system-ui,-apple-system,Segoe UI,Roboto,'Helvetica Neue',Arial;margin:0;background:#f6f8fa;color:#111}
header{background:#0b5fff;color:#fff;padding:12px 16px}
header h1{margin:0;font-size:18px}
.container{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:12px;padding:12px;height:calc(100vh - 64px)}
.panel{background:#fff;border:1px solid #e3e7ea;border-radius:6px;padding:12px;display:flex;flex-direction:column;min-height:320px}
.panel h2{margin:0 0 8px 0;font-size:16px}
.controls{margin:8px 0;display:flex;gap:8px}
/* top row containing controls and action description box */
.top-row{display:flex;gap:12px;align-items:center}
.action-desc-box{flex:1;min-height:40px;padding:8px;border:1px solid #e3e7ea;background:#fff;border-radius:6px;color:#222;font-size:13px;line-height:1.3}

@media(max-width:900px){
	.top-row{flex-direction:column;align-items:stretch}
	.action-desc-box{margin-top:8px}
}
button{background:#0b5fff;color:#fff;border:none;padding:8px 10px;border-radius:4px;cursor:pointer}
button[disabled]{opacity:.5;cursor:default}
#waypoint-list{overflow:auto}
.wp-row{display:flex;gap:6px;align-items:center;margin-bottom:6px}
.wp-row .index-cell{flex:0 0 40px;text-align:center;color:#333;font-weight:600}
.wp-row input{width:70px;padding:6px;border:1px solid #d6dbe0;border-radius:4px}
.wp-row select.action-select{width:220px;max-width:34vw;padding:6px;border:1px solid #d6dbe0;border-radius:4px;background:#fff}
.wp-row .small{width:48px}
.wp-row .delete{background:#e53e3e}
.wp-header{display:flex;flex-wrap:nowrap;gap:6px;align-items:center;margin-bottom:8px;padding:6px 4px;color:#222;font-weight:600}
.wp-header .header-cell{flex:0 0 70px;padding:6px 4px;border-radius:4px}
.wp-header .header-cell.index{flex:0 0 40px;text-align:center}
.wp-header .header-cell.action-header{flex:0 0 220px;text-align:left}
.wp-header .small{flex:0 0 48px}
.wp-header .header-cell:last-child{flex:0 0 64px}
/* fixed action description box above the header */
.action-desc-box{min-height:40px;padding:8px;border:1px solid #e3e7ea;background:#fff;border-radius:6px;margin:8px 0;color:#222;font-size:13px;line-height:1.3}
#input-area,#output-area{flex:1;width:100%;padding:8px;border:1px solid #d6dbe0;border-radius:6px;resize:vertical;min-height:140px}
.hint{font-size:12px;color:#666;margin-top:8px}
@media(max-width:900px){.container{grid-template-columns:1fr;}}

/* Layout: left column = waypoint list (span 2 rows), right column stacked input/output */
#list-panel{grid-column:1;grid-row:1 / span 2}
#input-panel{grid-column:2;grid-row:1}
#output-panel{grid-column:2;grid-row:2}

@media(max-width:900px){
	.container{grid-template-columns:1fr;height:auto}
	#list-panel,#input-panel,#output-panel{grid-column:auto;grid-row:auto}
}

/* Hide number input spinner arrows but keep numeric behavior */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
input[type=number] {
	-moz-appearance: textfield;
}
