:root {
  --navy: #101a2e;
  --navy-light: #101a2e;
  --line: #d8dfe7;
  --white: #ffffff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 1px;
  color: var(--navy);
  background: #f7f8fa;
  font-family: "Yu Gothic", YuGothic, "Hiragino Kaku Gothic ProN", sans-serif;
}

a { color: inherit; text-decoration: none; }

.site-header {
  height: 94px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.site-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: .08em;
}

.page-shell {
  min-height: calc(100vh - 2px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.works {
  padding: 74px clamp(48px, 7.2vw, 116px) 76px;
}

.section-title { text-align: center; }

.section-title h1 {
  margin: 0;
  font-size: clamp(36px, 3.1vw, 48px);
  font-weight: 500;
  letter-spacing: .06em;
}

.section-title > span,
.short-line {
  display: block;
  width: 44px;
  height: 2px;
  background: var(--navy);
}

.section-title > span { margin: 22px auto 54px; }

.works-grid {
  max-width: 1260px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.work-card {
  min-height: 245px;
  padding: 38px 40px;
  display: flex;
  align-items: center;
  gap: clamp(32px, 4vw, 58px);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
}

.image-placeholder,
.app-image {
  flex: 0 0 154px;
  width: 154px;
  height: 154px;
  border-radius: 25%;
}

.image-placeholder {
  background: var(--navy);
}

.app-image {
  display: block;
  object-fit: cover;
}

.tone-2 { background: #101a2e; }

.work-info { min-width: 0; }

.work-info h2 {
  margin: 0;
  white-space: nowrap;
  font-size: clamp(25px, 2.2vw, 31px);
  font-weight: 500;
  letter-spacing: .03em;
}

.short-line {
  width: 24px;
  margin: 17px 0 27px;
}

.details-button {
  width: 168px;
  height: 42px;
  padding: 0 18px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
  background: var(--navy);
  border-radius: 3px;
  font-size: 14px;
  letter-spacing: .03em;
  transition: background .2s, transform .2s;
}

.details-button:not(.disabled):hover {
  background: var(--navy-light);
  transform: translateY(-2px);
}

.details-button span { font-family: inherit; }

.details-button.disabled {
  opacity: .4;
  cursor: not-allowed;
  user-select: none;
}

footer {
  margin-top: auto;
  min-height: 158px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: var(--navy);
}

footer p {
  margin: 0;
  font-size: 16px;
  letter-spacing: .04em;
}

/* App detail template */
.detail-page {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px clamp(48px, 7.2vw, 116px) 80px;
}

.back-link,
.back-to-works {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  letter-spacing: .04em;
}

.back-link:hover,
.back-to-works:hover { text-decoration: underline; text-underline-offset: 4px; }

.detail-hero {
  padding: 62px 0 86px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(52px, 8vw, 110px);
  align-items: center;
}

.detail-icon {
  width: 280px;
  height: 280px;
  display: block;
  object-fit: cover;
  border-radius: 25%;
}

.detail-label {
  margin: 0 0 17px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
}

.detail-hero-copy h1 {
  margin: 0;
  font-size: clamp(42px, 5vw, 66px);
  font-weight: 500;
  letter-spacing: .04em;
}

.detail-hero-copy .short-line { margin: 23px 0 28px; }
.detail-lead { margin: 0; max-width: 520px; font-size: 16px; line-height: 2; }

.detail-section {
  padding: 78px 0;
}

.detail-heading { margin-bottom: 42px; }
.detail-heading h2 { margin: 0; font-size: 30px; font-weight: 500; letter-spacing: .07em; }

.content-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; }
.content-section .detail-heading { align-self: start; }
.detail-content { max-width: 650px; }
.rule-list article { padding: 20px 0; }
.rule-list h3 { margin: 0 0 9px; font-size: 18px; font-weight: 600; line-height: 1.7; }
.rule-list p { margin: 0; font-size: 14px; line-height: 1.8; }

.function-list { margin: 0; padding: 0; list-style: none; }
.function-list li { padding: 13px 10px 13px 34px; position: relative; font-size: 15px; line-height: 1.8; }
.function-list li::before { content: ""; width: 7px; height: 7px; position: absolute; left: 8px; top: 22px; border-radius: 50%; background: var(--navy); }
.back-to-works { margin-top: 12px; }

@media (max-width: 880px) {
  .site-header { height: 76px; padding: 0 20px; }
  .site-title { font-size: 21px; }
  .works { padding: 35px 18px 28px; }
  .section-title h1 { font-size: 28px; }
  .section-title > span { width: 34px; margin: 13px auto 26px; }
  .works-grid { grid-template-columns: 1fr; gap: 14px; }
  .work-card {
    min-height: 154px;
    padding: 25px 18px;
    gap: 28px;
  }
  .image-placeholder,
  .app-image {
    flex-basis: 100px;
    width: 100px;
    height: 100px;
  }
  .work-info h2 { font-size: 20px; }
  .short-line { width: 20px; margin: 12px 0 19px; }
  .details-button { width: 142px; height: 36px; padding: 0 14px 0 18px; font-size: 12px; }
  footer { min-height: 155px; padding: 0 20px; }
  footer p { font-size: 15px; }
  .detail-page { padding: 28px 18px 55px; }
  .detail-hero { padding: 42px 0 58px; grid-template-columns: 120px 1fr; gap: 28px; }
  .detail-icon { width: 120px; height: 120px; }
  .detail-label { margin-bottom: 10px; font-size: 10px; }
  .detail-hero-copy h1 { font-size: 32px; }
  .detail-hero-copy .short-line { margin: 14px 0 16px; }
  .detail-lead { font-size: 13px; line-height: 1.8; }
  .detail-section { padding: 52px 0; }
  .detail-heading { margin-bottom: 28px; }
  .detail-heading h2 { font-size: 24px; }
  .content-section { display: block; }
  .rule-list article { padding: 18px 0; }
  .rule-list h3 { font-size: 16px; }
  .function-list li { padding-top: 11px; padding-bottom: 11px; font-size: 14px; }
  .function-list li::before { top: 21px; }
}

@media (max-width: 420px) {
  .work-card { gap: 22px; }
  .image-placeholder,
  .app-image { flex-basis: 92px; width: 92px; height: 92px; }
  .work-info h2 { font-size: 18px; }
  .details-button { width: 140px; }
  .detail-hero { grid-template-columns: 94px 1fr; gap: 20px; }
  .detail-icon { width: 94px; height: 94px; }
  .detail-hero-copy h1 { font-size: 26px; }
  .detail-lead { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .details-button { transition: none; }
}
