/* Standalone stylesheet for /mofumofu-tenki/download/.
   This page deliberately does NOT load /styles.css or /script.js: it is the
   landing target for an Instagram in-app browser, so the fewest possible bytes
   and requests matter more than sharing the site's chrome.
   Tokens below are copied from /styles.css, except --accent, which uses the
   app icon's sky blue instead of the site orange. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f4faff;
  --ink: #0b0b0c;
  --ink-mid: #55555c;
  --ink-soft: #8a8a93;
  --line: #e8e6e1;
  --accent: #1b9df0;
  --accent-dark: #0d7fc4;
  --accent-soft: #e9f5fe;
  --radius: 14px;
  --font-jp:
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic",
    system-ui, sans-serif;
  --font-en: "Inter", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-jp);
  -webkit-text-size-adjust: 100%;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

html[lang="en"] body {
  font-family: var(--font-en);
}

/* The `hidden` attribute must beat the layout rules below. */
[hidden] {
  display: none !important;
}

/* Language switching. This lives here rather than in a <style> block because
   the Worker sends `style-src 'self'` with no unsafe-inline — an inline block
   would be silently dropped and both languages would render at once. */
html[lang="ja"] [data-lang="en"] {
  display: none;
}
html[lang="en"] [data-lang="ja"] {
  display: none;
}

/* ---------- language toggle ---------- */

.dl-langbar {
  width: 100%;
  max-width: 440px;
  display: flex;
  justify-content: flex-end;
  padding: 14px 20px 0;
}

.dl-langbtn {
  font: inherit;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-mid);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 32px;
}

.dl-langbtn:hover {
  color: var(--ink);
  border-color: var(--ink-soft);
}

/* ---------- card ---------- */

.dl-card {
  width: 100%;
  max-width: 440px;
  padding: 8px 20px 48px;
  text-align: center;
}

.dl-icon {
  width: 128px;
  height: 128px;
  border-radius: 22.5%;
  box-shadow: 0 6px 20px rgba(11, 11, 12, 0.12);
  margin: 20px 0 22px;
}

.dl-title {
  font-size: 1.5rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  margin: 0 0 6px;
}

.dl-lede {
  color: var(--ink-mid);
  font-size: 0.95rem;
  margin: 0 0 28px;
}

/* ---------- store buttons ---------- */

.dl-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.dl-btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

/* Demote the store the visitor is not on. The platform class is set by
   download.js, so layout stays in CSS and the JS only flips one class. */
.is-ios #androidBtn,
.is-android #iosBtn {
  min-height: 44px;
  background: transparent;
  border-color: var(--line);
  color: var(--ink-mid);
  font-size: 0.9rem;
  font-weight: 500;
}

.is-ios #androidBtn:hover,
.is-android #iosBtn:hover {
  background: var(--bg-soft);
  border-color: var(--ink-soft);
  color: var(--ink);
}

/* On Android, put Google Play first without reordering the markup. */
.is-android #androidBtn {
  order: -1;
}

/* ---------- in-app browser hint ---------- */

.dl-hint {
  margin-top: 22px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid rgba(27, 157, 240, 0.28);
  text-align: left;
}

.dl-hint p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-mid);
}

.dl-hint b {
  color: var(--ink);
  white-space: nowrap;
}

/* ---------- copy link ---------- */

.dl-copy {
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 20px;
  padding: 10px 18px;
  min-height: 40px;
  color: var(--ink-mid);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.dl-copy:hover {
  color: var(--ink);
  border-color: var(--ink-soft);
}

/* Off-screen textarea used by the execCommand copy fallback. A `style`
   attribute would be blocked by style-src 'self', so it needs a class. */
.dl-offscreen {
  position: fixed;
  top: -1000px;
  left: -1000px;
  opacity: 0;
}

/* ---------- footer ---------- */

.dl-note {
  margin: 28px 0 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.dl-links {
  margin: 10px 0 0;
  font-size: 0.78rem;
}

.dl-links a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.dl-links a:hover {
  color: var(--ink);
}

.dl-sep {
  color: var(--line);
  padding: 0 6px;
}

@media (min-width: 480px) {
  .dl-card {
    padding-top: 16px;
  }

  /* Desktop and undetectable devices get both stores side by side. */
  .is-unknown .dl-actions {
    flex-direction: row;
  }

  .is-unknown .dl-btn {
    flex: 1 1 0;
    font-size: 0.95rem;
    padding: 14px 12px;
  }
}
