.dmd-card-dialog {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; border: 0; box-sizing: border-box; color: #f4ead0; background: rgba(13, 30, 24, .98);
  padding: max(12px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  font: 17px/1.35 "TsangerYuMo", sans-serif; z-index: 20000; overflow: auto;
}
.dmd-card-dialog::backdrop { background: #10251c; }
.dmd-card-dialog .dmd-card-shell { max-width: 1000px; height: 100%; min-height: 240px; margin: auto; display: flex; flex-direction: column; gap: 10px; }
.dmd-card-dialog header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-shrink: 0; }
.dmd-card-dialog h1 { font-size: 22px; font-weight: 400; margin: 0; color: #e8ce8c; }
.dmd-card-dialog button { min-height: 44px; padding: 8px 18px; border: 1px solid #bfab73; border-radius: 5px; background: #efe2b8; color: #214a3b; font: inherit; cursor: pointer; touch-action: manipulation; }
.dmd-card-dialog button[data-card="close"] { background: transparent; color: #e6ddc1; border-color: #657a64; }
.dmd-card-dialog button[data-card="share"] { background: #305b46; color: #f4ead0; }
.dmd-card-dialog button:disabled { opacity: .45; cursor: default; }
.dmd-card-dialog :focus-visible { outline: 3px solid #eabd58; outline-offset: 3px; }
.dmd-card-image { min-height: 0; flex: 1; display: flex; justify-content: center; align-items: center; }
.dmd-card-image img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 5px 24px #0004; }
.dmd-card-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.dmd-card-tools label { display: flex; align-items: center; min-height: 44px; gap: 7px; cursor: pointer; }
.dmd-card-tools input { width: 22px; height: 22px; accent-color: #d5b463; cursor: pointer; }
.dmd-card-tools span { color: #acb9a0; font-size: 14px; flex: 1; }
.dmd-card-dialog p { margin: 0; min-height: 22px; font-size: 14px; color: #bdc8ac; flex-shrink: 0; }
@media (max-height: 500px) and (orientation: landscape) {
  .dmd-card-dialog { padding-top: max(6px, env(safe-area-inset-top)); padding-bottom: max(6px, env(safe-area-inset-bottom)); font-size: 15px; }
  .dmd-card-dialog .dmd-card-shell { gap: 4px; }
  .dmd-card-dialog h1 { font-size: 18px; }
  .dmd-card-dialog header button { min-height: 36px; padding: 3px 14px; }
  .dmd-card-dialog p, .dmd-card-tools span { font-size: 12px; }
}
@media (max-width: 600px) {
  .dmd-card-tools { gap: 6px; }
  .dmd-card-tools label { flex: 1 0 55%; }
  .dmd-card-tools span { flex: 1 0 35%; }
  .dmd-card-tools button { flex: 1; }
  .dmd-card-dialog h1 { font-size: 19px; }
}
