.simulator {
  --muted: #526a84;
  --accent: #43658c;
  --line: #bac9d9;
  --panel: #f8fafd;
  padding-block: 24px;
  font: 14px/normal "Noto Sans", system-ui, sans-serif;
}
.simulator-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 13.75rem;
  align-items: start;
  gap: 10px 20px;
  margin-block-start: 10px;
}
:where(.simulator) button { font: inherit; color: inherit; cursor: pointer; }
:where(.simulator) button:disabled { opacity: .45; cursor: default; }
:where(.simulator) button:focus-visible { outline-offset: 2px; }
.workspace-pane { min-width: 0; }
.workspace-heading h1 { font-size: 26px; }
.workspace-heading p { max-width: none; }
.shortcuts-below { display: none; }
.shortcuts h2 { font-size: 1rem; }
.workspace-heading p, .shortcuts p { color: var(--muted); line-height: 1.5; margin-top: 4px; }

#workspace {
  width: 100%;
  aspect-ratio: 8 / 5;
  max-height: clamp(340px, calc(100dvh - 204px), 970px);
}
.divider { position: absolute; z-index: 1; touch-action: none; outline: none; }
.divider-x { cursor: col-resize; }
.divider-y { cursor: row-resize; }
.divider::after { content: ""; position: absolute; background: transparent; pointer-events: none; }
.divider-x::after { inset: 0 auto 0 3px; width: 2px; }
.divider-y::after { inset: 3px 0 auto; height: 2px; }
.divider:hover::after, .divider:focus-visible::after, .divider.resizing::after { background: var(--accent); }
body[data-resize-axis] { user-select: none; }
body[data-resize-axis="x"], body[data-resize-axis="x"] * { cursor: col-resize !important; }
body[data-resize-axis="y"], body[data-resize-axis="y"] * { cursor: row-resize !important; }
#status { min-height: 1.5em; margin-top: 8px; color: var(--muted); }

.move-tip {
  max-width: min(204px, calc(100% - 12px));
}
.move-tip-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 3px 8px;
  margin-bottom: 4px;
}
.move-tip::before {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1px solid var(--tip-line);
  border-width: 1px 0 0 1px;
  background: var(--tip-bg);
}
.move-tip[data-side="bottom"]::before { top: 0; left: var(--pointer); transform: translate(-50%, -50%) rotate(45deg); }
.move-tip[data-side="top"]::before { bottom: 0; left: var(--pointer); transform: translate(-50%, 50%) rotate(225deg); }
.move-tip[data-side="right"]::before { left: 0; top: var(--pointer); transform: translate(-50%, -50%) rotate(-45deg); }
.move-tip[data-side="left"]::before { right: 0; top: var(--pointer); transform: translate(50%, -50%) rotate(135deg); }

.shortcuts {
  margin-block-start: var(--display-gap);
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  font-size: .8125rem;
}
#shortcut-list h3 {
  margin: 14px 0 4px;
  color: var(--muted);
  font-size: .6875rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
#shortcut-list ul { list-style: none; margin: 0; padding: 0; }
#shortcut-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
  min-height: 32px;
  padding: 3px 4px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  font-size: .75rem;
  text-align: left;
}
#shortcut-list button > span { overflow-wrap: anywhere; }
#shortcut-list button:hover { background: #edf2f7; }
#shortcut-list button[aria-pressed="true"] { background: #e2ecf6; border-color: #bdcde0; }
#shortcut-list kbd {
  display: inline-block;
  padding: 2px 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f1f5f9;
  font: .6875rem ui-monospace, monospace;
  white-space: nowrap;
}
@media (max-width: 800px) {
  .simulator { padding-top: 16px; }
  .simulator-stage { grid-template-columns: minmax(0, 1fr); }
  .shortcuts { margin-block-start: 0; }
  .shortcuts-right { display: none; }
  .shortcuts-below { display: inline; }
}
@media (max-width: 480px) {
  .workspace-heading p { font-size: 13px; }
  .move-tip.tiling-tip { max-width: min(158px, calc(100% - 12px)); font-size: 11px; }
}
