:root{
  --bg:#0f1113; --panel:#171a1d; --line:#2a2f34; --text:#eceae4; --sub:#a5a9a8;
  --accent:#d9b26a; --accent-ink:#1a1407;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--bg);color:var(--text);
  font-family:"Hiragino Sans","Yu Gothic UI","Meiryo",system-ui,sans-serif;line-height:1.7;-webkit-text-size-adjust:100%}
a{color:inherit}
[hidden]{display:none!important}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.4em;min-height:44px;padding:0 1.3em;
  border:1px solid var(--line);border-radius:999px;background:var(--panel);color:var(--text);
  font:inherit;font-size:.95rem;text-decoration:none;cursor:pointer;white-space:nowrap}
.btn:hover{border-color:var(--accent)}
.btn:focus-visible,.handle:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:700}
.btn.disabled{opacity:.35;pointer-events:none}
.badge{display:inline-block;padding:.15em .9em;border:1px solid var(--accent);color:var(--accent);
  border-radius:999px;font-size:.85rem;letter-spacing:.2em}

/* ---------- トップ:全面写真+左から暗くなるグラデーション ----------
   以前は写真に filter:brightness を掛けた上に半透明グラデーションを重ねていて、二重に暗くなり縦筋が出ていた。
   半透明グラデーションは描画時のディザが効かず、色と透明度の丸めが逆向きにずれて明るさがジグザグするため、
   暗さは「不透明グラデーションの乗算(multiply)+暗色の加算(screen)」で表現する(不透明グラデーションはディザが効く)。
   仕上げに極弱いノイズで残りの段差をほぐす。写真自体は加工しない。 */
