/* Layout only: everything else is the UI kit and its theme. */
main { max-width: 1040px; margin: 0 auto; padding: 32px 16px 64px; }
h1 { font-size: var(--pw-text-3xl); line-height: var(--pw-leading-3xl); letter-spacing: -.02em; margin: 0; }
p { margin: 0 0 var(--pw-space-4); }
.muted { color: var(--pw-fg-muted); }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--pw-space-6); flex-wrap: wrap;
  margin-bottom: var(--pw-space-8); }
.row { display: flex; flex-wrap: wrap; gap: var(--pw-space-4); align-items: center; }
.stack { display: grid; gap: var(--pw-space-6); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--pw-space-6);
  margin-top: var(--pw-space-6); }
.grid .wide { grid-column: 1 / -1; }
ul { list-style: none; padding: 0; margin: 0 0 var(--pw-space-6); }
.stagger, .order { display: grid; gap: var(--pw-space-3); }
.stagger li, .order li { padding: var(--pw-space-4) var(--pw-space-5); border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius); background: var(--pw-gray-2); }
.tile { display: grid; place-items: center; width: 110px; height: 110px; border-radius: var(--pw-radius-lg);
  background: var(--pw-accent); color: var(--pw-accent-contrast); font-weight: 600; cursor: pointer; user-select: none; }
.drag-area { position: relative; flex: 1; min-width: 140px; height: 110px; border: 1px dashed var(--pw-border-strong);
  border-radius: var(--pw-radius-lg); display: grid; place-items: center; }
.ball { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; cursor: grab; touch-action: none;
  background: var(--pw-gray-12); color: var(--pw-gray-1); font-size: var(--pw-text-xs); font-weight: 600; user-select: none; }
.ball:active { cursor: grabbing; }
.seg { display: flex; gap: var(--pw-space-2); border-bottom: 1px solid var(--pw-border); }
.seg-item { position: relative; padding: var(--pw-space-4) var(--pw-space-5); border: 0; background: none; font: inherit;
  color: var(--pw-fg-muted); cursor: pointer; }
.seg-item[aria-pressed="true"] { color: var(--pw-fg); }
.underline { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--pw-accent); }
