/* 앱과 갤러리가 함께 쓰는 창(dialog) · 버튼 · 공유 버튼 · 알림 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(60, 45, 30, 0.18);
  border-radius: 999px;
  background: #fffdf8;
  color: #3b3530;
  font: inherit;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}
.btn.primary { background: #3b3530; border-color: #3b3530; color: #fffdf8; }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.primary.danger { background: #b3261e; border-color: #b3261e; }
dialog.confirm { width: min(340px, calc(100vw - 32px)); }
dialog.confirm .message { margin: 0 0 18px; font-size: 15px; line-height: 1.6; opacity: 0.85; }

dialog.sheet, dialog.report-dialog {
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  box-sizing: border-box;
  padding: 22px;
  border: none;
  border-radius: 22px;
  background: #fffcf6;
  color: #3b3530;
  box-shadow: 0 20px 60px rgba(40, 25, 10, 0.3);
}
dialog::backdrop { background: rgba(40, 30, 20, 0.35); backdrop-filter: blur(3px); }
dialog h2 { margin: 0 0 14px; font-size: 19px; font-weight: 600; }
dialog .preview {
  display: block;
  width: 100%;
  max-height: 34vh;
  object-fit: contain;
  border-radius: 12px;
  background: #efe9dd;
  margin-bottom: 14px;
}
dialog label { display: block; font-size: 14px; margin-bottom: 12px; }
dialog input[type=text], dialog input:not([type]) {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(60, 45, 30, 0.2);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 16px;
}
dialog .note { font-size: 13px; opacity: 0.7; margin: 0 0 8px; }
dialog .error { color: #b3261e; font-size: 14px; min-height: 1em; margin: 0 0 8px; }
dialog .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
dialog .link-line { font-size: 13px; word-break: break-all; margin: 0 0 14px; }
dialog .link-line a { color: #2348b0; }

.share { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px 0 10px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  touch-action: manipulation;
}
.share-btn svg { width: 20px; height: 20px; }
.share-btn.x { background: #111; color: #fff; }
.share-btn.facebook { background: #1877f2; color: #fff; }
.share-btn.kakao { background: #fee500; color: #191600; }
.share-btn.copy { background: #ece6da; color: #3b3530; }

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  padding: 10px 18px;
  border-radius: 999px;
  background: #3b3530;
  color: #fffdf8;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 10;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