.hero{position:relative;isolation:isolate;min-height:100vh;min-height:100dvh;display:flex;align-items:center;overflow:hidden}
.hero::before{content:"";position:absolute;inset:0;z-index:-2;background:url("../images/sample1.JPG") center/cover no-repeat}
.hero::after{content:"";position:absolute;inset:0;z-index:-1;mix-blend-mode:multiply;background:linear-gradient(90deg,rgb(11,11,11) 0.00%,rgb(16,16,16) 6.25%,rgb(21,21,21) 12.50%,rgb(27,27,27) 18.75%,rgb(33,33,33) 25.00%,rgb(38,38,38) 31.25%,rgb(45,45,45) 37.50%,rgb(51,51,51) 43.75%,rgb(58,58,58) 50.00%,rgb(65,65,65) 56.25%,rgb(72,72,72) 62.50%,rgb(79,79,79) 68.75%,rgb(87,87,87) 75.00%,rgb(94,94,94) 81.25%,rgb(102,102,102) 87.50%,rgb(111,111,111) 93.75%,rgb(119,119,119) 100.00%)}
.hero-lift{position:absolute;inset:0;z-index:0;pointer-events:none;mix-blend-mode:screen;background:linear-gradient(90deg,rgb(14,16,17) 0.00%,rgb(13,15,17) 6.25%,rgb(13,14,16) 12.50%,rgb(12,14,15) 18.75%,rgb(12,13,15) 25.00%,rgb(11,12,14) 31.25%,rgb(10,12,13) 37.50%,rgb(10,11,12) 43.75%,rgb(9,10,11) 50.00%,rgb(8,9,10) 56.25%,rgb(7,8,9) 62.50%,rgb(7,7,8) 68.75%,rgb(6,7,7) 75.00%,rgb(5,6,6) 81.25%,rgb(4,5,5) 87.50%,rgb(3,4,4) 93.75%,rgb(2,3,3) 100.00%)}
.hero-noise{position:absolute;inset:0;z-index:0;pointer-events:none;opacity:.02;
  background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='256' height='256'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='1.3' numOctaves='1' seed='7' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/><feComponentTransfer><feFuncR type='discrete' tableValues='0 1'/><feFuncG type='discrete' tableValues='0 1'/><feFuncB type='discrete' tableValues='0 1'/></feComponentTransfer></filter><rect width='256' height='256' filter='url(%23n)'/></svg>")}
.hero-inner{position:relative;z-index:1;padding:clamp(24px,6vw,96px);max-width:640px}
.hero h1{margin:.3em 0 .2em;font-size:clamp(2.8rem,9vw,5.5rem);font-weight:300;letter-spacing:.06em;line-height:1.1}
.hero p.lead{margin:0 0 1.6em;font-size:clamp(1rem,2.6vw,1.2rem);color:#dcdad3}
.hero .actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:1.4em}

/* ---------- 説明 ---------- */
.doc{max-width:720px;margin:0 auto;padding:24px 20px 64px}
.doc header{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}
.doc h1{font-weight:400;font-size:clamp(1.6rem,5vw,2.2rem);margin:.2em 0 .6em;line-height:1.4}
.doc h2{font-size:1.1rem;font-weight:700;margin:2em 0 .4em;color:var(--accent)}
.doc p{margin:.4em 0;color:#d6d4cd}
.note{border:1px solid var(--line);background:var(--panel);border-radius:12px;padding:12px 16px;margin-top:1.6em}
.note h2{margin-top:0}
.doc .actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:2em}

/* ---------- 比較(PC) ---------- */
body.cmp{display:flex;flex-direction:column;height:100vh;height:100dvh;overflow:hidden}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;flex:none}
.topbar .btn{min-height:38px;padding:0 1em;font-size:.88rem}
.topbar .ttl{font-size:.95rem;color:var(--sub);text-align:center;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topbar .ttl b{color:var(--text);font-weight:600}
.stage{position:relative;flex:1;min-height:0;margin:0 8px;border-radius:10px;overflow:hidden;background:#000;
  touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}
.stage.panning{cursor:grabbing}
.layer{position:absolute;inset:0;overflow:hidden}
.layer.after{clip-path:inset(0 0 0 var(--pos,50%))}
.world{position:absolute;left:0;top:0}
.world img{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none;-webkit-user-drag:none}
.stage.pix .layer.before img{image-rendering:pixelated}
.tag{position:absolute;top:10px;z-index:3;padding:.1em .8em;font-size:.8rem;border-radius:999px;
  background:rgba(0,0,0,.6);color:#fff;pointer-events:none}
.tag.l{left:10px}.tag.r{right:10px;background:rgba(217,178,106,.92);color:var(--accent-ink);font-weight:700}
.handle{position:absolute;top:0;bottom:0;left:var(--pos,50%);width:44px;margin-left:-22px;z-index:4;
  cursor:ew-resize;touch-action:none}
.handle::before{content:"";position:absolute;left:21px;top:0;bottom:0;width:2px;background:#fff;box-shadow:0 0 4px rgba(0,0,0,.7)}
.handle .knob{position:absolute;left:50%;top:50%;width:40px;height:40px;margin:-20px 0 0 -20px;border-radius:50%;
  background:#fff;color:#222;display:flex;align-items:center;justify-content:center;font-size:.7rem;
  box-shadow:0 1px 8px rgba(0,0,0,.6)}
body.fixedmid .handle{pointer-events:none}
body.fixedmid .handle .knob{display:none}
.status{position:absolute;inset:0;z-index:6;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:10px;text-align:center;padding:20px;background:rgba(15,17,19,.92)}
.spinner{width:30px;height:30px;border:3px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:sp 1s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
.empty{flex:1;min-height:0;margin:0 8px;border:1px dashed var(--line);border-radius:10px;display:flex;
  flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;padding:20px;background:var(--panel)}
.empty h2{margin:0;font-weight:400;font-size:1.4rem}
.empty p{margin:0;color:var(--sub)}

.dock{flex:none;display:flex;flex-direction:column}
.caption{margin:0;padding:4px 14px 0;font-size:.8rem;color:var(--sub)}
.controls{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:6px 12px 2px}
.zoomgrp{display:flex;align-items:center;gap:6px}
.zoomgrp .btn{min-width:44px;padding:0 .9em}
.zlabel{min-width:8.8em;text-align:center;font-size:.8rem;color:var(--sub);font-variant-numeric:tabular-nums}
.zoomreadout{display:flex;flex-direction:column;align-items:center;line-height:1.45}
.zoommeaning{font-size:.64rem;color:var(--sub);white-space:nowrap}
.zlabel.over-native{color:var(--accent)}
.hint{font-size:.78rem;color:var(--sub);margin:0;flex:1;min-width:180px}
.hint .sp{display:none}
.pager{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 12px 10px}
.pager .count{font-variant-numeric:tabular-nums;color:var(--sub)}
.pager .btn{min-height:40px}
body.is-empty .zoomgrp,body.is-empty .hint{visibility:hidden}

/* ---------- 比較(スマートフォン:画像を画面いっぱいに、操作は控えめに重ねる) ---------- */
@media (pointer:coarse),(max-width:600px){
  .stage,.empty{position:fixed;inset:0;margin:0;border-radius:0;z-index:0}
  .topbar{position:fixed;top:0;left:0;right:0;z-index:10;pointer-events:none;
    padding:calc(8px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) 0 calc(10px + env(safe-area-inset-left))}
  .topbar>*{pointer-events:auto}
  .topbar .ttl,.topbar .about{display:none}
  .topbar .btn{background:rgba(15,17,19,.7);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
  .tag{top:calc(56px + env(safe-area-inset-top))}
  .dock{position:fixed;left:0;right:0;bottom:0;z-index:10;pointer-events:none;flex-direction:row;flex-wrap:wrap;
    align-items:center;justify-content:space-between;gap:6px;
    padding:0 calc(10px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left))}
  .dock>.controls,.dock>.pager{display:contents}
  .dock .btn,.dock .count,.dock .caption,.dock .hint{pointer-events:auto}
  .caption{order:0;flex:1 1 100%;padding:3px 10px;border-radius:8px;background:rgba(15,17,19,.7);color:#e6e4dd;font-size:.74rem;line-height:1.5}
  .hint{order:1;flex:1 1 100%;min-width:0;padding:2px 10px;border-radius:8px;background:rgba(15,17,19,.55);font-size:.72rem;
    transition:opacity .6s}
  body.used .hint{opacity:0}
  .hint .pc{display:none}.hint .sp{display:inline}
  #prev{order:3}.count{order:4}#next{order:5}
  .zs{display:none}
  .dock .btn{min-height:42px;padding:0 .9em;font-size:.85rem;background:rgba(15,17,19,.78);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
  .dock .count{padding:0 .5em;border-radius:999px;background:rgba(15,17,19,.78);min-height:32px;line-height:32px;color:var(--text)}
  .dock .zoomgrp{display:flex;order:2;flex:1 1 100%;gap:6px;justify-content:flex-end;min-width:0}
  .dock .zoomreadout{flex:1;min-width:0;margin-right:auto;padding:3px 6px;border-radius:8px;background:rgba(15,17,19,.78)}
  .dock .zlabel{min-width:0;font-size:.75rem;color:var(--text)}
  .dock .zlabel.over-native{color:var(--accent)}
  .dock .zoommeaning{font-size:.6rem;white-space:normal}
  .dock .zoomgrp .btn{padding:0 .65em;flex-shrink:0}
  .empty{padding:80px 20px 150px}
}
@media (max-height:520px) and (pointer:fine){.hint{display:none}.topbar{padding:4px 12px}}
