dialog#plan-actions-dialog.shared-plan-actions {
  position: fixed;
  inset: var(--editor-plan-top, calc(var(--app-header-height, 48px) + 4px)) max(8px, env(safe-area-inset-right)) auto auto;
  box-sizing: border-box;
  width: min(264px, calc(100vw - 16px));
  max-height: calc(100dvh - var(--app-header-height, 48px) - 12px);
  overflow: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 0;
  border: 1px solid #d8dcd2;
  border-radius: 0;
  background: #fcfcfa;
  color: #343627;
}

dialog#plan-actions-dialog.shared-plan-actions[open] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

dialog#plan-actions-dialog.shared-plan-actions::backdrop {
  background: #34362726;
  backdrop-filter: none;
}

dialog#plan-actions-dialog.shared-plan-actions > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  min-height: 68px;
  padding: 7px 3px;
  border: 0;
  border-radius: 0;
  background: #fcfcfa;
  color: #343627;
  text-align: center;
  font: 400 12px/1.2 Inter, "Segoe UI", system-ui, sans-serif;
  touch-action: manipulation;
}

dialog#plan-actions-dialog.shared-plan-actions > button:not(:nth-child(3n + 1)) { border-inline-start: 1px solid #d8dcd2; }
dialog#plan-actions-dialog.shared-plan-actions > button:nth-child(n + 4) { border-block-start: 1px solid #d8dcd2; }
dialog#plan-actions-dialog.shared-plan-actions > button:disabled { opacity: .55; }
dialog#plan-actions-dialog.shared-plan-actions > button:focus-visible { outline: 2px solid #393d20; outline-offset: -3px; }

dialog#plan-actions-dialog.shared-plan-actions > button svg {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) {
  dialog#plan-actions-dialog.shared-plan-actions > button:not(:disabled):hover { background: #f0f2ea; }
}

dialog.editor-plan-accessory {
  position: fixed;
  box-sizing: border-box;
  width: min(400px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 18px;
  border: 1px solid #d8dcd2;
  border-radius: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: #fcfcfa;
  color: #343627;
}

dialog.editor-plan-accessory::backdrop { background: #34362726; backdrop-filter: none; }
dialog.editor-plan-accessory h2 { margin: 0 44px 16px 0; font: 600 20px/1.35 Inter, "Segoe UI", system-ui, sans-serif; }
dialog.editor-plan-accessory .editor-plan-close { position: absolute; inset: 6px 6px auto auto; width: 44px; height: 44px; padding: 0; font-size: 22px; }
dialog.editor-plan-accessory :is(button, a) { color: inherit; min-height: 44px; border: 1px solid #d8dcd2; background: #fcfcfa; touch-action: manipulation; }
dialog.editor-plan-accessory :is(button, a):focus-visible { outline: 2px solid #393d20; outline-offset: 2px; }
.editor-restore-options { display: grid; gap: 6px; }
.editor-restore-options > :is(button, a) { display: flex; align-items: center; padding: 6px 12px; text-align: start; text-decoration: none; }
dialog#export-dialog.editor-share-dialog { width: min(600px, calc(100vw - 24px)); padding: clamp(18px, 4vw, 28px); }
.editor-share-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.editor-share-grid > button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 108px; padding: 10px 6px; border-radius: 0; }
.editor-share-grid svg { width: 32px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.editor-share-grid small { font-size: 10px; color: #626657; }
.editor-share-dialog details { margin-top: 12px; border-top: 1px solid #d8dcd2; }
.editor-share-dialog summary { display: list-item; align-content: center; min-height: 44px; cursor: pointer; }
.editor-share-dialog details button { padding: 6px 8px; margin: 0 6px 6px 0; }
.editor-share-status { margin: 8px 0 0; }
.editor-share-status:empty { display: none; }
@media (max-height: 500px) { .editor-share-grid > button { min-height: 86px; } }
