:root {
  color-scheme: light dark;
  --paper: #f9f8f5;
  --ink: #302d2c;
  --body-ink: #514c4a;
  --muted: #756e69;
  --rule: #dedad3;
  --accent: #8f4845;
  --focus: #1d737b;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.9;
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
p,
dd {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 5px;
  border-radius: 2px;
}

.page {
  width: min(1120px, calc(100% - 96px));
  margin-inline: auto;
}

.introduction {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: start;
  gap: 64px;
  max-width: 980px;
  padding-block: 104px 100px;
}

.avatar {
  width: 168px;
  height: auto;
  border-radius: 50%;
}

.profile {
  min-width: 0;
}

h1 {
  font-size: clamp(32px, 3.5vw, 44px);
  line-height: 1.4;
  font-weight: 650;
  letter-spacing: 0.025em;
  overflow-wrap: anywhere;
}

.name-en {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
  letter-spacing: 0.08em;
}

/* 自己紹介は文節（.phrase）の途中で折り返さない（「手が／けています」を防ぐ。apps.nowi.tokyo の LP と同じやり方）。
   文節が 1 行に収まらない幅では、文節の中でも折り返す */
.biography .phrase {
  display: inline-block;
  max-width: 100%;
}

.biography {
  max-width: 700px;
  margin-top: 30px;
  color: var(--body-ink);
  line-height: 2;
  overflow-wrap: anywhere;
}

.biography p + p {
  margin-top: 12px;
}

.profile-link {
  display: inline-block;
  margin-top: 22px;
  padding-block: 6px;
  color: var(--accent);
  font-size: 14px;
}

.apps > h2 {
  padding-block: 0 30px;
  font-size: 25px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Every app uses the same layout; adding an article needs no new CSS. */
.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 456px);
  grid-template-areas: "intro media" "actions media";
  grid-template-rows: auto 1fr;
  gap: 24px 72px;
  padding-block: 60px;
  border-top: 1px solid var(--rule);
}

.app-intro {
  grid-area: intro;
  min-width: 0;
  padding-top: 22px;
}

.app-heading {
  display: flex;
  align-items: center;
  gap: 20px;
}

.app-heading > div {
  min-width: 0;
}

.app-icon {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 22%;
}

.release {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.025em;
}

.app h3 {
  font-size: 28px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.platform {
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.025em;
}

.app-description {
  max-width: 36em;
  margin-top: 12px;
  color: var(--body-ink);
  line-height: 2;
  overflow-wrap: anywhere;
}

.app-media {
  grid-area: media;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
  width: 100%;
  max-width: 456px;
  min-width: 0;
  justify-self: center;
}

.app-screen {
  width: 100%;
  height: auto;
  /* Follow the photographed screen corners without adding a device frame. */
  border-radius: 12% / 5.5%;
}

.app-actions {
  grid-area: actions;
  min-width: 0;
  align-self: start;
}

.detail-link {
  display: inline-block;
  padding-block: 5px;
  color: var(--accent);
  font-size: 14px;
}

.store-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 4px;
  margin-top: 16px;
}

/* Each untouched 40px badge has its own 10px clear space on every side. */
.store-link {
  display: block;
  flex: 0 0 auto;
  padding: 10px;
  line-height: 0;
}

.store-link picture,
.store-link img {
  display: block;
}

.store-link img {
  width: auto;
  max-width: none;
  height: 40px;
}

.site-footer {
  padding-block: 34px 48px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.business-info {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 32px;
  margin: 0;
}

.business-info > div {
  display: flex;
  gap: 14px;
  min-width: 0;
}

.business-info dt {
  flex: 0 0 auto;
}

.business-info dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.business-info > .contact {
  flex-basis: 100%;
  margin-top: 6px;
}

.copyright {
  margin-top: 24px;
}

@media (hover: hover) {
  .profile-link:hover,
  .detail-link:hover {
    text-decoration-thickness: 2px;
  }
}

@media (max-width: 1000px) {
  .page {
    width: calc(100% - 64px);
  }

  .introduction {
    grid-template-columns: 136px minmax(0, 1fr);
    gap: 40px;
    padding-block: 76px 80px;
  }

  .avatar {
    width: 136px;
  }

  .app {
    grid-template-columns: minmax(0, 1fr) minmax(0, 40%);
    column-gap: 40px;
    padding-block: 48px;
  }

  .app-intro {
    padding-top: 0;
  }

  .app h3 {
    font-size: 25px;
  }

  .app-media {
    gap: 12px;
  }
}

@media (max-width: 760px) {
  .page {
    width: calc(100% - 40px);
    max-width: 560px;
  }

  .introduction {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-block: 44px 64px;
  }

  .avatar {
    width: 104px;
  }

  h1 {
    font-size: clamp(29px, 7.5vw, 38px);
  }

  .name-en {
    margin-top: 6px;
    font-size: 14px;
  }

  .biography {
    margin-top: 26px;
    font-size: 15px;
    line-height: 1.95;
  }

  .profile-link {
    margin-top: 18px;
  }

  .apps > h2 {
    padding-bottom: 24px;
    font-size: 22px;
  }

  .app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "media" "actions";
    grid-template-rows: auto;
    gap: 28px;
    padding-block: 36px 42px;
  }

  .app-heading {
    gap: 16px;
  }

  .app h3 {
    font-size: 25px;
  }

  .platform {
    margin-top: 20px;
  }

  .app-description {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.95;
  }

  .app-media {
    max-width: 440px;
  }

  .store-links {
    margin-top: 12px;
  }

  .site-footer {
    padding-block: 28px 36px;
  }

  .business-info {
    gap: 7px 24px;
  }

  .business-info > .contact {
    display: block;
    margin-top: 10px;
  }

  .contact dd {
    margin-top: 6px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #242222;
    --ink: #eee9e4;
    --body-ink: #d0c8c3;
    --muted: #ada39d;
    --rule: #49413e;
    --accent: #e5aaa2;
    --focus: #88cbd0;
  }
}
