:root{
  --overlay: rgba(0,0,0,.6);
  --panel: #111;
  --text: #fff;
  --muted: #bbb;
  --radius: 16px;
}

.result-overlay{
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: var(--overlay);
  z-index: 9999;
}
.result-overlay.show{ display: flex; }

.result-dialog{
  width: min(92vw, 900px);
  max-height: 90vh;
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0,0,0,.4);
  position: relative;
  padding: 16px;
  padding-top: 48px;
}

.result-close{
  position: absolute; top: 8px; right: 10px;
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--muted);
  font-size: 32px; cursor: pointer;
}
.result-close:hover{ color: var(--text); }

.result-body{
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 320px;
  overflow: auto;
}

#result-img{
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  display: none; /* 載入完成前不顯示 */
}

.result-loading{
  color: var(--muted);
  font-size: 14px;
}

.result-error{
  color: #ff9b9b;
  font-size: 14px;
}

.visually-hidden{
  position:absolute !important;
  height:1px; width:1px;
  overflow:hidden; clip:rect(1px,1px,1px,1px);
  white-space:nowrap;
}
.result-hint {
  margin-top: 12px;
  font-size: 16px;
  color: #ddd; /* 淺灰字體 */
  line-height: 1.5;
}
