/* IMARI：写真・余白・落ち着いた文字を中心にしたトップページ。
   サイドナビを含め、ページ全体の最大幅は1200pxです。 */
:root {
  color-scheme: light;
  --bg: #fcfdfc; --ink: #223238; --muted: #61747b;
  --blue: #83aab7; --accent: #426b7a; --soft: #e7eff2;
  --line: #dbe5e7; --night: #09171b; --shadow: rgba(24, 44, 52, .12);
  --rail: 190px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #11191c; --ink: #e8eff0; --muted: #a2b4ba;
    --blue: #9fbfca; --accent: #b4d4df; --soft: #202f35;
    --line: #304147; --shadow: rgba(0, 0, 0, .3);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic", sans-serif; font-size: 15px; line-height: 1.8; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; width: 100%; height: auto; }
figure, h1, h2, h3, p { margin: 0; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
section[id], main[id], .policy-details[id] { scroll-margin-top: 30px; }
.skip-link { position: fixed; z-index: 100; left: 20px; top: 0; transform: translateY(-150%); background: var(--bg); padding: 12px 20px; border: 1px solid var(--accent); }
.skip-link:focus { transform: none; }
.page-shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); max-width: 1200px; margin-inline: auto; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 35px 26px 28px; display: flex; flex-direction: column; align-items: flex-start; overflow-y: auto; overflow-x: hidden; }
.wordmark { display: block; width: 134px; color: var(--ink); line-height: 1; }
.wordmark-art { display: block; width: 100%; height: auto; }
.wordmark-light { fill: var(--accent); }
.wordmark > span { display: block; margin-top: 16px; color: var(--muted); font-size: .45rem; letter-spacing: .09em; white-space: nowrap; }
.rail-nav { display: grid; gap: 15px; width: 100%; margin-top: 66px; }
.rail-nav a { display: block; font-size: 1.07rem; font-weight: 500; line-height: 1.3; letter-spacing: .025em; }
.rail-nav small { display: block; margin-top: 5px; color: var(--muted); font-size: .61rem; font-weight: 400; letter-spacing: .04em; }
.rail-nav a:hover { color: var(--accent); }
.rail-foot { margin-top: auto; padding-top: 48px; color: var(--muted); font-size: .61rem; letter-spacing: .07em; }
.rail-foot p { line-height: 1.9; }
.no-script-nav { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.content-column { min-width: 0; padding: 28px 42px 0 38px; }
.site-menu { display: none; }
.site-menu[hidden], .menu-panel[hidden] { display: none; }

/* 写真を大きく見せ、タイトルと操作は写真の下へ置きます。 */
.hero-wrap { position: relative; }
.hero-photo { position: relative; height: clamp(420px, 62svh, 720px); overflow: hidden; background: var(--night); }
.hero-photo figcaption { position: absolute; z-index: 2; bottom: 21px; left: 23px; color: #f0f5f6; font-size: .58rem; letter-spacing: .14em; text-shadow: 0 1px 6px #071015; }
/* サムネイル付きの横送り。動きは home-cover.js で制御します。 */
.thumbnail-cover { --slide-speed: 600ms; }
.photo-viewport { position: absolute; inset: 0; overflow: hidden; touch-action: pan-y; }
.photo-track { display: flex; width: 100%; height: 100%; transform: translate3d(0, 0, 0); transition: transform var(--slide-speed) cubic-bezier(.45, 0, .2, 1); }
.photo-track.is-instant { transition: none; }
.photo-slide { flex: 0 0 100%; min-width: 0; height: 100%; overflow: hidden; }
.photo-slide > img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.thumbnail-cover .hero-photo figcaption { top: 22px; bottom: auto; pointer-events: none; }
.photo-thumbnails { position: absolute; z-index: 3; right: 22px; bottom: 20px; display: flex; gap: 10px; }
.photo-thumbnails[hidden], .slider-autoplay[hidden] { display: none; }
.photo-thumb { position: relative; width: 64px; height: 48px; padding: 0 0 4px; border: 0; background: transparent; cursor: pointer; }
.photo-thumb img { width: 100%; height: 44px; object-fit: cover; border-radius: 2px; opacity: .65; border: 1px solid rgba(255, 255, 255, .45); box-shadow: 0 1px 8px rgba(0, 0, 0, .15); }
.photo-thumb::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.photo-thumb[aria-pressed="true"] img, .photo-thumb:hover img { opacity: 1; }
.photo-thumb[aria-pressed="true"]::after { background: #acd4d5; }
.photo-thumb:focus-visible { outline: 2px solid white; outline-offset: 4px; }
.slide-count { color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .12em; }
.slider-autoplay { min-height: 44px; padding: 8px 0 8px 12px; border: 0; background: transparent; color: var(--muted); font-size: .68rem; cursor: pointer; }
.slider-autoplay:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.opening-meta { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 57px; }
.opening-meta p { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .56rem; letter-spacing: .13em; }
.tiny-dot { display: inline-block; width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: var(--blue); }
.cover-copy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; padding: 18px 0 38px; border-bottom: 1px solid var(--line); }
.cover-copy h1 { font-family: Georgia, serif; font-size: clamp(3.6rem, 5.7vw, 6rem); font-weight: 400; line-height: 1.1; letter-spacing: -.055em; }
.cover-copy > p { color: var(--muted); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: .8rem; line-height: 2; }

/* 共通の見出し。本文は読み物のような一方向の流れにします。 */
.editorial-section { padding-top: 128px; }
.section-heading { display: flex; align-items: baseline; gap: 18px; margin-bottom: 36px; }
.section-heading h2, .section-heading > p { color: var(--ink); font-size: 1.1rem; font-weight: 500; line-height: 1.6; letter-spacing: .09em; text-transform: uppercase; }
.section-heading h2 > span, .section-heading > p > span { display: inline-block; margin-left: 20px; color: var(--muted); font-size: .7rem; letter-spacing: .04em; vertical-align: middle; }

.profile-section { padding-top: 96px; }
.profile-layout { display: grid; grid-template-columns: minmax(180px, .9fr) minmax(0, 1.5fr); align-items: center; gap: 48px; }
.profile-picture { width: min(100%, 260px); }
.profile-picture img { aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.profile-picture figcaption { text-align: center; }
.profile-picture figcaption { margin-top: 14px; color: var(--muted); font-size: .53rem; letter-spacing: .07em; }
.profile-name { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 18px; row-gap: 8px; margin-bottom: 22px; }
.profile-name h2 { margin: 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 2rem; font-weight: 500; line-height: 1.4; letter-spacing: .12em; }
.profile-handle { margin: 0; transform: translateY(5px); color: var(--muted); font-size: .72rem; font-weight: 400; line-height: 1.6; letter-spacing: .07em; }
.profile-bio { margin: 0; color: var(--ink); font-family: "Yu Mincho", serif; font-size: 1rem; font-weight: 400; line-height: 1.8; letter-spacing: .04em; }

.links-section { padding-top: 88px; }
.social-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; }
.social-links a { display: flex; align-items: center; gap: 17px; min-height: 92px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.social-symbol { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; color: var(--ink); background: var(--soft); border-radius: 12px; transition: background .2s ease; }
.social-symbol svg { display: block; width: 22px; height: 22px; }
.social-links small { display: block; margin-top: 4px; color: var(--muted); font-size: .65rem; overflow-wrap: anywhere; }
.external-arrow { margin-left: auto; color: var(--accent); }
.social-links a:hover { color: var(--accent); border-color: var(--accent); }
.social-links a:hover .social-symbol { background: var(--line); }

/* トップの作品セレクション。画像の縦横比を保ち、切り抜かずに見せます。 */
.selected-gallery { padding-top: 88px; }
.selected-gallery .section-heading { margin-bottom: 14px; }
.gallery-intro { margin-bottom: 32px; color: var(--muted); font-family: "Yu Mincho", serif; font-size: .83rem; }
.selected-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 18px; align-items: start; }
/* 正方形の展示枠に余白を取り、縦・横・正方形の写真をすべて切り抜かずに収めます。 */
.selected-photo { min-width: 0; }
.selected-photo-link { position: relative; display: grid; place-items: center; aspect-ratio: 1; background: var(--soft); cursor: zoom-in; }
.selected-photo-link img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.photo-expand { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.5); color: #fff; background: rgba(9,23,27,.4); font-size: .9rem; transition: background .2s ease; }
.selected-photo-link:hover .photo-expand { background: rgba(9,23,27,.85); }
.selected-photo figcaption { display: flex; gap: 12px; margin-top: 12px; color: var(--muted); font-size: .65rem; letter-spacing: .05em; }
.selected-photo figcaption > span { color: var(--accent); font-variant-numeric: tabular-nums; font-size: .58rem; }
.gallery-hint { margin-top: 28px; color: var(--muted); font-size: .68rem; }

/* ネイティブの dialog で、背景の操作を止めて写真に集中できる拡大表示。 */
body.photo-lightbox-active { overflow: hidden; }
.photo-lightbox { position: fixed; inset: 0; width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #081114; color: #edf3f4; }
.photo-lightbox:not([open]), .photo-lightbox [hidden] { display: none; }
.photo-lightbox::backdrop { background: rgba(3,8,10,.97); }
.photo-lightbox-inner { height: 100%; display: grid; grid-template-rows: minmax(0,1fr) auto; gap: 14px; padding: 66px 70px 22px; }
.photo-lightbox button { min-width: 44px; min-height: 44px; border: 1px solid rgba(237,243,244,.25); background: transparent; color: inherit; cursor: pointer; }
.photo-lightbox button:hover { border-color: #edf3f4; background: rgba(255,255,255,.05); }
.photo-lightbox button:focus-visible { outline: 2px solid #c9e6ec; outline-offset: 4px; }
.photo-lightbox-close { position: absolute; top: max(14px,env(safe-area-inset-top)); right: max(24px,env(safe-area-inset-right)); display: flex; align-items: center; gap: 20px; padding: 0 14px; font-size: .7rem; }
.photo-lightbox-close span { font-size: 1.3rem; }
.photo-lightbox-figure { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) auto; gap: 14px; }
.photo-lightbox-stage { position: relative; min-width: 0; min-height: 0; display: grid; place-items: center; touch-action: pan-y pinch-zoom; }
.photo-lightbox-image { width: 100%; height: 100%; min-height: 0; object-fit: contain; animation: gallery-photo-enter .18s ease-out; }
.photo-lightbox-status { color: #b3c3c8; font-size: .8rem; }
.photo-lightbox-figure figcaption { display: flex; justify-content: space-between; align-items: center; gap: 20px; color: #b3c3c8; font-size: .72rem; }
.photo-lightbox-count { flex-shrink: 0; font-variant-numeric: tabular-nums; letter-spacing: .1em; }
.photo-lightbox-controls { display: flex; justify-content: center; align-items: center; gap: 28px; }
.photo-lightbox-controls > span { color: #b3c3c8; font-size: .55rem; letter-spacing: .13em; }
.photo-lightbox-controls button { font-size: 1.25rem; }
@keyframes gallery-photo-enter { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: scale(1); } }

/* 実績画像はトリミングせず、表紙・文字まで全体を表示します。 */
.works-section { padding-top: 88px; }
.works-list { border-top: 1px solid var(--line); }
.work-item { border-bottom: 1px solid var(--line); }
.work-item a { display: grid; grid-template-columns: 154px minmax(0, 1fr) 24px; gap: 30px; align-items: center; padding: 28px 0; }
.work-image { display: grid; place-items: center; width: 154px; height: 168px; background: var(--soft); padding: 8px; }
.work-image img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.work-type { display: block; margin-bottom: 10px; color: var(--muted); font-size: .59rem; letter-spacing: .13em; }
.work-item h3 { font-size: 1rem; font-weight: 400; line-height: 1.8; }
.work-item p { margin-top: 9px; color: var(--muted); font-size: .77rem; }
.work-arrow { color: var(--accent); text-align: right; transition: transform .2s ease; }
.work-item a:hover h3 { text-decoration: underline; text-underline-offset: 5px; }
.work-item a:hover .work-arrow { transform: translate(2px, -2px); }

.contact-section { padding-top: 88px; }
.contact-body { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 56px; }
.contact-title { font-family: "Yu Mincho", serif; font-size: clamp(1.5rem, 2.7vw, 2.4rem); line-height: 1.8; }
.contact-body > div { color: var(--muted); font-size: .83rem; }
.contact-response { margin-top: 20px; }
.contact-note { margin-top: 14px; font-size: .8rem; line-height: 2; }
.contact-form-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 100%; min-height: 52px; margin-top: 26px; padding: 12px 20px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); font-size: .78rem; line-height: 1.6; }
.contact-form-link:hover { border-color: var(--accent); color: var(--accent); }
.contact-form-link > span[aria-hidden] { flex-shrink: 0; }
.contact-form-caption { margin-top: 8px; font-size: .65rem; }
.policy-section { padding-top: 88px; }
.policy-details { border-top: 1px solid var(--line); }
.policy-details:last-child { border-bottom: 1px solid var(--line); }
.policy-details > summary { display: flex; justify-content: space-between; align-items: center; min-height: 60px; padding: 16px 0; gap: 20px; font-size: .76rem; list-style: none; cursor: pointer; }
.policy-details > summary::-webkit-details-marker { display: none; }
.policy-details > summary:hover { color: var(--accent); }
.policy-toggle { color: var(--accent); font-size: 1.1rem; }
.policy-toggle::before { content: "+"; }
.policy-details[open] .policy-toggle::before { content: "−"; }
.policy-content { max-width: 800px; padding: 12px 0 30px; color: var(--muted); font-size: .79rem; line-height: 2; overflow-wrap: anywhere; }
.policy-content p + p { margin-top: 14px; }
.policy-content h4 { margin: 24px 0 8px; color: var(--ink); font-size: .85rem; font-weight: 500; }
.policy-part > h3 { margin: 0 0 24px; color: var(--ink); font-size: 1rem; font-weight: 500; }
.policy-part + .policy-part { margin-top: 40px; padding-top: 36px; border-top: 1px solid var(--line); }
.policy-content .policy-date { font-size: .64rem; }
.policy-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.page-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 56px 0 34px; color: var(--muted); font-size: .63rem; }
.page-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.page-footer a:hover { color: var(--accent); }

@media (max-width: 1100px) {
  :root { --rail: 170px; }
  .sidebar { padding-inline: 23px; }
  .wordmark { width: 124px; }
  .content-column { padding-inline: 30px; }
  .profile-layout { gap: 20px 38px; }
  .social-links { gap: 16px; }
  .social-links a { gap: 12px; }
  .social-links .external-arrow { display: block; }

  .contact-body { gap: 32px; }
}
@media (max-width: 760px) {
  .page-shell { display: block; }
  .sidebar { position: relative; top: auto; height: auto; min-height: 102px; padding: 24px 22px; flex-direction: row; align-items: center; flex-wrap: wrap; justify-content: space-between; overflow: visible; }
  .wordmark { width: 126px; }
  .wordmark > span { margin-top: 9px; font-size: .42rem; }
  .rail-nav, .rail-foot { display: none; }
  .content-column { padding: 0 22px; }
  .site-menu { display: block; position: fixed; z-index: 50; top: max(27px, env(safe-area-inset-top)); right: max(22px, env(safe-area-inset-right)); }
  .menu-toggle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 0; background: var(--bg); color: var(--ink); cursor: pointer; }
  .menu-toggle > span { display: block; width: 19px; height: 1px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
  .menu-toggle[aria-expanded="true"] > span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] > span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] > span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .menu-panel { position: absolute; right: 0; top: 56px; width: 310px; max-width: calc(100vw - 44px); max-height: calc(100vh - 110px); max-height: calc(100svh - 110px); overflow-y: auto; overscroll-behavior: contain; padding: 24px; border: 1px solid var(--line); background: var(--bg); box-shadow: 0 14px 48px var(--shadow); }
  .menu-panel > p { margin-bottom: 12px; color: var(--muted); font-size: .6rem; letter-spacing: .14em; }
  .menu-panel a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
  .menu-panel a:last-child { border-bottom: 0; }
  .menu-panel small { color: var(--muted); font-size: .64rem; }
  .no-script-nav { font-size: .72rem; }
  section[id], .policy-details[id] { scroll-margin-top: 100px; }
  .hero-photo { height: clamp(420px, 65svh, 620px); }
  .hero-photo figcaption { left: 15px; bottom: 18px; font-size: .5rem; letter-spacing: .07em; }
  .opening-meta { gap: 12px; }
  .opening-meta p { font-size: .49rem; gap: 7px; letter-spacing: .04em; }
  .cover-copy { padding: 14px 0 28px; gap: 18px; }
  .cover-copy h1 { font-size: clamp(2.7rem, 12vw, 4.3rem); }
  .cover-copy > p { font-size: .78rem; }
  .editorial-section { padding-top: 78px; }
  .section-heading { gap: 11px; margin-bottom: 28px; }
  .section-heading h2, .section-heading > p { font-size: 1rem; }
  .section-heading h2 > span, .section-heading > p > span { margin-left: 12px; font-size: .59rem; }

  .profile-layout { grid-template-columns: 1fr; gap: 28px; }
  .profile-picture { width: min(64%, 240px); }
  .profile-picture figcaption { font-size: .43rem; }
  .profile-bio { font-size: .79rem; }
  .social-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; }
  .social-links a { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; min-height: 86px; font-size: .87rem; }
  .social-symbol { width: 32px; height: 36px; border-radius: 9px; }
  .social-symbol svg { width: 20px; height: 20px; }
  .social-links small { font-size: .6rem; }
  .social-links .external-arrow { display: none; }

  .selected-gallery-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px 12px; }
  .selected-photo figcaption { gap: 8px; font-size: .61rem; }
  .gallery-intro { margin-bottom: 26px; font-size: .79rem; }
  .photo-expand { right: 7px; bottom: 7px; width: 24px; height: 24px; }
  .photo-lightbox-inner { gap: 12px; padding: 72px 16px max(18px,env(safe-area-inset-bottom)); }
  .photo-lightbox-close { right: max(16px,env(safe-area-inset-right)); }
  .photo-lightbox-figure figcaption { font-size: .68rem; }

  .work-item a { grid-template-columns: 88px minmax(0, 1fr); gap: 18px; padding-block: 24px; }
  .work-image { width: 88px; height: 116px; padding: 4px; }
  .work-arrow { display: none; }
  .work-type { margin-bottom: 6px; font-size: .52rem; }
  .work-item h3 { font-size: .88rem; }
  .work-item p { font-size: .73rem; }

  .contact-body { grid-template-columns: 1fr; gap: 24px; }
  .contact-title { font-size: 1.65rem; }
  .page-footer { padding-top: 34px; font-size: .59rem; }
  .profile-name { column-gap: 14px; margin-bottom: 20px; }
  .profile-name h2 { margin: 0; font-size: 1.8rem; }
  .profile-handle { font-size: .65rem; }
  .photo-thumbnails { right: 12px; bottom: 17px; gap: 5px; }
  .photo-thumb { width: 44px; height: 44px; }
  .photo-thumb img { height: 40px; }
  .thumbnail-cover .hero-photo figcaption { top: 18px; left: 15px; }
  .slider-autoplay { font-size: .6rem; white-space: nowrap; }
  .thumbnail-cover .opening-meta p { font-size: .47rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .photo-lightbox-image { animation: none; }
}
