:root { --accent: #e60000; color-scheme: dark; font-family: "Noto Sans JP", "Yu Gothic", sans-serif; background: #101110; color: #f2f0ea; }
* { box-sizing: border-box; }
body { margin: 0; }
header, main { width: min(960px, calc(100% - 48px)); margin-inline: auto; }
header { padding-block: 32px; border-bottom: 1px solid #343530; }
a { color: inherit; text-underline-offset: 5px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.wordmark { font-weight: 800; letter-spacing: .06em; text-decoration: none; }
.wordmark span { color: var(--accent); }
main { padding-block: clamp(48px, 9vw, 112px); }
h1 { margin: 0; font-size: clamp(28px, 5vw, 52px); line-height: 1.5; overflow-wrap: anywhere; }
.work-description { min-height: 160px; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.work-link { display: inline-flex; align-items: center; gap: 32px; padding: 18px 28px; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; }
.work-link:hover { background: #c90000; }
.back-link { padding-block: 16px; }

/* 作品紹介の共通テンプレート。既存ページは work-detail の付与時に適用。 */
.work-detail { --muted: #b1b3a9; --rule: #343530; }
.work-detail .detail-header,
.work-detail .case-layout,
.work-detail .detail-footer { width: min(1280px, calc(100% - 96px)); margin-inline: auto; }
.detail-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.index-link { font-size: 13px; text-decoration: none; }
.index-link span { margin-right: 8px; color: var(--accent); }
.case-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 72px; padding-block: 72px 96px; }
.case-copy, .case-gallery { min-width: 0; }
.case-category { margin: 0 0 24px; color: var(--muted); font-size: 12px; letter-spacing: .1em; }
.case-category span { padding-inline: 10px; color: var(--accent); }
.work-detail h1 { font-size: clamp(40px, 4.3vw, 60px); line-height: 1.25; letter-spacing: .04em; font-weight: 700; text-wrap: balance; }
.case-lead { margin: 28px 0; font-size: clamp(21px, 2.1vw, 28px); line-height: 1.8; letter-spacing: .02em; }
.case-overview > p:first-child, .case-section > p:not(.section-number) { color: #c4c6bd; font-size: 16px; line-height: 1.95; margin: 0 0 18px; }
.case-overview .work-link { margin-top: 12px; min-height: 56px; justify-content: space-between; min-width: 222px; }
.case-note { color: var(--muted); margin: 16px 0 0; font-size: 12px; line-height: 1.8; }
.case-section { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--rule); }
.section-number { color: var(--accent); font-size: 12px; letter-spacing: .08em; margin: 0 0 18px; }
.case-section h2 { font-size: 23px; font-weight: 500; line-height: 1.65; margin: 0 0 20px; letter-spacing: .02em; }
.case-info h2 { font-size: 15px; }
.case-info dl { margin: 0; font-size: 13px; line-height: 1.9; }
.case-info dl > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; padding-block: 12px; border-bottom: 1px solid #262824; }
.case-info dt { color: var(--muted); }
.case-info dd { margin: 0; }
.case-gallery { display: flex; flex-direction: column; gap: 40px; }
.case-visual { margin: 0; min-width: 0; }
.visual-link { display: block; position: relative; border: 1px solid #42453c; text-decoration: none; cursor: zoom-in; }
.visual-link img { display: block; width: 100%; height: auto; }
.visual-link:hover { border-color: var(--accent); }
.screen-bar { display: flex; align-items: center; gap: 20px; padding: 12px 16px; background: #20231e; font-size: 10px; color: #b1b3a9; letter-spacing: .08em; }
.screen-dots { color: #6e7366; font-size: 8px; }
.expand-mark { margin-left: auto; font-size: 15px; }
.image-expand { position: absolute; bottom: 12px; right: 12px; padding: 7px 10px; background: #101110; color: #f2f0ea; font-size: 11px; }
.case-visual figcaption { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.figure-index { flex-shrink: 0; color: #969b8e; font-size: 10px; letter-spacing: .12em; }
.mobile-stage { background: #1b211c; display: flex; align-items: center; justify-content: center; gap: 36px; padding: 40px 28px; }
.mobile-screen { width: 50%; max-width: 280px; border: 5px solid #41483e; border-radius: 18px; overflow: hidden; }
.mobile-label { font-size: 12px; color: #c0c8bc; line-height: 2; letter-spacing: .06em; }
.mobile-label span { display: block; color: var(--accent); margin-top: 12px; font-size: 24px; }
.detail-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 24px 40px; border-top: 1px solid #343530; font-size: 13px; }
.detail-footer a { text-decoration: none; }
.footer-visit { padding-block: 16px; }
.footer-visit span[aria-hidden] { color: var(--accent); margin-left: 16px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 12px; left: 12px; padding: 12px; background: var(--accent); color: #fff; z-index: 10; }
.image-open { overflow: hidden; }
.image-dialog { width: min(1400px, 96vw); max-width: 96vw; max-height: 94dvh; padding: 52px 12px 12px; border: 1px solid #555b4e; background: #171a16; color: #f2f0ea; }
.image-dialog::backdrop { background: #000d; }
.image-dialog img { display: block; width: auto; max-width: 100%; max-height: calc(94dvh - 80px); margin: auto; object-fit: contain; }
.dialog-close { position: absolute; top: 4px; right: 12px; min-height: 44px; padding: 8px 12px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.dialog-close:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 1100px) and (min-width: 901px) {
  .case-layout { gap: 40px; }
  .mobile-stage { gap: 20px; padding-inline: 20px; }
}
@media (max-width: 900px) {
  .work-detail .detail-header, .work-detail .case-layout, .work-detail .detail-footer { width: min(640px, calc(100% - 40px)); }
  .detail-header { padding-block: 24px; }
  .wordmark { font-size: 14px; }
  .index-link { font-size: 12px; }
  .case-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-block: 40px 56px; }
  .case-copy, .case-gallery { display: contents; }
  .case-heading { grid-row: 1; }
  .visual-main { grid-row: 2; margin-bottom: 28px; }
  .case-overview { grid-row: 3; }
  .case-intent { grid-row: 4; }
  .case-design { grid-row: 5; }
  .visual-design { grid-row: 6; }
  .case-feature { grid-row: 7; }
  .visual-feature { grid-row: 8; }
  .case-responsive { grid-row: 9; }
  .visual-responsive { grid-row: 10; }
  .case-info { grid-row: 11; }
  .case-category { margin-bottom: 18px; font-size: 11px; }
  .case-lead { margin-block: 20px 28px; font-size: 22px; }
  .case-section { margin-top: 36px; padding-top: 24px; }
  .case-section h2 { font-size: 22px; }
  .case-visual figcaption { font-size: 11px; }
  .mobile-stage { padding: 28px 20px; gap: 24px; }
  .mobile-screen { width: 58%; }
  .mobile-label { font-size: 10px; }
  .detail-footer { font-size: 12px; gap: 12px; }
}
