:root {
  --text: #303030;
  --muted: #606060;
  --nav: rgb(83, 97, 77);
  --nav-hover: rgb(42, 48, 39);
  --nav-current: rgb(153, 166, 171);
  --mincho: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", "MS PMincho", "Noto Serif JP", "Noto Serif TC", serif;
  --sans: "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans TC", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* ---------- header ---------- */
.site-header { text-align: center; padding: 38px 16px 0; }
.logo { display: inline-block; }
.logo img { width: 150px; height: auto; margin: 0 auto; }
.tagline {
  display: block;
  margin-top: 6px;
  font: 9px/1.4 var(--mincho);
  letter-spacing: .2em;
  color: var(--muted);
  text-decoration: none;
}
.nav { margin: 42px auto 0; max-width: 700px; }
.nav > ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: center; align-items: center; gap: 8px 110px;
}
.nav li { position: relative; }
.nav a, .nav button {
  font: 12px/1.4 var(--mincho);
  color: var(--nav);
  text-decoration: none;
  background: none; border: 0; margin: 0; padding: 5px 10px; cursor: pointer;
  display: block; letter-spacing: normal; -webkit-appearance: none; appearance: none;
  transition: color .4s ease;
}
.nav a:hover, .nav button:hover { color: var(--nav-hover); }
.nav a[aria-current="page"], .nav .active > button { color: var(--nav-current); }
.nav .sub {
  list-style: none; margin: 0; padding: 6px 0;
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: #fff; min-width: 120px; z-index: 20;
  display: none;
}
.nav .sub a { display: block; padding: 6px 14px; white-space: nowrap; text-align: center; }
.nav .has-sub:hover .sub,
.nav .has-sub:focus-within .sub,
.nav .has-sub.open .sub { display: block; }

