:root {
  color-scheme: light;
  --background: #ffffff;
  --foreground: #111111;
  --muted: #666666;
  --line: #e2e2e2;
  --soft: #f5f5f3;
  --content-width: 1080px;
  --reading-width: 820px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    Arial,
    sans-serif;
  line-height: 1.5;
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
}

img,
video {
  max-width: 100%;
}

a {
  color: inherit;
}

button,
a {
  touch-action: manipulation;
}

[hidden] {
  display: none !important;
}

:focus {
  outline: 2px solid #111111;
  outline-offset: 4px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.site-header {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 38px 20px 34px;
  padding: calc(38px + env(safe-area-inset-top)) 20px 34px;
  text-align: center;
}

.brand-home {
  display: inline-flex;
  min-width: 72px;
  min-height: 72px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.site-logo {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: contain;
}

.eyebrow {
  margin: 16px 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-header h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.site-intro {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.catalog {
  width: 100%;
  max-width: var(--content-width);
  min-height: 280px;
  margin: 0 auto;
  padding: 34px 20px 56px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading .eyebrow {
  margin-top: 0;
}

.section-heading h2 {
  margin: 0;
  font-size: 26px;
}

.work-count {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 14px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.work-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.work-card-image {
  position: relative;
  overflow: hidden;
  height: 0;
  padding-top: 56.25%;
  background: #111111;
}

.work-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.work-card-body {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
}

.work-card-number {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.work-card-title {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
}

.work-card-arrow {
  flex: 0 0 auto;
  font-size: 22px;
}

.compact-header {
  border-bottom: 1px solid var(--line);
  padding: 12px 20px;
  padding: calc(12px + env(safe-area-inset-top)) 20px 12px;
  text-align: center;
}

.compact-brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.compact-brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: contain;
}

.work-detail,
.not-found {
  width: 100%;
  max-width: var(--reading-width);
  min-height: calc(100vh - 190px);
  margin: 0 auto;
  padding: 24px 20px 54px;
}

.back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.work-heading {
  margin-bottom: 18px;
}

.work-number {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.work-heading h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 650;
}

.video-shell {
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: #000000;
}

.video-shell video {
  display: block;
  width: 100%;
  max-height: 72vh;
  margin: 0 auto;
  background: #000000;
  object-fit: contain;
}

.work-copy {
  padding: 26px 0 28px;
  border-bottom: 1px solid var(--line);
}

.work-copy h2 {
  margin: 0 0 10px;
  font-size: 19px;
}

.work-copy p {
  margin: 0;
  font-size: 17px;
  line-height: 1.9;
  text-align: justify;
}

.work-navigation {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
}

.work-navigation a,
.primary-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  text-decoration: none;
}

.work-navigation a:last-child {
  margin-left: auto;
}

.not-found {
  padding-top: 72px;
  text-align: center;
}

.not-found .eyebrow {
  margin-top: 0;
}

.not-found h1 {
  margin: 0;
  font-size: 28px;
}

.not-found > p:not(.eyebrow) {
  color: var(--muted);
}

.primary-link {
  margin-top: 14px;
  border-color: #111111;
  background: #111111;
  color: #ffffff;
}

.notice {
  max-width: var(--reading-width);
  margin: 24px auto;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}

.site-footer {
  padding: 28px 20px;
  padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (hover: hover) {
  .work-card:hover {
    transform: translateY(-3px);
    border-color: #b8b8b8;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  }

  .work-card:hover .work-card-image img {
    transform: scale(1.025);
  }

  .back-link:hover,
  .compact-brand:hover {
    color: #000000;
  }
}

@media (max-width: 820px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-right: 16px;
    padding-left: 16px;
  }

  .catalog,
  .work-detail,
  .not-found {
    padding-right: 16px;
    padding-left: 16px;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .work-card-body {
    min-height: 68px;
  }

  .work-heading h1 {
    font-size: 27px;
  }

  .video-shell {
    margin-right: -16px;
    margin-left: -16px;
    width: calc(100% + 32px);
    border-radius: 0;
  }

  .work-copy p {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
