.ucdl-actions, .ucdl-dialog, .ucdl-actions *, .ucdl-dialog * { box-sizing: border-box; }
.ucdl-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
  width: 100%;
  margin: 24px 0;
  clear: both;
}
.ucdl-actions--single { grid-template-columns: minmax(0, 1fr); }
.ucdl-top-box {
  width: min(100%, 230px);
  min-width: 0;
  padding: 12px;
  border: 3px dashed #111;
  background: #fff;
  justify-self: start;
}
.ucdl-top-box:last-child:not(:first-child) { justify-self: end; }
.ucdl-actions .ucdl-button, .ucdl-dialog .ucdl-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: 6px;
  margin: 0;
  background: #111;
  color: #fff;
  font: 700 16px/1.4 Arial, Helvetica, sans-serif;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.ucdl-actions .ucdl-button:hover, .ucdl-dialog .ucdl-button:hover { background: #333; color: #fff; text-decoration: none; }
.ucdl-actions .ucdl-button:focus-visible, .ucdl-dialog :focus-visible { outline: 3px solid #075eae; outline-offset: 3px; }
.ucdl-fallback { display: grid; gap: 10px; }
.ucdl-unavailable { margin: 0; padding: 10px 0; font: 16px/1.5 Arial, Helvetica, sans-serif; color: #555; }
.ucdl-actions [hidden], .ucdl-dialog [hidden], dialog.ucdl-dialog:not([open]) { display: none !important; }
.ucdl-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

dialog.ucdl-dialog {
  width: calc(100% - 32px);
  max-width: 720px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  margin: auto;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #292929;
  box-shadow: 0 18px 60px rgba(0,0,0,.4);
  font: 16px/1.6 Arial, Helvetica, sans-serif;
  overflow: hidden;
}
dialog.ucdl-dialog[open] { display: flex; flex-direction: column; animation: ucdl-entrance .15s ease-out; }
.ucdl-dialog::backdrop { background: rgba(0,0,0,.8); }
.ucdl-dialog-header { display: flex; flex: 0 0 auto; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #ddd; }
.ucdl-dialog #ucdl-title { margin: 0; color: #222; font: 800 clamp(23px, 4vw, 32px)/1.3 Arial, Helvetica, sans-serif; overflow-wrap: anywhere; }
.ucdl-close { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; margin: 0; border: 1px solid #ddd; border-radius: 6px; background: #fff; color: #333; font: 32px/1 Arial, Helvetica, sans-serif; cursor: pointer; }
.ucdl-dialog-body { padding: 20px 24px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.ucdl-dialog p { margin: 0 0 16px; }
.ucdl-dialog .ucdl-instructions { padding: 14px; background: #f2f2f2; border-radius: 8px; }
.ucdl-dialog .ucdl-external { background: #1264d5; margin: 14px 0; }
.ucdl-dialog .ucdl-copy { background: #ececec; color: #222; margin: 14px 0; }
.ucdl-dialog .ucdl-copy:hover { background: #ddd; color: #111; }
.ucdl-dialog .ucdl-status { min-height: 1.5em; margin: 12px 0; font-weight: 700; color: #17652c; text-align: center; overflow-wrap: anywhere; }
.ucdl-countdown { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 260px; text-align: center; }
.ucdl-description { font-size: clamp(18px, 3vw, 23px); font-weight: 700; }
.ucdl-circle { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 120px; height: 120px; margin-bottom: 12px; border: 7px solid #c93220; border-radius: 50%; background: #fff; color: #c93220; font: 800 52px/1 Arial, Helvetica, sans-serif; }
.ucdl-options { display: grid; gap: 16px; width: 100%; max-width: 500px; margin: 0 auto; }
.ucdl-option-card { padding: 18px; border: 2px dashed #c8c8c8; border-radius: 10px; text-align: center; }
.ucdl-option-card h3 { margin: 0 0 14px; color: #333; font: 700 21px/1.4 Arial, Helvetica, sans-serif; }
.ucdl-dialog .ucdl-download-link { background: #c93220; }
.ucdl-dialog .ucdl-download-link:hover { background: #a82a1b; }
#ucdl-manual-copy { margin: 16px 0; }
#ucdl-manual-copy label { display: block; }
#ucdl-page-url { width: 100%; min-width: 0; min-height: 48px; padding: 10px; font: 16px/1.4 Arial, Helvetica, sans-serif; }
@keyframes ucdl-entrance { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 380px) {
  .ucdl-actions { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ucdl-top-box { width: 100%; }
}
@media (max-width: 600px) {
  .ucdl-top-box { padding: 8px; }
  .ucdl-dialog-body { padding: 16px; }
  dialog.ucdl-dialog { width: calc(100% - 20px); max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); }
}
@media (prefers-reduced-motion: reduce) { dialog.ucdl-dialog[open] { animation: none; } }