/* ---------- footer ---------- */
.site-footer { text-align: center; padding: 70px 16px 40px; color: var(--muted); }
.site-footer .social { display: flex; justify-content: center; gap: 14px; }
.site-footer .social a { color: #888; }
.site-footer .social a:hover { color: var(--text); }
.site-footer p { font-size: 11px; margin: 10px 0 0; letter-spacing: .02em; }

/* ---------- galleries ---------- */
.gallery {
  margin: 40px auto 0;
  width: calc(100% - 2 * 83px);
  max-width: var(--maxw);
}
.page-gallery .gallery { margin-top: 30px; }
.gallery .item { display: block; position: relative; overflow: hidden; }
/* artworks are always shown as they are: no hover dimming, filters or colour changes */
.gallery .item img { width: 100%; }

/* masonry: JS distributes items into columns (shortest column first, like Wix) */
.gallery.masonry { display: flex; gap: var(--gap); align-items: flex-start; }
.gallery.masonry .col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
/* fallback before JS runs */
.gallery.masonry:not(.ready) { display: block; columns: var(--cols); column-gap: var(--gap); }
.gallery.masonry:not(.ready) .item { break-inside: avoid; margin-bottom: var(--gap); }

.gallery.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: var(--gap);
}
.gallery.grid .item { aspect-ratio: 1; }
.gallery.grid .item img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- project page ---------- */
.project { width: calc(100% - 32px); max-width: 980px; margin: 60px auto 0; }
.slideshow .stage {
  position: relative;
  aspect-ratio: var(--ratio);
  background: #fff;
}
.slideshow .slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; opacity: 0; transition: opacity .5s ease;
}
.slideshow .slide.is-active { opacity: 1; }
.slideshow .prev, .slideshow .next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 72px; border: 0; background: none; cursor: pointer;
  font: 300 46px/1 var(--sans); color: rgba(60, 60, 60, .55);
}
.slideshow .prev { left: -60px; }
.slideshow .next { right: -60px; }
.slideshow .prev:hover, .slideshow .next:hover { color: var(--text); }
.thumbs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.thumbs button {
  width: 100px; height: 100px; padding: 0; border: 0; cursor: pointer; background: #fff;
  outline: 1px solid transparent; outline-offset: 2px; transition: outline-color .3s;
}
.thumbs button:hover { outline-color: rgba(153, 166, 171, .6); }
.thumbs button[aria-current="true"] { outline-color: var(--nav); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.single { margin: 0; }
.single img { width: 100%; }
.single.photo img { width: 600px; margin: 0 auto; }

.info { margin-top: 40px; }
.rt { margin-bottom: 28px; }
.rt p { margin: 0; font-size: 12px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.rt p.h { font-size: 14px; line-height: 1.4; letter-spacing: .02em; }
.rt p.mincho { font-family: var(--mincho); font-weight: 400; }
.rt a { text-decoration: underline; }
.back {
  display: inline-block; margin: 30px 0 0 6px;
  font: italic 13px/1 Georgia, "Times New Roman", serif;
  color: var(--text); text-decoration: none;
}
.back:hover { opacity: .6; }

/* ---------- about ---------- */
.about {
  display: grid; grid-template-columns: 437px minmax(0, 480px);
  gap: 64px; justify-content: center; align-items: start;
  width: calc(100% - 32px); max-width: 1000px; margin: 90px auto 0;
}
.about-photo { margin: 0; }
.about-text { padding-top: 60px; }
.about-name { width: 100px; margin-bottom: 8px; }
.about-text .rt { margin-bottom: 18px; }
.about-text .rt:first-of-type p { letter-spacing: .35em; }
.about-text hr { border: 0; border-top: 1px solid #555; width: 280px; margin: 0 0 30px; }

/* ---------- contact ---------- */
.contact {
  display: grid; grid-template-columns: 1fr 1.3fr; gap: 60px;
  width: calc(100% - 32px); max-width: 760px; margin: 110px auto 0;
}
.contact h1 { font: 400 22px/1.3 var(--mincho); letter-spacing: .15em; margin: 0 0 30px; }
.contact-info a { font: 13px var(--mincho); letter-spacing: .1em; text-decoration: none; }
.contact-form { display: flex; flex-wrap: wrap; gap: 18px 30px; }
.contact-form label { flex: 1 1 100%; }
.contact-form label.half { flex: 1 1 calc(50% - 15px); }
.contact-form label span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.contact-form input, .contact-form textarea {
  width: 100%; border: 0; border-bottom: 1px solid #333; border-radius: 0;
  padding: 6px 4px; font: 14px var(--mincho); color: var(--text); background: none; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-bottom-color: var(--nav-current); }
.contact-form button {
  margin: 0 auto; border: 0; background: none; cursor: pointer;
  font: italic 14px var(--mincho); color: var(--text); padding: 6px 20px;
}
.contact-form button:hover { opacity: .6; }
.form-note { flex: 1 1 100%; font-size: 12px; text-align: center; margin: 0; }

.notfound { text-align: center; margin-top: 100px; font-family: var(--mincho); }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 140; background: rgba(255, 255, 255, .97);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: calc(100vw - 140px); max-height: calc(100vh - 80px); object-fit: contain; }
.lightbox button {
  position: absolute; border: 0; background: none; cursor: pointer;
  font: 300 44px/1 var(--sans); color: #555; padding: 10px 16px;
}
.lightbox .lb-close { top: 10px; right: 14px; font-size: 34px; }
.lightbox .lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .slideshow .prev { left: 0; }
  .slideshow .next { right: 0; }
}
@media (max-width: 900px) {
  .gallery { width: calc(100% - 32px); }
  .gallery.grid { --gap: 24px; }
  .about { grid-template-columns: 1fr; gap: 30px; margin-top: 50px; max-width: 520px; }
  .about-text { padding-top: 0; }
  .contact { grid-template-columns: 1fr; gap: 30px; margin-top: 60px; max-width: 520px; }
}
@media (max-width: 600px) {
  .site-header { padding-top: 28px; }
  .nav { margin-top: 26px; }
  .nav > ul { justify-content: center; flex-wrap: wrap; gap: 0 40px; }
  .nav a, .nav button { padding: 6px 8px; }
  .gallery { width: calc(100% - 20px); }
  .gallery.grid { --cols: 2 !important; --gap: 14px; }
  .project { margin-top: 30px; }
  .thumbs button { width: 64px; height: 64px; }
  .single.photo img { width: 100%; }
  .contact-form label.half { flex-basis: 100%; }
  .lightbox img { max-width: 100vw; }
}

/* ---------- masonry cascade entrance ---------- */
/* hide cards until GSAP drops them in (only when JS runs and motion is allowed) */
@media (prefers-reduced-motion: no-preference) {
  .js .gallery.masonry .item { opacity: 0; }
}
.gallery.masonry .item { will-change: transform, opacity; transform-origin: 50% 50%; }

/* ---------- card expand detail (Pinterest-style layer) ---------- */
html { scrollbar-gutter: stable; }
.gallery { position: relative; }
.gallery .item-link { display: block; cursor: zoom-in; }
.gallery .item-link img { width: 100%; }
.item .detail[hidden] { display: none; }
.gallery .item-placeholder { visibility: hidden; }

.pin-layer { position: fixed; inset: 0; z-index: 120; visibility: hidden; }
.pin-layer.open { visibility: visible; }
.pin-bg { position: absolute; inset: 0; background: #fff; }
.pin-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; }
.pin-scroll:focus { outline: none; }
.pin-inner { width: calc(100% - 48px); max-width: 1180px; margin: 0 auto; padding: 64px 0 80px; }
.pin-close {
  position: fixed; top: 16px; right: 22px; z-index: 6;
  border: 0; background: #fff; border-radius: 50%; width: 44px; height: 44px; cursor: pointer;
  font: 300 30px/1 var(--sans); color: var(--muted);
}
.pin-close:hover { color: var(--text); }
body.pin-open { overflow: hidden; }

/* the open card: big image left, text vertically centred beside it */
.pin-slot .item.is-open {
  position: relative; opacity: 1;
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, 1fr);
  gap: 56px; align-items: center;
}
.pin-slot .item.is-open .item-link { cursor: zoom-out; }
.pin-slot .item.is-open .item-link img {
  width: 100%; height: auto; max-height: calc(100vh - 140px); object-fit: contain;
}
.pin-slot .item.is-open:hover img { opacity: 1; }
.pin-slot .detail { position: relative; padding: 0 12px 0 0; }
.pin-slot .detail-close { display: none; } /* the layer has its own × */

