:root {
  --red: #ee2e31;
  --ink: #111;
  --muted: #6d6d6d;
  --line: rgba(17,17,17,.1);
  --soft: #f5f5f3;
  --page: #fbfbfa;
  --green: #06a64f;
}

*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: "Noto Sans JP","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;
  letter-spacing: .015em;
  -webkit-font-smoothing: antialiased;
}
body.modal-open,body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button,input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.site-page { min-height: 100vh; }
.site-header {
  position: sticky;
  z-index: 200;
  top: 0;
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid rgba(17,17,17,.08);
  backdrop-filter: blur(18px) saturate(1.25);
}
.header-inner {
  display: flex;
  width: min(1240px,calc(100% - 48px));
  height: 82px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; flex: none; }
.brand-logo { display: block; width: 104px; height: 58px; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(140,28,19,.15)); }
.header-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.desktop-nav { display: flex; align-items: center; }
.nav-line,.mobile-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .04em;
  box-shadow: 0 10px 24px rgba(6,166,79,.22);
  transition: transform .25s ease,box-shadow .25s ease;
}
.nav-line:hover,.mobile-line:hover { transform: translateY(-2px); box-shadow: 0 15px 28px rgba(6,166,79,.28); }
.mobile-line { display: none; }
.mobile-menu { display: block; flex: none; }
.menu-toggle {
  position: relative;
  z-index: 230;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-content: center;
  gap: 5px;
  background: rgba(255,255,255,.94);
  color: var(--ink);
  border: 1px solid rgba(17,17,17,.13);
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(17,17,17,.08);
}
.menu-toggle span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 999px; transition: transform .25s ease,opacity .2s ease; }
.menu-toggle.is-open span:first-child { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu-panel { position: fixed; z-index: 220; visibility: hidden; pointer-events: none; inset: 82px 0 0; }
.mobile-menu-panel.is-open { visibility: visible; pointer-events: auto; }
.mobile-menu-backdrop { position: absolute; width: 100%; height: 100%; padding: 0; inset: 0; opacity: 0; background: rgba(17,17,17,.42); border: 0; transition: opacity .25s ease; }
.mobile-menu-panel.is-open .mobile-menu-backdrop { opacity: 1; }
.mobile-menu-nav { position: relative; width: min(420px,92vw); height: 100%; margin-left: auto; padding: 32px 30px max(32px,env(safe-area-inset-bottom)); overflow-y: auto; background: #fffaf6; box-shadow: -20px 0 50px rgba(17,17,17,.18); transform: translateX(100%); transition: transform .28s cubic-bezier(.22,.75,.25,1); }
.mobile-menu-panel.is-open .mobile-menu-nav { transform: translateX(0); }
.mobile-menu-nav>p { margin: 0 0 18px; color: var(--red); font-size: 11px; font-weight: 900; letter-spacing: .2em; }
.mobile-menu-links { border-top: 1px solid var(--line); }
.mobile-menu-links a { display: flex; min-height: 56px; align-items: center; gap: 14px; padding: 0 4px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 800; }
.mobile-menu-links a:hover { color: var(--red); }
.mobile-menu-links a span { color: var(--red); font: italic 12px Georgia,serif; }
.mobile-menu-line { display: flex; min-height: 54px; align-items: center; justify-content: center; margin-top: 24px; background: var(--green); color: #fff; border-radius: 999px; font-size: 13px; font-weight: 900; box-shadow: 0 12px 28px rgba(6,166,79,.22); }

@media (max-width:900px) {
  .header-inner { width: 100%; height: 72px; padding: 7px 18px; gap: 10px; }
  .brand { min-width: 0; margin-right: auto; }
  .brand-logo { width: 84px; height: 50px; }
  .header-actions { gap: 8px; margin-left: 0; }
  .desktop-nav { display: none; }
  .mobile-line { display: inline-flex; flex: none; min-height: 42px; padding: 10px 15px; font-size: 11px; }
  .menu-toggle { width: 44px; height: 44px; }
  .mobile-menu-panel { inset: 72px 0 0; }
  .mobile-menu-nav { width: min(380px,90vw); padding: 28px 24px max(28px,env(safe-area-inset-bottom)); }
}

@media (max-width:420px) {
  .header-inner { padding-right: 12px; padding-left: 12px; }
  .mobile-line { min-height: 40px; padding: 9px 12px; font-size: 10px; }
}

.works-hero {
  width: min(calc(100% - 48px),1680px);
  margin: 0 auto;
  padding: clamp(76px,8vw,132px) 0 clamp(70px,7vw,112px);
}
.eyebrow {
  margin: 0 0 20px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .22em;
}
.works-hero h1 {
  max-width: 940px;
  margin: 0;
  font-size: clamp(37px,4.45vw,76px);
  font-weight: 900;
  line-height: 1.23;
  letter-spacing: -.055em;
}
.hero-title-line { display: block; }
.hero-title-segment { display: inline; }
.hero-copy { margin: 30px 0 0; color: #666; font-size: clamp(14px,1.1vw,17px); font-weight: 500; line-height: 1.9; }
.category-jump { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; max-width: 960px; margin-top: clamp(48px,6vw,82px); }
.category-jump a {
  display: flex;
  min-height: 74px;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  font-size: 14px;
  font-weight: 800;
  transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.category-jump a:hover { transform: translateY(-2px); border-color: rgba(238,46,49,.35); box-shadow: 0 14px 34px rgba(20,20,20,.07); }
.category-jump span { color: var(--red); font-size: 11px; font-weight: 900; letter-spacing: .12em; }

.category-section { padding: clamp(78px,7.4vw,126px) 0; scroll-margin-top: 74px; }
.category-section:nth-child(odd) { background: #fff; }
.category-section:nth-child(even) { background: var(--soft); }
.section-inner { width: min(calc(100% - 48px),1680px); margin: 0 auto; }
.section-heading { position: relative; display: grid; grid-template-columns: 60px minmax(0,1fr); gap: 22px; align-items: start; margin-bottom: clamp(48px,5vw,76px); }
.section-number { padding-top: 10px; color: var(--red); font-size: 13px; font-weight: 900; letter-spacing: .18em; }
.section-title-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px 18px; }
.section-heading h2 { margin: 0; font-size: clamp(27px,2.5vw,40px); line-height: 1.25; letter-spacing: -.045em; }
.section-heading p { margin: 13px 0 0; color: var(--muted); font-size: 14px; font-weight: 500; }
.work-count { color: #a2a2a2; font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.swipe-note { display: none; }

.works-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 60px 18px; }
.work-card { min-width: 0; text-align: center; }
.work-card>a { display: block; }
.phone-shell {
  display: block;
  position: relative;
  width: 202px;
  height: 363px;
  margin: 0 auto 24px;
  padding: 6px;
  overflow: hidden;
  background: #191919;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 28px;
  box-shadow: 0 22px 46px rgba(20,20,20,.17),inset 0 0 0 1px #050505;
  transform: translateZ(0);
  transition: transform .28s cubic-bezier(.2,.7,.2,1),box-shadow .28s ease;
}
.work-card a:hover .phone-shell { transform: translateY(-7px); box-shadow: 0 30px 62px rgba(20,20,20,.22),inset 0 0 0 1px #050505; }
.phone-screen { display: block; position: relative; width: 190px; height: 351px; overflow: hidden; background: #eee; border-radius: 22px; }
.phone-speaker { position: absolute; z-index: 3; top: 11px; left: 50%; width: 48px; height: 12px; transform: translateX(-50%); background: #171717; border-radius: 999px; pointer-events: none; }
.site-frame { position: absolute; top: 0; left: 0; width: 390px; height: 720px; border: 0; background: #fff; transform: scale(.48718); transform-origin: top left; pointer-events: none; }
.preview-loading { display: grid; height: 100%; place-items: center; background: linear-gradient(145deg,#f5f5f5,#e9e9e9); }
.preview-loading span { width: 28px; height: 28px; border: 2px solid #ddd; border-top-color: var(--red); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.work-title-row { display: flex; min-height: 44px; align-items: flex-start; justify-content: center; gap: 8px; }
.work-title { display: block; max-width: 185px; font-size: 13px; font-weight: 800; line-height: 1.55; }
.work-title-row svg { width: 14px; flex: 0 0 14px; margin-top: 3px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.work-host { display: block; overflow: hidden; margin-top: 3px; color: #a0a0a0; font-size: 9px; font-weight: 650; letter-spacing: .05em; text-overflow: ellipsis; white-space: nowrap; }
.empty-works { display: flex; min-height: 230px; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed rgba(17,17,17,.17); border-radius: 26px; text-align: center; }
.empty-works span { color: var(--red); font-size: 10px; font-weight: 900; letter-spacing: .2em; }
.empty-works p { margin: 13px 0 0; color: #777; font-size: 13px; font-weight: 600; }
.load-error { padding: 30px; border: 1px solid #f2c7c8; border-radius: 18px; background: #fff6f6; color: #a32225; font-size: 13px; font-weight: 700; text-align: center; }

.site-footer { padding: 42px clamp(20px,3.2vw,58px); background: #111; color: rgba(255,255,255,.45); font-size: 9px; font-weight: 700; letter-spacing: .14em; text-align: center; text-transform: uppercase; }
.site-footer p { margin: 0; }

.checkout-modal { position: fixed; z-index: 1000; inset: 0; }
.modal-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(0,0,0,.62); }
.modal-positioner { position: relative; display: flex; min-height: 100%; align-items: center; justify-content: center; padding: 18px; pointer-events: none; }
.modal-dialog { width: min(100%,560px); overflow: hidden; background: #fff; border: 1px solid rgba(0,0,0,.1); border-radius: 24px; box-shadow: 0 28px 80px rgba(0,0,0,.32); pointer-events: auto; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px; border-bottom: 1px solid var(--line); }
.modal-header h3 { margin: 0; font-size: 19px; }
.modal-close { padding: 0; border: 0; background: transparent; color: #888; font-size: 25px; line-height: 1; }
.modal-body { padding: 25px 26px 27px; }
.confirm-box { padding: 16px; background: #f5f5f5; border-radius: 16px; }
.confirm-box ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; color: #444; font-size: 13px; line-height: 1.7; }
.confirm-box li::before { content: "・"; }
.modal-check { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; color: #444; font-size: 13px; font-weight: 600; }
.modal-check input,.terms-options input { width: 17px; height: 17px; accent-color: #111; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions button { min-height: 48px; padding: 0 18px; border: 0; border-radius: 14px; font-size: 13px; font-weight: 800; }
.modal-actions button:disabled { opacity: .38; cursor: not-allowed; }
.button-muted { background: #eee; color: #555; }
.button-dark { flex: 1; background: #111; color: #fff; }
#stepTerms h4 { margin: 0; font-size: 16px; }
.terms-link { display: flex; min-height: 50px; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; border: 1px solid #ddd; border-radius: 14px; font-size: 13px; font-weight: 800; }
.terms-note { margin: 8px 0 0; color: #888; font-size: 11px; font-weight: 700; }
.terms-options { display: grid; gap: 10px; margin-top: 18px; }
.terms-options label { display: flex; align-items: center; gap: 9px; color: #444; font-size: 13px; font-weight: 700; }
.checkout-error { margin: 14px 0 0; color: #c91d21; font-size: 12px; font-weight: 700; }

@media (max-width:1319px) { .works-grid { grid-template-columns: repeat(5,minmax(0,1fr)); } }
@media (max-width:1119px) { .works-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width:919px) { .works-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }

@media (max-width:767px) {
  html { scroll-padding-top: 70px; }
  .works-hero { width: calc(100% - 32px); padding: 70px 0 66px; }
  .eyebrow { margin-bottom: 14px; }
  .works-hero h1 { font-size: clamp(31px,8.8vw,38px); line-height: 1.3; }
  .hero-title-segment { display: block; }
  .hero-copy { margin-top: 22px; font-size: 12px; line-height: 1.9; }
  .category-jump { grid-template-columns: 1fr; gap: 8px; margin-top: 42px; }
  .category-jump a { min-height: 58px; padding: 0 17px; border-radius: 14px; font-size: 12px; }
  .category-section { padding: 68px 0; }
  .section-inner { width: 100%; }
  .section-heading { grid-template-columns: 34px minmax(0,1fr); gap: 9px; margin: 0 16px 38px; }
  .section-number { padding-top: 6px; font-size: 10px; }
  .section-heading h2 { font-size: 24px; }
  .section-heading p { margin-top: 9px; font-size: 12px; }
  .work-count { display: none; }
  .swipe-note { display: block; position: absolute; right: 0; bottom: -24px; color: #999; font-size: 8px; font-weight: 900; letter-spacing: .13em; }
  .category-section.is-empty .swipe-note { display: none; }
  .works-grid { display: flex; gap: 10px; overflow-x: auto; padding: 4px 16px 18px; scroll-padding: 16px; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .works-grid::-webkit-scrollbar { display: none; }
  .work-card { flex: 0 0 78vw; max-width: 272px; scroll-snap-align: start; }
  .phone-shell { width: 186px; height: 334px; margin-bottom: 21px; padding: 5px; border-radius: 25px; }
  .phone-screen { width: 176px; height: 324px; border-radius: 20px; }
  .site-frame { transform: scale(.45128); }
  .phone-speaker { top: 10px; width: 44px; height: 11px; }
  .work-title-row { min-height: 40px; }
  .work-title { max-width: 210px; font-size: 12px; }
  .empty-works { min-height: 190px; margin: 0 16px; border-radius: 20px; }
  .modal-positioner { align-items: flex-end; padding: 10px; }
  .modal-dialog { border-radius: 22px 22px 16px 16px; }
  .modal-header,.modal-body { padding-left: 19px; padding-right: 19px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions button { width: 100%; }
}

@media (hover:none) and (pointer:coarse) { .work-card a:hover .phone-shell { transform: none; } }
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
