:root {
  --canvas: #f7f7f8;
  --sheet: #ffffff;
  --text: #0d0d0d;
  --muted: #5d5d5d;
  --faint: #8f8f8f;
  --line: #ececec;
  --soft: #f4f4f4;
  --green: #10a37f;
  --green-hover: #0d8c6d;
  --green-press: #0b7a5e;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #171717;
    --sheet: #212121;
    --text: #ececec;
    --muted: #b4b4b4;
    --faint: #8e8e8e;
    --line: #383838;
    --soft: #2f2f2f;
    --green: #10a37f;
    --green-hover: #13b48c;
    --green-press: #0e8f6e;
    --shadow: none;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(28px, env(safe-area-inset-top))
    16px
    max(28px, env(safe-area-inset-bottom));
  background: var(--canvas);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.sheet {
  width: min(440px, 100%);
  padding: 28px 28px 22px;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.intro {
  margin: 0;
}

.mark {
  width: 32px;
  height: 32px;
  color: var(--green);
}

.brand {
  margin: 16px 0 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 {
  margin: 8px 0 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.lede {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.devices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.devices li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 12px;
  background: var(--soft);
  border-radius: 14px;
}

.device-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  color: var(--text);
}

.devices strong,
.devices span span {
  display: block;
}

.devices strong {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.devices span span {
  color: var(--faint);
  font-size: 12px;
  line-height: 1.3;
}

.download {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 20px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--green);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.download:hover {
  background: var(--green-hover);
}

.download:active {
  background: var(--green-press);
}

.download:focus-visible,
.copy:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.version {
  margin: 10px 0 0;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

.tv {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.tv h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tv p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 14px 14px 18px;
  background: var(--soft);
  border-radius: 14px;
}

.code {
  margin: 0;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
}

.copy {
  flex: none;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--sheet);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

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

.copy-status {
  min-height: 0;
  margin: 8px 0 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}

.copy-status:empty {
  display: none;
}

@media (max-width: 380px) {
  .sheet {
    padding: 28px 18px 22px;
  }

  h1 {
    font-size: 26px;
  }

  .code {
    font-size: 22px;
    letter-spacing: 0.08em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .download {
    transition: none;
  }
}
