:root {
  color-scheme: dark;
  --background: #0d0b09;
  --surface: #17120e;
  --text: #f3eadf;
  --text-muted: #b7a796;
  --gold: #d6b48b;
  --border: rgba(214, 180, 139, 0.28);
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }

body {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at 50% 12%, rgba(214, 180, 139, 0.1), transparent 42%), var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.landing-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  user-select: none;
}

.pending-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 3, 2, 0.28);
  pointer-events: auto;
  touch-action: none;
  cursor: wait;
  overscroll-behavior: none;
}

.pending-panel {
  width: min(390px, calc(100vw - 40px));
  border: 1px solid var(--border);
  border-radius: 30px;
  background: radial-gradient(circle at top, rgba(214, 180, 139, 0.13), transparent 42%), var(--surface);
  padding: 36px 30px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.pending-spinner {
  width: 64px;
  height: 64px;
  margin: 0 auto 22px;
  border: 4px solid rgba(214, 180, 139, 0.24);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.pending-panel h1 { margin: 0; font-family: "Noto Serif TC", serif; font-size: 22px; font-weight: 600; }
.pending-panel p { margin: 10px 0 0; color: var(--text-muted); font-size: 14px; line-height: 1.7; }
@keyframes spin { to { transform: rotate(360deg); } }

.pending-panel:has([data-retry]:not([hidden])) .pending-spinner { display: none; }
[data-retry] { margin-top: 20px; padding: 12px 24px; border: 1px solid #d6b48b; border-radius: 12px; background: #17120e; color: #f3eadf; cursor: pointer; }
