*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --text: #0F172A;
  --muted: #64748B;
  --accent: #0F172A;
  --accent-hover: #1E293B;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.04);
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

/* ── Header ── */
.header {
  text-align: center;
  margin-bottom: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.brand-icon {
  width: 32px;
  height: 32px;
}

.brand-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.headline {
  font-size: clamp(24px, 5vw, 38px);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 12px;
  line-height: 1.1;
}

.subtitle {
  font-size: 16px;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
}

/* ── URL card ── */
.url-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.url-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.url-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.url-text {
  font-family: 'Menlo', 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms;
  flex-shrink: 0;
}

.copy-btn:hover { background: var(--accent-hover); }
.copy-btn.copied { background: #16A34A; }

/* ── Mobile notice ── */
.mobile-notice {
  display: none;
  align-items: flex-start;
  gap: 8px;
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #78350F;
  margin-bottom: 20px;
}

.mobile-notice.visible {
  display: flex;
}

/* ── Cards ── */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 48px;
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 150ms, box-shadow 150ms;
}

.card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.card-logo svg {
  width: 40px;
  height: 40px;
  display: block;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
}

.card-subtitle {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.card-desc {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
}

.card-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms;
  text-align: center;
  letter-spacing: -.01em;
}

.card-btn:hover { background: var(--accent-hover); }

.fallback-msg {
  display: none;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.fallback-msg.visible { display: block; }

.fallback-msg a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Overlay ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.overlay.visible { display: flex; }

.overlay-panel {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  max-width: 460px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,.2);
}

.overlay-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  line-height: 1;
}

.overlay-close:hover { background: var(--bg); color: var(--text); }

.overlay-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 16px;
  padding-right: 32px;
}

.overlay-copied {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #166534;
  margin-bottom: 20px;
}

.overlay-steps {
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.overlay-steps li {
  font-size: 14px;
  line-height: 1.5;
}

.overlay-steps li strong { font-weight: 600; }

.overlay-steps li code {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
}

.overlay-steps li a { color: var(--accent); }

.overlay-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Footer ── */
.footer {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