.detail-body .rt { margin-bottom: 22px; }
.detail-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 24px; }
.detail-thumbs button {
  width: 56px; height: 56px; padding: 0; border: 0; background: #fff; cursor: pointer;
  outline: 1px solid transparent; outline-offset: 2px; transition: outline-color .3s;
}
.detail-thumbs button:hover { outline-color: rgba(153, 166, 171, .6); }
.detail-thumbs button[aria-current="true"] { outline-color: var(--nav); }
.detail-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-more {
  display: inline-block; font: italic 13px/1 Georgia, "Times New Roman", serif;
  color: var(--text); text-decoration: none;
}
.detail-more:hover { opacity: .6; }

/* "More works" masonry below the panel */
.pin-more { margin-top: 80px; }
.pin-more-title {
  font: 400 13px/1.4 var(--mincho); letter-spacing: .25em; color: var(--nav);
  text-align: center; margin: 0 0 26px;
}
.pin-grid { display: flex; gap: 8px; align-items: flex-start; }
.pin-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pin-tile { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pin-tile img { width: 100%; height: auto; }
.pin-tile:focus-visible { outline: 2px solid var(--nav-current); outline-offset: 2px; }

@media (max-width: 760px) {
  .pin-inner { width: calc(100% - 24px); padding-top: 60px; }
  .pin-slot .item.is-open { grid-template-columns: 1fr; gap: 22px; }
  .pin-slot .item.is-open .item-link img { max-height: 70vh; }
  .pin-slot .detail { padding: 0 4px; }
  .pin-more { margin-top: 56px; }
  .pin-close { top: 8px; right: 8px; }
}

/* ---------- filterable grid ---------- */
.gallery .item.is-hidden { display: none; }

/* ---------- contact modal (open class) ---------- */
.modal { position: fixed; inset: 0; z-index: 150; visibility: hidden; transition: visibility 0s linear .35s; }
.modal.open { visibility: visible; transition-delay: 0s; }
.modal-mask {
  position: absolute; inset: 0;
  background: rgba(42, 48, 39, .28);          /* site's dark grey-green, translucent */
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .35s ease;
}
.modal.open .modal-mask { opacity: 1; }
.modal-box {
  position: absolute; left: 50%; top: 50%;
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 48px 44px 32px; background: #fff; color: var(--text);
  box-shadow: 0 18px 50px rgba(42, 48, 39, .18);
  opacity: 0; transform: translate(-50%, -40%) scale(.9);
  transition: opacity .3s ease, transform .3s ease;            /* closing: plain fade + shrink */
}
.modal.open .modal-box {
  opacity: 1; transform: translate(-50%, -50%) scale(1);
  transition: opacity .35s ease, transform .5s cubic-bezier(.3, 1.4, .5, 1); /* opening: elastic overshoot */
}
.modal-box:focus { outline: none; }
.modal-box h2 { font: 400 22px/1.3 var(--mincho); letter-spacing: .15em; margin: 0 0 14px; }
.modal-desc { font: 13px/1.9 var(--mincho); margin: 0 0 26px; color: var(--muted); }
.modal-desc a { color: var(--text); letter-spacing: .08em; text-decoration: none; }
.modal-desc a:hover { text-decoration: underline; }
.modal-x {
  position: absolute; top: 10px; right: 12px; border: 0; background: none; cursor: pointer;
  font: 300 30px/1 var(--sans); color: var(--muted); padding: 4px 8px;
}
.modal-x:hover { color: var(--text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px; }
.btn {
  min-width: 110px; padding: 10px 22px; cursor: pointer; border-radius: 0;
  font: 13px/1 var(--mincho); letter-spacing: .12em;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.btn-ghost { background: #fff; color: var(--nav); border: 1px solid var(--nav-current); }
.btn-ghost:hover { border-color: var(--nav); color: var(--nav-hover); }
.btn-solid { background: var(--nav); color: #fff; border: 1px solid var(--nav); }
.btn-solid:hover { background: var(--nav-hover); border-color: var(--nav-hover); }
.btn:focus-visible, .modal-x:focus-visible { outline: 2px solid var(--nav-current); outline-offset: 2px; }
.contact-form input[aria-invalid="true"] { border-bottom: 2px solid var(--nav-hover); }
body.modal-open { overflow: hidden; }

@media (max-width: 600px) {
  .modal-box { padding: 44px 22px 24px; }
  .modal-actions .btn { flex: 1; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .modal-box, .modal.open .modal-box { transition: opacity .2s ease; transform: translate(-50%, -50%); }
}

/* ---------- skeleton shimmer ---------- */
:root {
  /* low-contrast tones taken from the site's grey-green palette */
  --sk-base: rgba(169, 182, 164, .16);
  --sk-shine: rgba(255, 255, 255, .75);
}
.sk, .sk-loading {
  background: linear-gradient(100deg, var(--sk-base) 40%, var(--sk-shine) 50%, var(--sk-base) 60%);
  background-size: 300% 100%;
  animation: sk-shimmer 1.6s linear infinite;
}
@keyframes sk-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* page skeleton: only when JS runs, until <html> gets .is-loaded */
.skeleton { display: none; }
.js .skeleton {
  display: block; position: fixed; inset: 0; z-index: 200; background: #fff;
  padding: 38px 16px 0; overflow: hidden; transition: opacity .5s ease;
}
.js.is-loaded .skeleton { opacity: 0; pointer-events: none; }
.sk { display: block; border-radius: 2px; }
.sk-head { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 64px; }
.sk-avatar { width: 44px; height: 44px; border-radius: 50%; }
.sk-line { height: 10px; border-radius: 5px; }
.sk-grid { display: flex; gap: 8px; width: calc(100% - 166px); max-width: 1280px; margin: 0 auto; }
.sk-col { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.sk-project { width: calc(100% - 32px); max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.sk-project .sk-img { margin-bottom: 18px; }
.sk-split { display: grid; grid-template-columns: 437px 300px; gap: 64px; justify-content: center; align-items: center; }
.sk-text { display: flex; flex-direction: column; gap: 14px; }

/* real content waits, then fades in and slides up into place */
.js body > :is(.site-header, main, .site-footer) { transition: opacity .6s ease, transform .6s ease; }
.js:not(.is-loaded) body > :is(.site-header, main, .site-footer) { opacity: 0; transform: translateY(14px); }

/* per-image shimmer while each picture downloads */
.sk-loading img { opacity: 0; transform: translateY(8px); }
.sk-img-in { transition: opacity .5s ease, transform .5s ease; }

@media (max-width: 900px) {
  .sk-grid { width: calc(100% - 32px); }
  .sk-grid .sk-col:nth-child(n+4) { display: none; }
  .sk-split { grid-template-columns: 1fr; width: calc(100% - 32px); max-width: 520px; margin: 0 auto; }
}
@media (max-width: 600px) {
  .sk-grid .sk-col:nth-child(n+3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sk, .sk-loading { animation: none; }
  .js body > :is(.site-header, main, .site-footer), .js:not(.is-loaded) body > :is(.site-header, main, .site-footer) { transform: none; }
}

/* ---------- first layer: directional tabs (About / Work / Contact) ---------- */
.nav .tabs { position: relative; }
.nav .tabs a[aria-current="page"] { color: var(--nav-hover); }
.nav .nav-ink {
  position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: var(--nav-hover); pointer-events: none; opacity: 0;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1), width .45s cubic-bezier(.4, 0, .2, 1), opacity .3s ease;
}
.nav-ink.is-ready { opacity: 1; }
.nav-ink.no-anim { transition: none; }

/* ---------- second layer: capsule tabs ---------- */
.pills {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  width: calc(100% - 32px); max-width: 900px; margin: 30px auto 0;
}
.pill {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  border: 1px solid rgba(153, 166, 171, .55); background: #fff;
  font: 12px/1.3 var(--mincho); letter-spacing: .06em; color: var(--nav); text-decoration: none; white-space: nowrap;
  transition: background .35s ease, color .35s ease, border-color .35s ease;
}
.pill:hover { border-color: var(--nav); color: var(--nav-hover); }
.pill[aria-current="page"] { background: var(--nav); border-color: var(--nav); color: #fff; }
.pill:focus-visible { outline: 2px solid var(--nav-current); outline-offset: 2px; }
.page-gallery .gallery { margin-top: 26px; }

/* directional entrance after switching first-layer tabs (set by the inline head script) */
.js.tab-nav .skeleton { display: none; }
.js.tab-nav body > main { transition: opacity .45s ease, transform .45s cubic-bezier(.4, 0, .2, 1); }
.js.tab-nav:not(.is-loaded) body > main { transform: translateX(var(--enter-x, 0)); }
.js.tab-nav:not(.is-loaded) body > :is(.site-header, .site-footer) { opacity: 1; transform: none; }

@media (max-width: 600px) {
  .pills { gap: 8px; margin-top: 22px; }
  .pill { padding: 6px 12px; font-size: 11px; }
}

/* content slides sideways between tabs: never show a horizontal scrollbar for it */
body { overflow-x: clip; }

/* pictures without a description (sketches, photos): image centred, small category caption */
.pin-slot .item.is-open:not(.has-detail) { display: flex; justify-content: center; }
.pin-slot .item.is-open:not(.has-detail) img { width: auto; max-width: 100%; max-height: calc(100vh - 160px); cursor: zoom-out; }
.pin-caption {
  margin: 18px 0 0; text-align: center;
  font: 12px/1.4 var(--mincho); letter-spacing: .15em; color: var(--nav-current);
}
.pin-caption[hidden] { display: none; }

/* ---------- shop ---------- */
.shop { width: calc(100% - 32px); max-width: 1040px; margin: 60px auto 0; }
.shop-head { text-align: center; margin-bottom: 50px; }
.shop-head h1 { font: 400 22px/1.3 var(--mincho); letter-spacing: .3em; margin: 0 0 8px; }
.shop-head p { font: 12px var(--mincho); letter-spacing: .15em; color: var(--muted); margin: 0; }
.product-media {
  aspect-ratio: 4 / 3; overflow: hidden; background: #fff;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media.is-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--sk-base); color: var(--nav-current);
}
.product-media .ph-icon { width: 56px; height: 56px; opacity: .8; }
.product h2 { font: 400 20px/1.4 var(--mincho); letter-spacing: .08em; margin: 10px 0 4px; }
.product .sub { font: 12px/1.6 var(--mincho); color: var(--muted); margin: 0 0 18px; }
.product .sub span { letter-spacing: .05em; }
.product .price { font: 14px/1.9 var(--mincho); margin: 0 0 18px; }
.product .desc { font: 12px/1.9 var(--mincho); margin: 0 0 12px; color: var(--text); }
.product .desc.ja { color: var(--muted); margin-bottom: 26px; }
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font: 11px/1.3 var(--mincho); letter-spacing: .1em;
  background: var(--nav); color: #fff;
}
.badge.sold { background: #fff; color: var(--nav-current); border: 1px solid var(--nav-current); }
.featured .product { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.featured .btn { display: inline-block; text-decoration: none; }
.past-title {
  font: 400 13px/1.4 var(--mincho); letter-spacing: .25em; color: var(--nav);
  text-align: center; margin: 90px 0 28px;
}
.past { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.past .product h2 { font-size: 15px; }
.past .product .sub { margin-bottom: 0; }
.past .product-media { position: relative; }
/* sold-out photos keep their real colours; the SOLD OUT badge is enough */

/* product photos: cross-fading slideshow */
.product-media { position: relative; }
.product-media .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.product-media .slide.is-active { opacity: 1; }
.product-media:not(.is-slider) .slide { position: static; opacity: 1; }
.product-media .dots {
  position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px;
}
.product-media .dots button {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .6); box-shadow: 0 0 0 1px rgba(42, 48, 39, .15);
  transition: background .3s ease, transform .3s ease;
}
.product-media .dots button[aria-current="true"] { background: #fff; transform: scale(1.3); }

/* order form */
.modal-box.modal-wide { width: min(760px, calc(100vw - 32px)); padding: 52px 52px 36px; }
.order-title { font: 400 20px/1.4 var(--mincho); letter-spacing: .25em; text-align: center; margin: 0 0 32px !important; }
.order-title span { display: block; font-size: 12px; letter-spacing: .1em; color: var(--muted); margin-top: 6px; }
.order-foot .modal-actions { margin-top: 0; }
.order-form { display: flex; flex-direction: column; gap: 26px; }
.order-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.order-form .group { display: flex; flex-direction: column; gap: 26px; }
.order-form .group[hidden] { display: none; }
.order-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.order-form .field { display: flex; flex-direction: column; gap: 8px; }
.order-form .field > span, .order-form legend { font: 13px/1.5 var(--mincho); color: var(--text); padding: 0; margin-bottom: 8px; }
.order-form .field > span { margin-bottom: 0; }
.order-form i { font-style: normal; color: var(--nav-current); }
.order-form input:not([type=radio]), .order-form textarea {
  width: 100%; border: 0; border-bottom: 1px solid #333; border-radius: 0; background: none;
  padding: 6px 4px; font: 14px var(--mincho); color: var(--text); resize: vertical;
}
.order-form input:focus, .order-form textarea:focus { outline: none; border-bottom-color: var(--nav-current); }
.order-form [aria-invalid="true"] { border-bottom: 2px solid var(--nav-hover) !important; }
.order-form .qty input { max-width: 120px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span {
  display: block; padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(153, 166, 171, .55);
  font: 13px/1.4 var(--mincho); color: var(--nav); background: #fff;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.choice small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; transition: color .3s ease; }
.choice:hover > span { border-color: var(--nav); }
.choice input:checked + span { background: var(--nav); border-color: var(--nav); color: #fff; }
.choice input:checked + span small { color: rgba(255, 255, 255, .8); }
.choice input:focus-visible + span { outline: 2px solid var(--nav-current); outline-offset: 2px; }
.choices.is-invalid .choice > span { border-color: var(--nav-hover); }
.pay-box { background: var(--sk-base); padding: 18px 22px; font: 13px/1.9 var(--mincho); }
.pay-box p { margin: 0; }
.pay-box .pay-title { margin-bottom: 6px; color: var(--nav-hover); }
.pay-box .small { font-size: 11px; color: var(--muted); margin-top: 8px; }
.pay-note { background: var(--sk-base); padding: 14px 20px; margin: 0; font: 12px/1.9 var(--mincho); color: var(--text); }
.order-done .small { font-size: 11px; color: var(--muted); margin-top: 8px; }
.group-title { font: 13px var(--mincho); margin: 0; color: var(--nav-hover); }
.ship-note { font: 12px/1.9 var(--mincho); color: var(--muted); margin: 0; }
.order-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(153, 166, 171, .55); padding-top: 22px; }
.total { margin: 0; font: 14px var(--mincho); }
.total b { font-size: 22px; font-weight: 400; letter-spacing: .05em; margin-left: 8px; }
.form-msg { margin: 0; font: 13px var(--mincho); color: var(--nav-hover); text-align: right; }
.order-form button[disabled] { opacity: .6; cursor: progress; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.order-done { text-align: center; padding: 40px 20px; background: var(--sk-base); font: 13px/2 var(--mincho); }
.order-done:focus { outline: none; }
.order-done .done-title { font-size: 16px; color: var(--nav-hover); margin: 0 0 10px; }
.order-done p { margin: 0; }

@media (max-width: 800px) {
  .featured .product { grid-template-columns: 1fr; gap: 26px; }
  .past { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .order-form .row { grid-template-columns: 1fr; }
  .order-foot { flex-direction: column; align-items: stretch; }
  .modal-box.modal-wide { padding: 46px 20px 24px; }
}

.order-form[hidden] { display: none; }

/* product cards: space between the photo and the SOLD OUT badge */
.past .product-info { padding-top: 16px; }

/* product photos: previous / next arrows */
.product-media .arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 38px; height: 38px; border: 0; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0 0 3px;
  background: rgba(255, 255, 255, .85); color: var(--nav);
  font: 300 26px/1 var(--sans);
  box-shadow: 0 2px 8px rgba(42, 48, 39, .12);
  opacity: 0; transition: opacity .3s ease, background .3s ease, color .3s ease;
}
.product-media .arrow.prev { left: 10px; }
.product-media .arrow.next { right: 10px; }
.product-media:hover .arrow, .product-media .arrow:focus-visible { opacity: 1; }
.product-media .arrow:hover { background: var(--nav); color: #fff; }
.product-media .arrow:focus-visible { outline: 2px solid var(--nav-current); outline-offset: 2px; }
@media (hover: none) { .product-media .arrow { opacity: 1; } } /* touch screens: always visible */
@media (max-width: 600px) {
  .product-media .arrow { width: 28px; height: 28px; font-size: 20px; padding-bottom: 2px; }
  .product-media .arrow.prev { left: 6px; }
  .product-media .arrow.next { right: 6px; }
}

/* order modal: total + buttons always pinned to the bottom of the dialog */
.order-modal .modal-box { max-height: calc(100dvh - 32px); padding-bottom: 0; }
.order-form .order-foot {
  position: sticky; bottom: 0; z-index: 3;
  margin: 0 -52px; padding: 16px 52px 20px;
  background: #fff; border-top: 1px solid rgba(153, 166, 171, .55);
  box-shadow: 0 -10px 18px -12px rgba(42, 48, 39, .18);
  flex-wrap: wrap;
}
.order-foot .form-msg { flex: 1 1 100%; text-align: left; margin: 0 0 4px; }
/* while an order is being sent */
.form-sending { flex: 1 1 100%; margin: 0 0 4px; font: 13px var(--mincho); color: var(--nav); }
.order-form[aria-busy="true"] fieldset, .order-form[aria-busy="true"] .field { pointer-events: none; }
.order-form .btn.is-busy { opacity: 1; cursor: progress; } /* stays solid: it is working, not unavailable */
.btn.is-busy > .t { display: none; }
.btn-busy { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-busy .spin { width: 12px; height: 12px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: btn-spin .8s linear infinite; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn-busy .spin { animation-duration: 2.4s; } }
.order-done { margin-bottom: 36px; }
@media (max-width: 800px) {
  .order-form .order-foot { margin: 0 -20px; padding: 12px 20px 16px; flex-direction: row; align-items: center; }
  .order-foot .modal-actions { gap: 8px; }
  .order-foot .btn { min-width: 0; padding: 10px 14px; }
  .total b { font-size: 18px; }
}
@media (max-width: 420px) {
  .order-form .order-foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .order-foot .total { display: flex; justify-content: space-between; align-items: baseline; }
}

/* SEO headings: visually hidden h1 for gallery pages; project title rendered as h1 */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rt h1 { margin: 0; font-size: 14px; line-height: 1.4; letter-spacing: .02em; font-weight: 300; color: var(--text); overflow-wrap: anywhere; }

/* detail layer: share button + "link copied" toast */
.pin-share {
  position: fixed; top: 16px; right: 72px; z-index: 6;
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.pin-share:hover { color: var(--text); }
.pin-share:focus-visible, .pin-close:focus-visible { outline: 2px solid var(--nav-current); outline-offset: 2px; }
.pin-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 7; margin: 0;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--nav); color: #fff; padding: 10px 18px; border-radius: 999px;
  font: 12px/1.4 var(--mincho); letter-spacing: .05em; max-width: calc(100vw - 32px); overflow-wrap: anywhere;
  transition: opacity .3s ease, transform .3s ease;
}
.pin-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 760px) { .pin-share { top: 8px; right: 56px; } }

/* detail layer: arrows on the big image when a work has several photos */
.pin-slot .item.is-open .item-link { position: relative; }
.pin-nav .arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0 0 3px;
  background: rgba(255, 255, 255, .88); color: var(--nav);
  font: 300 30px/1 var(--sans);
  box-shadow: 0 2px 10px rgba(42, 48, 39, .14);
  transition: background .3s ease, color .3s ease;
}
.pin-nav .arrow.prev { left: 12px; }
.pin-nav .arrow.next { right: 12px; }
.pin-nav .arrow:hover { background: var(--nav); color: #fff; }
.pin-nav .arrow:focus-visible { outline: 2px solid var(--nav-current); outline-offset: 2px; }
@media (max-width: 760px) {
  .pin-nav .arrow { width: 34px; height: 34px; font-size: 24px; }
  .pin-nav .arrow.prev { left: 6px; }
  .pin-nav .arrow.next { right: 6px; }
}

/* product photos fill the frame (cropped to the card's 4:3) */
.product-media .slide { object-fit: cover; width: 100%; height: 100%; }
.product-media.is-slider { background: var(--sk-base); }

/* past calendars: as many columns as there are calendars (max 3) so two of them get big cards */
.past { grid-template-columns: repeat(var(--past-cols, 3), minmax(0, 1fr)); gap: 40px; }
.past .product h2 { font-size: 17px; }
@media (max-width: 800px) { .past { grid-template-columns: repeat(min(var(--past-cols, 3), 2), minmax(0, 1fr)); gap: 18px; } }
@media (max-width: 600px) { .past { grid-template-columns: 1fr; gap: 36px; } }

/* order form: 7-11 store lookup hint */
.store-help { margin: 0; padding: 12px 16px; background: var(--sk-base); font: 12px/1.8 var(--mincho); color: var(--text); }
.store-help a { color: var(--nav-hover); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.store-help a:hover { color: var(--nav); }
.order-form input::placeholder { color: rgba(153, 166, 171, .8); }

/* shop: the kinds of the on-sale calendar (A 標準款 / B 小卡款 / C 限定木座款) */
.variants { display: flex; flex-direction: column; gap: 18px; margin: 4px 0 18px; }
.variant { border-top: 1px solid rgba(153, 166, 171, .45); padding-top: 14px; }
.variant h3 { font: 400 15px/1.5 var(--mincho); letter-spacing: .06em; margin: 0; color: var(--text); }
.variant h3 span { font-size: 11px; color: var(--muted); margin-left: 6px; letter-spacing: .04em; }
.variant-meta { font: 11px/1.6 var(--mincho); color: var(--nav-current); margin: 2px 0 6px; letter-spacing: .05em; }
.variant-notes { margin: 0; padding: 0 0 0 1.1em; font: 12px/1.8 var(--mincho); color: var(--text); }
.variant-notes.ja { color: var(--muted); margin-top: 4px; }
.variant-price { font: 14px/1.8 var(--mincho); margin: 8px 0 0; color: var(--nav-hover); }
.variant-price small { font-size: 11px; color: var(--muted); }
.ship-line { font: 12px/1.8 var(--mincho); color: var(--muted); margin: 0 0 22px; }

/* order form: one quantity per kind */
.qty-list { display: flex; flex-direction: column; gap: 10px; }
.qty-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 4px; border-bottom: 1px solid rgba(153, 166, 171, .45);
}
.qty-item[hidden] { display: none; }
.qty-name { font: 13px/1.5 var(--mincho); color: var(--text); }
.qty-name small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.order-form .qty-item input { width: 84px; flex: none; text-align: center; border: 1px solid rgba(153, 166, 171, .7); padding: 6px; }
.order-form .qty-item input:focus { border-color: var(--nav); }
.order-form .qty-item input[aria-invalid="true"] { border: 2px solid var(--nav-hover) !important; }
.featured .product { align-items: start; }
@media (min-width: 801px) { .featured .product-media { position: sticky; top: 24px; } }

/* on-sale year: header + one card per kind, each with its own photo slideshow */
.featured .product.on-sale { display: block; }
.featured .product.on-sale .product-media { position: relative; top: auto; }
.featured-head { text-align: center; margin-bottom: 34px; }
.featured-head h2 { font: 400 22px/1.4 var(--mincho); letter-spacing: .08em; margin: 12px 0 4px; }
.featured-head .sub { margin: 0; }
.variant-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; align-items: start; }
.variant-card .variant { border-top: 0; padding-top: 16px; }
.featured-foot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 28px; margin-top: 40px; }
.featured-foot .ship-line { margin: 0; }
.featured-foot .btn { text-decoration: none; }
@media (max-width: 900px) { .variant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; } }
@media (max-width: 600px) {
  .variant-grid { grid-template-columns: 1fr; gap: 40px; }
  .featured-foot { flex-direction: column; }
}

/* order form: small picture of each kind next to its quantity */
.qty-item { justify-content: flex-start; }
.qty-item input { margin-left: auto; }
.qty-thumb { flex: none; width: 64px; height: 48px; overflow: hidden; background: var(--sk-base); display: flex; align-items: center; justify-content: center; color: var(--nav-current); }
.qty-thumb img { width: 100%; height: 100%; object-fit: cover; }
.qty-thumb .ph-icon { width: 24px; height: 24px; }

/* shop buy buttons: one per kind on desktop, floating bar on phones */
.buy-kind { display: inline-block; margin-top: 14px; text-decoration: none; min-width: 160px; text-align: center; padding: 12px 22px; }
.buy-bar { display: none; }
@media (max-width: 800px) {
  .featured .buy-kind { display: none; }
  .buy-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96); border-top: 1px solid rgba(153, 166, 171, .55);
    box-shadow: 0 -8px 20px -14px rgba(42, 48, 39, .35);
    transition: transform .35s ease;
  }
  .buy-bar-text { display: flex; flex-direction: column; min-width: 0; font-family: var(--mincho); }
  .buy-bar-text b { font-weight: 400; font-size: 14px; color: var(--text); letter-spacing: .04em; }
  .buy-bar-text span { font-size: 11px; color: var(--muted); }
  .buy-bar .btn { flex: none; text-decoration: none; padding: 12px 20px; }
  body.page-shop { padding-bottom: 76px; } /* the footer stays readable above the bar */
  body.modal-open .buy-bar { transform: translateY(110%); }
}
@media (min-width: 801px) {
  .variant-grid { align-items: stretch; }
  .variant-card { display: flex; flex-direction: column; }
  .variant-card .variant { flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
  .variant-card .buy-kind { margin-top: auto; }
  .variant-card .variant-price { margin-bottom: 16px; }
}

.no-sale { text-align: center; font: 14px/2 var(--mincho); color: var(--muted); padding: 40px 0; }

.total .discount { display: block; font-size: 11px; color: var(--muted); letter-spacing: .04em; margin-top: 2px; }
.total .discount[hidden] { display: none; }

/* order form: 穿洞 / 不穿洞 quantities right under the poster */
.qty-item.has-sub { flex-wrap: wrap; }
.qty-sub { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; padding: 4px 4px 2px 80px; }
.qty-sub label { display: flex; align-items: center; justify-content: space-between; gap: 16px; font: 13px/1.4 var(--mincho); color: var(--text); }
.qty-sub label > span small { display: block; font-size: 11px; color: var(--muted); }
.order-form .qty-sub input { width: 84px; flex: none; text-align: center; border: 1px solid rgba(153, 166, 171, .7); padding: 6px; }
.order-form .qty-sub input:focus { border-color: var(--nav); }
@media (max-width: 600px) { .qty-sub { padding-left: 0; } }

/* limited kinds */
.stock { font: 12px/1.6 var(--mincho); color: var(--nav); margin: -4px 0 4px; letter-spacing: .04em; }
.stock.is-out { color: var(--nav-hover); font-weight: 600; }
.qty-stock { display: block; color: var(--nav) !important; }
.qty-stock.is-out { color: var(--nav-hover) !important; font-weight: 600; }
.qty-item.is-out input { opacity: .45; }
.buy-kind.is-disabled { background: #fff; color: var(--nav-current); border-color: var(--nav-current); cursor: not-allowed; }

/* 日本版: 郵便番号 */
.zip-input { display: flex; align-items: center; gap: 6px; }
.zip-mark { font: 15px var(--mincho); color: var(--nav); }
.order-form .zip-input input { flex: 1; }
.zip-hint { font: 11px/1.6 var(--mincho); color: var(--nav-hover); }
