dialog.alignment-editor {
  width:min(790px,calc(100% - 24px));
  max-height:92dvh;
  padding:0;
  overscroll-behavior:contain;
}
.alignment-head,.alignment-body,.alignment-actions {padding-inline:clamp(16px,3.5vw,27px)}
.alignment-head {
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding-top:19px;padding-bottom:15px;border-bottom:1px solid var(--line);
}
.alignment-head .overline {font-size:.73rem;letter-spacing:.13em}
.alignment-head h2 {font-size:clamp(1.7rem,4.1vw,2.25rem);letter-spacing:-.05em;line-height:1.12;margin-top:3px}
.alignment-close {
  width:42px;height:42px;flex:none;display:grid;place-items:center;border:1px solid #c4cbb7;border-radius:50%;
  padding:0;background:#f8f8ec;color:#365543;font:1.7rem/1 var(--sans);
}
.alignment-body {padding-top:14px;padding-bottom:18px}
.alignment-editor label,.alignment-nudge>span {
  display:block;font-weight:600;font-size:.92rem;color:#314e3d;
}
.alignment-editor select {min-height:43px;margin-top:4px}
.alignment-plan {display:grid;grid-template-columns:minmax(175px,.7fr) 1fr;align-items:end;gap:22px;margin-bottom:15px}
.alignment-plan p,.alignment-help,.alignment-spot {font-size:.92rem;color:#4c6453;line-height:1.36}
.alignment-plan p {align-self:end;padding:0 0 4px;max-width:44ch}
.alignment-grid {display:grid;grid-template-columns:minmax(0,1.6fr) minmax(180px,.80fr);gap:clamp(14px,3vw,24px);align-items:center}
.alignment-board {
  width:100%;aspect-ratio:550/452;position:relative;isolation:isolate;overflow:hidden;border-radius:10px;
  background:radial-gradient(ellipse at 50% 53%,#244d3e 8%,#143b30 67%,#102f28);
  box-shadow:inset 0 0 0 1px #46634b;touch-action:pan-y;user-select:none;-webkit-user-select:none;
  cursor:crosshair;
}
.alignment-board canvas {position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.alignment-marker {
  position:absolute;transform:translate(-50%,-50%);z-index:1;
  border:0;padding:0;display:grid;place-items:center;width:44px;height:44px;
  color:#224735;background:transparent;
}
button.alignment-marker {cursor:grab;touch-action:none;border-radius:50%}
button.alignment-marker:active {cursor:grabbing}
.alignment-marker>span {
  pointer-events:none;border:1.5px solid #f7f3d6;border-radius:50%;background:#f7f4df;color:#234534;
  display:grid;place-items:center;width:29px;height:29px;
  font:700 .8rem/1 var(--sans);letter-spacing:-.02em;box-shadow:0 1px 4px #0628197a;
}
button.alignment-marker:hover>span {background:white}
button.alignment-marker[aria-pressed=true] {z-index:2}
button.alignment-marker[aria-pressed=true]>span {
  background:#f6c777;border-color:#f7d294;color:#312d21;
  box-shadow:0 0 0 2px #30533a,0 0 0 3.5px #f2cb7f;
}
button.alignment-marker:focus-visible {outline:2px dashed white;outline-offset:0}
.alignment-marker.fixed {z-index:0;width:24px;height:24px}
.alignment-marker.fixed>span {
  width:20px;height:20px;font-size:.69rem;border:1px solid #e2e8cb;color:#f2f0d7;background:#345641;
}
.alignment-inspector {min-width:0}
.alignment-spot {margin:8px 0 14px;font-variant-numeric:tabular-nums}
.alignment-nudge>div {display:flex;gap:5px;flex-wrap:wrap;margin-top:6px}
.alignment-nudge button {
  display:grid;place-items:center;min-width:38px;min-height:42px;padding:0 8px;
  font-size:1.23rem;font-weight:600;border:1px solid #c1ceb7;border-radius:6px;color:#244833;background:#f2f4e7;
}
.alignment-close:hover,.alignment-nudge button:hover {background:#e4ebd8}
.alignment-help {margin-top:16px;padding-top:12px;border-top:1px solid #d8dece}
.alignment-actions {
  position:sticky;bottom:0;z-index:3;display:flex;align-items:center;gap:8px;
  padding-block:12px;border-top:1px solid var(--line);background:var(--paper);
}
.alignment-actions>span {font-size:.89rem;color:#5b695a;margin-right:auto}
.alignment-actions .secondary,.alignment-actions .primary {min-height:42px}
.alignment-message {margin:0 16px 13px;color:#923f30;font-weight:600}
@media(max-width:660px) {
  dialog.alignment-editor {width:min(480px,calc(100% - 16px));max-height:96dvh}
  .alignment-head {padding-top:12px;padding-bottom:11px}
  .alignment-plan {grid-template-columns:minmax(126px,.78fr) 1fr;gap:10px;margin-bottom:12px}
  .alignment-plan p {font-size:.84rem;padding-bottom:1px}
  .alignment-grid {display:flex;flex-direction:column;align-items:stretch;gap:12px}
  .alignment-inspector {display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;align-items:end}
  .alignment-inspector .alignment-nudge {grid-column:2;grid-row:1 / 3;align-self:start}
  .alignment-nudge>div {gap:3px}
  .alignment-nudge button {min-width:32px;min-height:43px;padding:0 4px}
  .alignment-spot {font-size:.84rem;margin:6px 0 0;grid-column:1/-1;grid-row:3}
  .alignment-help {margin:7px 0 0;padding:0;border:0;grid-column:1/-1;font-size:.85rem}
  .alignment-marker>span {width:25px;height:25px;font-size:.71rem}
  .alignment-marker.fixed>span {width:17px;height:17px;font-size:.6rem}
  .alignment-actions {padding-block:10px}
}
@media(max-width:350px) {
  .alignment-head,.alignment-body,.alignment-actions {padding-inline:11px}
  .alignment-actions>span {font-size:.78rem}
}
