/* iPhone and Android apps on the homepage: one card per app with its official App Store and Google Play badges. */
.app-showcase { padding: 0 0 80px; }
.app-showcase > .shell { border-top: 1px solid var(--line); padding-top: 56px; }
/* Headings break only at spaces or after "・", never inside a word such as アプリ or 過去問. */
.app-showcase .directory-heading h2 { word-break: keep-all; overflow-wrap: anywhere; }
.app-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.app-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  column-gap: 20px;
  align-content: start;
  min-width: 0;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.app-card-wide { grid-column: 1 / -1; }
.app-icon { width: 72px; height: 72px; border-radius: 22%; box-shadow: 0 0 0 1px rgba(21, 44, 58, .12); }
.corporate-site .app-summary h3 { margin: 0 0 6px; font-size: 20px; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
.app-summary p { margin: 0; font-size: 14px; line-height: 1.85; color: var(--muted); }
.app-stores { grid-column: 2; display: flex; flex-wrap: wrap; gap: 14px 24px; min-width: 0; margin: 18px 0 0; }
.app-stores > div { min-width: 0; }
.app-stores dt { margin-bottom: 8px; font-size: 12px; font-weight: 750; line-height: 1.6; color: #49636e; }
.app-stores dd { margin: 0; }
.app-store-note { margin-left: 4px; font-weight: 600; color: var(--muted); }

/*
 * Official badges, unmodified: the App Store badge (black, first in the lineup) and the Google Play badge at the same
 * 40px height, which is Apple's onscreen minimum. Clear space of a quarter of the badge height (10px) is kept around
 * each badge by the gaps below; the 2px padding makes every link at least 44px tall.
 */
.store-badge { display: inline-flex; padding: 2px 0; border-radius: 6px; }
.badge-app-store,
.badge-google-play { display: block; width: auto; height: 40px; }
.app-exam-badges { display: flex; flex-wrap: wrap; gap: 16px 20px; margin: 0; padding: 0; list-style: none; }
.app-exam-badge { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 2px 0; border-radius: 6px; }
.app-exam-name { font-size: 12px; font-weight: 800; line-height: 1.5; color: var(--ink); }
.app-exam-badge:hover .app-exam-name { color: var(--teal); text-decoration: underline; text-underline-offset: 4px; }

.app-note { margin: 20px 0 0; font-size: 12px; line-height: 1.9; color: var(--muted); }
.app-note + .app-note { margin-top: 6px; }
.app-trademarks { font-size: 11px; }
.app-showcase .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1000px) {
  .app-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 800px) {
  .app-showcase { padding-bottom: 56px; }
  .app-showcase > .shell { padding-top: 40px; }
  .app-list { gap: 14px; }
  /* Icon and name side by side; the description and the badges use the card's full width below them. */
  .app-card { grid-template-columns: 56px minmax(0, 1fr); column-gap: 16px; padding: 20px; }
  .app-icon { grid-row: 1; width: 56px; height: 56px; }
  .app-summary { display: contents; }
  .corporate-site .app-summary h3 { grid-column: 2; grid-row: 1; align-self: center; margin: 0; font-size: 18px; }
  .app-summary p { grid-column: 1 / -1; margin-top: 14px; font-size: 13px; }
  .app-stores { grid-column: 1 / -1; gap: 14px 16px; margin-top: 16px; }
  .app-stores > .app-stores-exams { flex: 1 1 100%; }
  /* One exam per row: its name on the left, its badge on the right. */
  .app-exam-badges { display: grid; gap: 10px; }
  .app-exam-badge { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; }
  .app-note { font-size: 11px; }
  .app-trademarks { font-size: 10px; }
}
@media (max-width: 360px) {
  .app-card { column-gap: 14px; padding: 18px 16px; }
}
