.save-button {
  flex: 1 1 120px;
  min-height: 52px;
  border: 1px solid rgba(32, 153, 137, 0.26);
  border-radius: 999px;
  background: rgba(32, 153, 137, 0.12);
  box-shadow: var(--shadow-tight);
  color: #126f61;
  cursor: pointer;
  font-weight: 900;
  padding: 15px 18px;
}

.delete-button {
  flex: 1 1 120px;
  min-height: 52px;
  border: 1px solid rgba(190, 52, 38, 0.28);
  border-radius: 999px;
  background: rgba(190, 52, 38, 0.1);
  box-shadow: var(--shadow-tight);
  color: #9f2f24;
  cursor: pointer;
  font-weight: 900;
  padding: 15px 18px;
}

.save-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.delete-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.save-button:active,
.delete-button:active {
  transform: translateY(1px);
}

.save-dialog {
  width: min(calc(100vw - 28px), 520px);
  max-height: min(82vh, 720px);
  max-height: min(82dvh, 720px);
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--ink);
  padding: 0;
}

.save-dialog::backdrop {
  background: rgba(31, 38, 48, 0.46);
  backdrop-filter: blur(2px);
}

.save-dialog-frame {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(82vh, 720px);
  max-height: min(82dvh, 720px);
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(216, 204, 185, 0.95);
  border-radius: 22px;
  background: #fffaf0;
  box-shadow: 0 24px 70px rgba(31, 38, 48, 0.32);
}

.save-dialog-header {
  border-bottom: 1px solid rgba(216, 204, 185, 0.72);
  padding: 18px 18px 12px;
}

.save-dialog-header h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.16rem;
  line-height: 1.2;
}

.save-dialog-body {
  overflow-y: auto;
  color: #33404d;
  font-size: 0.9rem;
  line-height: 1.55;
  padding: 16px 18px;
  -webkit-overflow-scrolling: touch;
}

.save-name-field {
  display: grid;
  gap: 7px;
}

.save-name-field span {
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.save-name-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(22, 33, 46, 0.14);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  outline: 0;
  padding: 10px 12px;
}

.save-name-input:focus {
  border-color: rgba(241, 100, 63, 0.7);
  box-shadow: 0 0 0 3px rgba(241, 100, 63, 0.14);
}

.share-dialog {
  width: min(calc(100vw - 28px), 620px);
}

.share-dialog-frame {
  border-color: rgba(148, 163, 184, 0.5);
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.98)),
    #fff;
}

.share-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom-color: rgba(148, 163, 184, 0.32);
}

.share-dialog-header span {
  display: block;
  margin: 0 0 5px;
  color: #1d5fb8;
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.share-dialog-header h2 {
  max-width: 34ch;
  color: #111827;
}

.share-dialog-body {
  display: grid;
  gap: 14px;
}

.share-dialog-summary {
  display: grid;
  gap: 11px;
  border: 1px solid rgba(29, 111, 214, 0.14);
  border-radius: var(--studio-radius, 8px);
  background: #f4f8ff;
  padding: 13px;
}

.share-dialog-copy {
  margin: 0;
  color: #243244;
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.35;
}

.share-dialog-assurances {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.share-dialog-assurances span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(29, 111, 214, 0.16);
  border-radius: 999px;
  background: #fff;
  color: #1d5fb8;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 5px 9px;
}

.share-url-field {
  display: grid;
  gap: 7px;
}

.share-url-field span {
  color: #1d5fb8;
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.share-url-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(29, 111, 214, 0.2);
  border-radius: var(--studio-radius, 8px);
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 850;
  outline: 0;
  padding: 10px 12px;
}

.share-url-input:disabled {
  color: #667085;
  background: #f8fafc;
}

.share-url-input:focus {
  border-color: rgba(29, 111, 214, 0.68);
  box-shadow: 0 0 0 3px rgba(29, 111, 214, 0.14);
}

.share-dialog-note,
.share-dialog-status {
  margin: 0;
  color: #51606f;
  font-size: 0.84rem;
  font-weight: 780;
  line-height: 1.42;
}

.share-dialog-status {
  border-radius: var(--studio-radius, 8px);
  background: rgba(100, 116, 139, 0.09);
  padding: 9px 11px;
}

.share-dialog-status[data-tone="ready"] {
  background: rgba(20, 130, 113, 0.1);
  color: #126f61;
}

.share-dialog-status[data-tone="error"] {
  background: rgba(190, 52, 38, 0.1);
  color: #9f2f24;
}

.share-social-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1px;
}

.share-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.share-dialog-actions {
  flex-wrap: wrap;
  border-top-color: rgba(148, 163, 184, 0.32);
}

.share-revoke-button {
  color: #9f2f24;
}

@media (max-width: 520px) {
  .share-dialog-actions > * {
    flex: 1 1 100%;
  }
}

.save-dialog-error {
  margin: 10px 0 0;
  color: var(--accent-deep);
  font-size: 0.84rem;
  font-weight: 800;
}

.delete-dialog-copy {
  margin: 0;
  color: #33404d;
  font-weight: 800;
}

.save-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid rgba(216, 204, 185, 0.72);
  padding: 12px 18px 16px;
}

.dialog-primary-button,
.dialog-danger-button,
.dialog-secondary-button {
  min-width: 92px;
  min-height: 42px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  padding: 10px 18px;
}

.dialog-primary-button {
  border: 0;
  background: linear-gradient(145deg, var(--accent), #ff8a54);
  box-shadow: 0 12px 24px rgba(241, 100, 63, 0.2);
  color: #fff;
}

.dialog-danger-button {
  border: 0;
  background: linear-gradient(145deg, #be3426, #e45944);
  box-shadow: 0 12px 24px rgba(190, 52, 38, 0.2);
  color: #fff;
}

.dialog-secondary-button {
  border: 1px solid rgba(22, 33, 46, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

@media print {
  .save-dialog {
    display: none !important;
  }
}
