/* Brand tokens copied from the main app's globals.css (yonderph/yonderph). */
:root {
  --foreground: #2a2420;
  --muted-foreground: #8f816d;
  --white: #ffffff;
  --line: #e7e1d5;
  --line-2: #dccdae;
  --canvas: #fbf7ef;
  --gold-ink: #7a5a18;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--foreground);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

header {
  position: absolute;
  top: 0;
  left: 0;
  padding: 20px 24px;
}

.wordmark {
  display: block;
  height: 28px;
  width: auto;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 16px 40px;
  text-align: center;
}

.icon {
  width: 144px;
  height: 144px;
  border-radius: 32px;
  box-shadow: 0 20px 40px -12px rgba(122, 90, 24, 0.35);
}

h1 {
  margin: 32px 0 8px;
  font-size: clamp(2.25rem, 7vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.flag {
  width: 0.9em;
  height: 0.45em;
  margin-left: 0.15em;
  border-radius: 3px;
  vertical-align: 0.14em;
  box-shadow: 0 0 0 1px var(--line);
}

.tagline {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 1.15rem;
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}

.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 270px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--foreground);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.download:hover {
  transform: translateY(-1px);
}

.download svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.meta {
  margin: 16px 0 0;
  color: var(--muted-foreground);
  font-size: 0.85rem;
}

.links {
  display: flex;
  gap: 20px;
  margin-top: 24px;
}

.text-link {
  padding: 0;
  color: var(--muted-foreground);
  font-size: 0.9rem;
  border: 0;
  background: none;
  font-family: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.text-link:hover {
  color: var(--foreground);
}

footer {
  padding: 20px 16px;
  color: var(--muted-foreground);
  font-size: 0.8rem;
  text-align: center;
}

footer a {
  color: inherit;
}

footer a:hover {
  color: var(--foreground);
}

/* ---------- Install popup ---------- */

dialog {
  width: min(360px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--foreground);
}

dialog::backdrop {
  background: rgba(42, 36, 32, 0.3);
}

dialog h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

dialog ol {
  margin: 0 0 20px;
  padding-left: 1.2em;
  font-size: 0.92rem;
  line-height: 1.6;
}

.close {
  width: 100%;
  padding: 10px 0;
  border: 1.5px solid var(--foreground);
  border-radius: 999px;
  background: var(--white);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- Support popup ---------- */

.support {
  text-align: center;
}

.rails {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--canvas);
}

.rails button {
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: none;
  color: var(--muted-foreground);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.rails button[aria-pressed="true"] {
  border-color: var(--gold-ink);
  background: var(--white);
  color: var(--gold-ink);
}

.qr {
  display: block;
  width: 200px;
  height: 200px;
  margin: 16px auto 8px;
  padding: 8px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
}

.qr-hint {
  margin: 0 0 16px;
  color: var(--muted-foreground);
  font-size: 0.8rem;
}

.upvote {
  display: block;
  margin-bottom: 12px;
  padding: 10px 0;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--gold-ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.upvote:hover {
  background: var(--canvas);
}
