/* takamatsu.gaip.jp — 高松 崇のオンライン名刺。段ボールと紙の見た目。
   サイトの CSP（style-src 'self'）のため、スタイルはこのファイルと CSSOM だけで書く。
   html の印：js（JavaScript が動く）／fx（演出を使う）／rm（視差効果を減らす）／is-open（幕が開く）／is-opened（幕を片づけた）／
             is-enter（ページが始まった）／has-stage（3D の背景あり）／is-still（3D を止めた） */

@font-face { font-family: "ZKGN"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/ZenKakuGothicNew-500-subset.woff2?v=20261205a") format("woff2"); }
@font-face { font-family: "ZKGN"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/ZenKakuGothicNew-700-subset.woff2?v=20261205a") format("woff2"); }
@font-face { font-family: "ZKGN"; font-weight: 900; font-style: normal; font-display: swap; src: url("/assets/ZenKakuGothicNew-900-subset.woff2?v=20261205a") format("woff2"); }
@font-face { font-family: "Stencil"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/stencil-subset.woff2?v=20261205a") format("woff2"); }
@font-face { font-family: "Mincho"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/ShipporiMincho-600-subset.woff2?v=20261205a") format("woff2"); }

:root {
  --paper: #f6efe2;
  --paper-2: #fffaf0;
  --kraft: #cfa672;
  --kraft-d: #b48a56;
  --kraft-l: #e5cba1;
  --ink: #2b2019;
  --ink-2: #5d4835;
  --green: #1f5a42;
  --green-d: #174633;
  --red: #c4402f;
  --f-ja: "ZKGN", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --f-st: "Stencil", "Arial Black", "Impact", sans-serif;
  --f-mi: "Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --bar: calc(60px + env(safe-area-inset-top));
  --gut: 18px;
  --scroll: 0;
  /* 段ボールの切り口（上下の紙と、あいだの波） */
  --edge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='12' viewBox='0 0 20 12'%3E%3Crect width='20' height='12' fill='%23a37a48'/%3E%3Cpath d='M0 6 Q5 -3 10 6 T20 6' fill='none' stroke='%23ead0a4' stroke-width='2.2'/%3E%3Crect width='20' height='2.2' fill='%23ead0a4'/%3E%3Crect y='9.8' width='20' height='2.2' fill='%23ead0a4'/%3E%3C/svg%3E");
  /* クラフト紙（段の筋がうっすら見える） */
  --kraft-bg: repeating-linear-gradient(90deg, rgba(255, 244, 220, 0.11) 0 3px, rgba(255, 244, 220, 0) 3px 7px, rgba(92, 58, 24, 0.055) 7px 9px, rgba(92, 58, 24, 0) 9px 12px);
  --tape: linear-gradient(180deg, rgba(255, 250, 235, 0.5), rgba(255, 250, 235, 0) 45%, rgba(120, 84, 44, 0.12)), #e6caa0;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
.rm { scroll-behavior: auto; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f9f4e8 0%, #f4e6c9 100%) fixed #f4e6c9;
  font-family: var(--f-ja);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
p, h1, h2, h3, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.defs { position: absolute; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* ---------- 背景 ---------- */

.stage { position: fixed; left: 0; top: 0; z-index: 0; width: 100%; height: 100vh; height: 100lvh; display: block; opacity: 0; transition: opacity 0.6s ease; }
.has-stage .stage { opacity: 1; }
/* 紙のざらつき（画面ぜんたいに薄く重ねる） */
.grain { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: url("/assets/grain.png?v=20261205a") 0 0 / 128px 128px; opacity: 0.5; mix-blend-mode: multiply; }

/* ---------- 読み込みの幕：箱のふた ---------- */

.loader { display: none; }
.fx .loader { display: block; position: fixed; inset: 0; z-index: 50; overflow: hidden; perspective: 1500px; }
.fx.is-opened .loader { display: none; }
.loader-flap { position: absolute; left: 0; right: 0; height: 50.2%; background: var(--kraft-bg), url("/assets/grain.png?v=20261205a") 0 0 / 128px 128px, var(--kraft); display: flex; justify-content: center; transition: transform 1s cubic-bezier(0.62, 0.02, 0.22, 1) 0.45s, opacity 0.45s ease 1s; will-change: transform; }
.loader-flap--t { top: 0; transform-origin: 50% 0; align-items: flex-start; padding-top: calc(env(safe-area-inset-top) + 9vh); box-shadow: inset 0 -1px 0 rgba(60, 36, 12, 0.4); }
.loader-flap--b { bottom: 0; transform-origin: 50% 100%; align-items: flex-end; padding-bottom: calc(env(safe-area-inset-bottom) + 9vh); box-shadow: inset 0 1px 0 rgba(60, 36, 12, 0.3); }
.is-open .loader-flap--t { transform: rotateX(97deg); opacity: 0; }
.is-open .loader-flap--b { transform: rotateX(-97deg); opacity: 0; }
.loader-print { display: flex; align-items: center; gap: 14px; color: rgba(52, 36, 24, 0.82); font-family: var(--f-st); font-weight: 700; font-size: clamp(18px, 5.4vw, 30px); letter-spacing: 0.14em; line-height: 1; mix-blend-mode: multiply; }
.loader-tape { position: absolute; left: -2%; right: -2%; top: calc(50% - 24px); height: 48px; background: var(--tape); box-shadow: 0 2px 6px rgba(60, 36, 12, 0.22); clip-path: inset(-10px 0 -10px 0); transition: clip-path 0.55s cubic-bezier(0.7, 0, 0.3, 1); }
.is-open .loader-tape { clip-path: inset(-10px 0 -10px 100%); }
.loader-label { position: absolute; left: 50%; top: 50%; width: min(78vw, 300px); padding: 14px 18px 12px; background: #fffdf6; border: 2.5px solid var(--ink); box-shadow: 0 8px 22px rgba(60, 36, 12, 0.28); transform: translate(-50%, -50%) rotate(-2deg); transition: transform 0.4s ease, opacity 0.35s ease; text-align: center; }
.is-open .loader-label { transform: translate(-50%, -62%) rotate(-5deg) scale(0.94); opacity: 0; }
.loader-label-k { font-size: 12px; font-weight: 700; letter-spacing: 0.3em; color: var(--ink-2); line-height: 1.4; }
.loader-label-v { font-weight: 900; font-size: clamp(22px, 6.6vw, 28px); letter-spacing: 0.06em; line-height: 1.35; }
.loader-label-en { font-family: var(--f-st); font-weight: 700; font-size: 12px; letter-spacing: 0.22em; color: var(--green); line-height: 1.6; }
.loader-bars { display: block; height: 22px; margin-top: 8px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 7px, transparent 7px 9px, var(--ink) 9px 10px, transparent 10px 13px, var(--ink) 13px 15px, transparent 15px 19px) 0 0 / 38px 100%; animation: bars 0.9s linear infinite; }
@keyframes bars { to { background-position: 38px 0; } }

/* ---------- 上の帯 ---------- */

.topbar { position: fixed; left: 0; right: 0; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: var(--bar); padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)); transition: background-color 0.3s ease, opacity 0.6s ease, transform 0.6s ease; }
.topbar.is-scrolled { background-color: rgba(247, 240, 226, 0.92); box-shadow: 0 1px 0 rgba(84, 52, 22, 0.14); }
.fx:not(.is-enter) .topbar { opacity: 0; transform: translateY(-12px); }
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); text-decoration: none; font-family: var(--f-st); font-weight: 700; font-size: 15px; letter-spacing: 0.1em; line-height: 1; }
.brand svg { color: var(--kraft-d); }
.topbar-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 13px; background: var(--green); color: #fffaf0; border: 2px solid var(--green-d); font-weight: 700; font-size: 13px; line-height: 1; text-decoration: none; box-shadow: 0 3px 0 var(--green-d); }
.topbar-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--green-d); }
.meter { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; overflow: hidden; }
.meter-bar { display: block; height: 100%; background: var(--green); transform-origin: 0 50%; transform: scaleX(var(--scroll)); }

/* ---------- ボタン・リンク ---------- */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px; background: var(--paper-2); color: var(--ink); border: 2.5px solid var(--ink); font-weight: 700; font-size: 15px; line-height: 1.2; text-decoration: none; box-shadow: 0 4px 0 var(--ink); cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn--primary { background: var(--green); color: #fffaf0; border-color: var(--green-d); box-shadow: 0 4px 0 var(--green-d); }
.btn--primary:active { box-shadow: 0 1px 0 var(--green-d); }
.btn--wide { width: 100%; }
.link { display: inline-flex; align-items: center; gap: 0.4em; min-height: 44px; color: var(--green); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* ---------- 見出し ---------- */

.head { display: inline-grid; grid-template-columns: auto auto; column-gap: 12px; align-items: center; padding: 6px 16px 6px 6px; background: rgba(255, 252, 244, 0.88); box-shadow: 0 6px 18px rgba(84, 52, 22, 0.1), 0 1px 0 rgba(84, 52, 22, 0.12); }
.head-no { grid-row: 1 / span 2; display: grid; place-items: center; width: 50px; height: 50px; border: 2.5px solid var(--ink); font-family: var(--f-st); font-weight: 700; font-size: 24px; line-height: 1; letter-spacing: 0.02em; }
.head-ja { align-self: end; font-weight: 900; font-size: clamp(18px, 5.7vw, 34px); line-height: 1.2; letter-spacing: 0.04em; white-space: nowrap; }
.head-en { align-self: start; font-family: var(--f-st); font-weight: 700; font-size: 11px; letter-spacing: 0.26em; color: var(--green); line-height: 1.7; }

/* ---------- 画面に入ったら現す ---------- */

.fx [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.85s cubic-bezier(0.2, 0.8, 0.2, 1); }
.fx [data-reveal="left"] { transform: translateX(-28px) rotate(-1.4deg); }
.fx [data-reveal="right"] { transform: translateX(28px) rotate(1.4deg); }
.fx [data-reveal="flap"] { transform: perspective(900px) rotateX(-62deg); transform-origin: 50% 0; }
.fx [data-reveal].is-in { opacity: 1; transform: none; }
.fx:not(.is-enter) .hero [data-reveal] { opacity: 0; transform: translateY(26px); }
.split { display: inline; }
.fx .ch { display: inline-block; opacity: 0; transform: translateY(0.3em) scale(1.3) rotate(-7deg); transition: opacity 0.35s ease, transform 0.6s cubic-bezier(0.2, 1.5, 0.3, 1); transition-delay: calc(var(--i) * 90ms + 150ms); }
.fx .is-in .ch { opacity: 1; transform: none; }
.fx:not(.is-enter) .hero .ch { opacity: 0; transform: translateY(0.3em) scale(1.3) rotate(-7deg); }

/* ---------- 最初の画面 ---------- */

main { position: relative; z-index: 2; }
.hero { position: relative; min-height: 100vh; min-height: 100svh; }
.hero-text { position: relative; padding: calc(var(--bar) + 2.5vh) var(--gut) 0; text-align: center; }
/* 荷札 */
.hero-eyebrow { display: inline-flex; flex-direction: column; align-items: flex-start; position: relative; padding: 6px 14px 6px 30px; background: var(--paper-2); border: 2px solid var(--ink); font-size: clamp(11.5px, 3.3vw, 13px); font-weight: 700; line-height: 1.5; letter-spacing: 0.06em; text-align: left; box-shadow: 0 3px 0 rgba(43, 32, 25, 0.9); }
.hero-eyebrow::before { content: ""; position: absolute; left: 10px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border: 2px solid var(--ink); border-radius: 50%; background: #f1e3c6; }
.hero-eyebrow span:first-child { font-weight: 900; }
.hero-name { margin-top: clamp(10px, 2.2vh, 20px); }
.hero-kanji { display: block; font-weight: 900; font-size: clamp(46px, 16vw, 78px); line-height: 1.12; letter-spacing: 0.08em; text-indent: 0.08em; }
.hero-roman { display: block; margin-top: 4px; font-family: var(--f-st); font-weight: 700; font-size: clamp(13px, 4vw, 18px); letter-spacing: 0.24em; text-indent: 0.24em; color: var(--green); line-height: 1.5; }
.hero-copy { margin-top: clamp(8px, 1.6vh, 16px); font-family: var(--f-mi); font-weight: 600; font-size: clamp(16.5px, 4.8vw, 22px); line-height: 1.65; letter-spacing: 0.06em; }
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: clamp(12px, 2.2vh, 22px); }
.cue { position: absolute; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 3px 10px 1px; background: rgba(255, 250, 240, 0.82); border: 2px solid var(--ink); font-family: var(--f-st); font-weight: 700; font-size: 11px; letter-spacing: 0.3em; text-indent: 0.3em; line-height: 1.6; transition: opacity 0.4s ease; }
.cue span { display: inline-block; }
.fx .cue span { animation: cue 1.8s ease-in-out infinite; }
.fx:not(.is-enter) .cue, .topbar.is-scrolled ~ main .cue { opacity: 0; }
@keyframes cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

/* ---------- 画面に留まる場面 ---------- */

.scene { position: relative; }
.greeting { height: 330vh; }
.making { height: 470vh; }
.rakudan { height: 280vh; }
.pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.pin-body { position: absolute; left: 0; right: 0; top: 0; padding: calc(var(--bar) + 1.2vh) var(--gut) 0; }
.fx .scene [data-win] { opacity: var(--o, 0); transform: translateY(calc((1 - var(--o, 0)) * 16px)); }

/* ごあいさつ：便箋 */
.letter { position: relative; margin-top: 16px; padding: 14px 16px 10px; background: rgba(255, 252, 244, 0.84); box-shadow: 0 12px 30px rgba(84, 52, 22, 0.13), 0 1px 0 rgba(84, 52, 22, 0.14); font-family: var(--f-mi); font-weight: 600; font-size: clamp(13.5px, 4.15vw, 19px); line-height: 2; letter-spacing: 0.03em; background-image: repeating-linear-gradient(180deg, rgba(84, 52, 22, 0) 0 calc(2em - 1px), rgba(84, 52, 22, 0.15) calc(2em - 1px) 2em); background-position: 0 14px; }
.letter::before { content: ""; position: absolute; left: 50%; top: -12px; width: 92px; height: 24px; margin-left: -46px; background: var(--tape); opacity: 0.94; transform: rotate(-2.2deg); box-shadow: 0 1px 2px rgba(84, 52, 22, 0.2); }
.letter-line { white-space: nowrap; }
.lt { color: rgba(43, 32, 25, 0.16); transition: color 0.25s ease; }
.lt.is-on { color: var(--ink); }
.sign { display: flex; justify-content: flex-end; align-items: baseline; gap: 10px; font-size: 1.12em; line-height: 2; transition: opacity 0.6s ease, transform 0.6s ease; }
.fx .greeting:not(.is-signed) .sign { opacity: 0; transform: translateX(-10px); }

/* 段ボールができるまで：3つの札 */
.steps { position: relative; margin-top: 16px; min-height: 172px; }
.step { position: relative; padding: 12px 16px 14px; background: rgba(255, 252, 244, 0.92); border-left: 8px solid var(--green); box-shadow: 0 12px 30px rgba(84, 52, 22, 0.14), 0 1px 0 rgba(84, 52, 22, 0.14); }
.fx .steps .step { position: absolute; left: 0; right: 0; top: 0; }
.step + .step { margin-top: 12px; }
.fx .step + .step { margin-top: 0; }
.step-no { font-family: var(--f-st); font-weight: 700; font-size: 12px; letter-spacing: 0.24em; color: var(--green); line-height: 1.6; }
.step-h { font-weight: 900; font-size: clamp(26px, 7.6vw, 38px); line-height: 1.25; letter-spacing: 0.06em; }
.step-yomi { margin-left: 0.7em; font-weight: 700; font-size: 0.36em; letter-spacing: 0.14em; color: var(--ink-2); vertical-align: 0.5em; }
.step-p { margin-top: 4px; font-size: clamp(13.5px, 3.8vw, 16px); line-height: 1.75; }
.rail { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.rail-dot { width: 12px; height: 12px; border: 2.5px solid var(--ink); background: var(--paper-2); transition: background-color 0.3s ease, transform 0.3s ease; }
.rail-dot.is-on { background: var(--green); transform: scale(1.25); }
.rail-line { flex: 0 0 34px; height: 2.5px; background: var(--ink); }
.rm .rail, html:not(.js) .rail { display: none; }

/* らくだん */
.raku { margin-top: 16px; }
.raku-lead { display: inline-block; padding: 4px 12px; background: rgba(255, 252, 244, 0.88); font-family: var(--f-mi); font-weight: 600; font-size: clamp(15px, 4.4vw, 24px); line-height: 1.7; letter-spacing: 0.04em; text-wrap: balance; }
.fx .raku-stack { display: grid; }
.fx .raku-stack > * { grid-area: 1 / 1; align-self: start; justify-self: start; }
.fx .raku-stack > .raku-p { margin-top: 0; justify-self: stretch; }
.raku-p { margin-top: 10px; padding: 12px 16px; background: rgba(255, 252, 244, 0.92); box-shadow: 0 12px 30px rgba(84, 52, 22, 0.14), 0 1px 0 rgba(84, 52, 22, 0.14); font-size: clamp(13.5px, 3.8vw, 16px); line-height: 1.8; }
.raku-hint { display: inline-flex; align-items: center; gap: 9px; margin-top: 12px; padding: 4px 12px 4px 10px; background: var(--green); color: #fffaf0; font-weight: 700; font-size: 13.5px; line-height: 1.6; }
.raku-hint-dot { width: 10px; height: 10px; border-radius: 50%; background: #fffaf0; }
.fx .raku-hint-dot { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(0.7); opacity: 0.6; } 50% { transform: scale(1.15); opacity: 1; } }
.raku-links { margin-top: 2px; }
.raku-links .link { padding: 0 8px; background: rgba(255, 252, 244, 0.8); }

/* ---------- ふつうに流れる区画 ---------- */

.company, .cards, .contact { position: relative; padding: 16vh var(--gut) 14vh; }
.wrap { max-width: 640px; margin: 0 auto; }
.sheet { position: relative; margin-top: 26px; padding: 22px 20px 20px; background: url("/assets/grain.png?v=20261205a") 0 0 / 128px 128px, var(--paper-2); box-shadow: 0 16px 36px rgba(84, 52, 22, 0.17), 0 1px 0 rgba(84, 52, 22, 0.12); }
/* テープで留めてある */
.sheet::before { content: ""; position: absolute; left: 20px; top: -11px; width: 78px; height: 22px; background: var(--tape); opacity: 0.94; transform: rotate(-3deg); box-shadow: 0 1px 2px rgba(84, 52, 22, 0.2); }
.sheet--kraft { padding-top: 30px; background: var(--kraft-bg), url("/assets/grain.png?v=20261205a") 0 0 / 128px 128px, var(--kraft); }
.sheet--kraft::before { left: 0; right: 0; top: 0; width: auto; height: 12px; background: var(--edge) 0 0 / 20px 12px repeat-x; opacity: 1; transform: none; box-shadow: none; }
.sheet-k { font-weight: 900; font-size: 15px; letter-spacing: 0.1em; line-height: 1.5; }
.sheet-lead { margin-top: 10px; font-family: var(--f-mi); font-weight: 600; font-size: clamp(19px, 5.6vw, 27px); line-height: 1.6; letter-spacing: 0.04em; }
.sheet-p { margin-top: 10px; font-size: 15px; line-height: 1.8; }
.marks { display: flex; gap: 10px; margin-top: 16px; color: rgba(52, 36, 24, 0.84); mix-blend-mode: multiply; }
.sheet-h { padding-bottom: 8px; border-bottom: 2.5px solid var(--ink); font-weight: 900; font-size: 18px; line-height: 1.4; letter-spacing: 0.06em; }
.items { margin-top: 10px; }
.items li { position: relative; padding-left: 1.25em; font-size: 15px; line-height: 2; }
.items li::before { content: ""; position: absolute; left: 0.1em; top: 0.72em; width: 0.56em; height: 0.56em; background: var(--green); }
.count { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1.5px dashed rgba(84, 52, 22, 0.4); }
.count-n { font-family: var(--f-st); font-weight: 700; font-size: 64px; line-height: 0.9; color: var(--green); }
.count-t { font-weight: 700; font-size: 14px; line-height: 1.5; }
.facts > div { display: grid; grid-template-columns: 4.6em 1fr; gap: 0 8px; padding: 9px 0; border-bottom: 1.5px dashed rgba(84, 52, 22, 0.4); font-size: 15px; line-height: 1.7; }
.facts dt { font-weight: 700; font-size: 13px; color: var(--ink-2); line-height: 1.95; }
.facts a { display: inline-flex; align-items: center; min-height: 44px; margin: -8px 0; font-weight: 700; color: var(--green); text-underline-offset: 4px; }
.sheet-links { margin-top: 6px; }
.note { display: inline-block; margin-top: 16px; padding: 4px 10px; background: rgba(247, 240, 226, 0.86); font-size: 12px; line-height: 1.6; color: var(--ink-2); }

/* 名刺 */
.cards { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.cards .wrap { width: 100%; }
.meishi-fig { margin-top: 30px; text-align: center; }
.meishi { perspective: 1000px; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.meishi-tilt { position: relative; display: block; overflow: hidden; border-radius: 5px; background: #fff; box-shadow: 0 26px 54px rgba(84, 52, 22, 0.3), 0 3px 0 rgba(84, 52, 22, 0.14); transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.fx .meishi-tilt { animation: float 7s ease-in-out infinite; }
.meishi.is-held .meishi-tilt { transition-duration: 0.08s; animation: none; }
.is-still .meishi-tilt { animation: none; }
@keyframes float { 0%, 100% { transform: rotateX(4deg) rotateY(-7deg); } 50% { transform: rotateX(-3deg) rotateY(7deg); } }
.meishi-face { width: 100%; height: auto; }
.meishi-glare { position: absolute; inset: 0; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 20%), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 48%); opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.meishi.is-held .meishi-glare { opacity: 1; }
.meishi-fig figcaption { display: inline-block; margin-top: 22px; padding: 4px 12px; background: rgba(247, 240, 226, 0.86); font-size: 13px; line-height: 1.6; color: var(--ink-2); }

/* ご連絡先：送り状 */
.contact-copy { margin-top: 18px; font-family: var(--f-mi); font-weight: 600; font-size: clamp(21px, 6.2vw, 32px); line-height: 1.5; letter-spacing: 0.06em; }
.slip { position: relative; margin-top: 20px; background: url("/assets/grain.png?v=20261205a") 0 0 / 128px 128px, #fffdf6; border: 2.5px solid var(--ink); box-shadow: 0 16px 36px rgba(84, 52, 22, 0.2); }
.slip-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 14px; background: var(--ink); color: #fff8ea; }
.slip-title { font-weight: 900; font-size: 15px; letter-spacing: 0.4em; line-height: 1.5; }
.slip-no { font-family: var(--f-st); font-weight: 700; font-size: 12px; letter-spacing: 0.14em; line-height: 1.5; }
.slip-who > div, .row { display: grid; grid-template-columns: 74px 1fr; }
.slip-who > div, .rows li { border-bottom: 1.5px solid var(--ink); }
.slip-who dt, .row-k { display: grid; place-items: center; padding: 8px 4px; background: rgba(207, 166, 114, 0.26); border-right: 1.5px solid var(--ink); font-weight: 700; font-size: 12.5px; line-height: 1.4; letter-spacing: 0.06em; text-align: center; }
.slip-who dd { padding: 10px 14px; min-width: 0; }
.slip-you { font-weight: 900; font-size: 24px; line-height: 1.4; letter-spacing: 0.06em; }
.slip-org { display: block; font-weight: 700; font-size: 13px; line-height: 1.6; }
.slip-name { display: block; margin-top: 2px; font-weight: 900; font-size: 30px; line-height: 1.3; letter-spacing: 0.1em; }
.slip-roman { display: block; font-family: var(--f-st); font-weight: 700; font-size: 12px; letter-spacing: 0.22em; color: var(--green); line-height: 1.6; }
.row { position: relative; align-items: stretch; min-height: 54px; color: inherit; text-decoration: none; }
.row-v { align-self: center; min-width: 0; padding: 8px 34px 8px 14px; font-weight: 700; font-size: 18px; line-height: 1.4; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.row-v--mail { font-size: clamp(12px, 3.75vw, 15.5px); letter-spacing: 0; }
.row-v--addr { font-size: 14px; line-height: 1.65; }
.row--plain .row-v { padding-right: 14px; }
a.row::after { content: "→"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--green); font-weight: 900; font-size: 15px; line-height: 1; }
a.row:hover, a.row:active { background: rgba(31, 90, 66, 0.07); }
.slip-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px; }
.slip-bars { flex: 1 1 auto; max-width: 62%; height: 38px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 7px, transparent 7px 9px, var(--ink) 9px 10px, transparent 10px 13px, var(--ink) 13px 15px, transparent 15px 19px); }
.stamp { flex: 0 0 auto; display: grid; place-items: center; width: 82px; height: 82px; border: 3px solid var(--red); border-radius: 50%; color: var(--red); font-weight: 900; font-size: 14.5px; line-height: 1.3; letter-spacing: 0.08em; text-align: center; transform: rotate(-12deg); opacity: 0.88; box-shadow: inset 0 0 0 2px #fffdf6, inset 0 0 0 3.5px var(--red); }
.fx .slip .stamp { opacity: 0; transform: rotate(-12deg) scale(1.9); transition: opacity 0.2s ease 0.9s, transform 0.4s cubic-bezier(0.3, 1.6, 0.4, 1) 0.9s; }
.fx .slip.is-in .stamp { opacity: 0.88; transform: rotate(-12deg) scale(1); }
.actions { display: grid; gap: 14px; margin-top: 26px; }
.qr { display: flex; align-items: center; gap: 14px; padding: 12px; background: var(--paper-2); border: 2.5px solid var(--ink); }
.qr img { width: 112px; height: 112px; }
.qr p { font-weight: 700; font-size: 14px; line-height: 1.6; }
.thanks { min-height: 70vh; min-height: 70svh; padding-top: 34px; text-align: center; }
.thanks p { display: inline-block; padding: 4px 14px; background: rgba(255, 252, 244, 0.8); font-family: var(--f-mi); font-weight: 600; font-size: clamp(13.5px, 4.2vw, 20px); line-height: 1.8; letter-spacing: 0.04em; text-wrap: balance; }
.contact { padding-bottom: 4vh; }

/* ---------- 下の帯 ---------- */

.foot { position: relative; z-index: 2; padding: 30px var(--gut) calc(26px + env(safe-area-inset-bottom)); background: var(--kraft-bg), url("/assets/grain.png?v=20261205a") 0 0 / 128px 128px, var(--kraft); text-align: center; font-size: 12px; line-height: 1.9; color: var(--ink); }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; background: var(--edge) 0 0 / 20px 12px repeat-x; }
.foot-name { font-family: var(--f-st); font-weight: 700; font-size: 15px; letter-spacing: 0.24em; line-height: 2; mix-blend-mode: multiply; }

.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 60; max-width: calc(100vw - 32px); padding: 10px 16px; background: var(--ink); color: #fff8ea; font-weight: 700; font-size: 14px; line-height: 1.5; opacity: 0; transform: translate(-50%, 12px); transition: opacity 0.3s ease, transform 0.3s ease; pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 横長の画面（PC・スマホの横向き）：文は左、3D は右 ---------- */

@media (min-aspect-ratio: 1/1) {
  :root { --gut: max(5.5vw, 26px); }
  .hero { display: flex; align-items: center; }
  .hero-text { width: min(52vw, 640px); padding: var(--bar) 0 4vh var(--gut); text-align: left; }
  .hero-kanji { font-size: clamp(40px, min(7.6vw, 18vh), 116px); }
  .hero-roman { font-size: clamp(12px, min(1.5vw, 3.6vh), 21px); text-indent: 0; }
  .hero-copy { font-size: clamp(15px, min(1.8vw, 4.4vh), 25px); }
  .hero-eyebrow { font-size: clamp(11px, min(1.05vw, 2.8vh), 14.5px); }
  .hero-actions { justify-content: flex-start; }
  .cue { left: var(--gut); transform: none; }
  .pin-body { right: auto; bottom: 0; width: min(47vw, 580px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: var(--bar) 0 3vh var(--gut); }
  .pin-body > .letter, .pin-body > .steps, .pin-body > .raku { align-self: stretch; }
  .letter { font-size: clamp(13px, min(1.45vw, 3.5vh), 20px); }
  .head-ja { font-size: clamp(17px, min(2.6vw, 6vh), 36px); }
  .step-h { font-size: clamp(24px, min(3vw, 7vh), 42px); }
  .step-p, .raku-p { font-size: clamp(13px, min(1.2vw, 3.4vh), 16.5px); }
  .raku-lead { font-size: clamp(16px, min(1.8vw, 4.4vh), 25px); }
  .company, .contact { padding-left: var(--gut); padding-right: var(--gut); }
  .company .wrap, .contact .wrap { margin: 0; max-width: min(47vw, 580px); }
  .cards { padding-top: calc(var(--bar) + 4vh); padding-bottom: 6vh; }
  .cards .wrap { max-width: min(60vw, 640px); }
  .meishi-fig { max-width: min(100%, 76vh); margin-left: auto; margin-right: auto; }
  .thanks { min-height: 30vh; text-align: left; }
  .thanks p { font-size: clamp(13.5px, min(1.5vw, 3.6vh), 20px); }
  .actions { grid-template-columns: 1fr 1fr; }
  .qr { grid-column: 1 / -1; }
}
/* 背の低い横長（スマホの横向き） */
@media (min-aspect-ratio: 1/1) and (max-height: 520px) {
  :root { --bar: calc(48px + env(safe-area-inset-top)); }
  .head-no { width: 38px; height: 38px; font-size: 18px; }
  .head-en { font-size: 9.5px; }
  .hero-name { margin-top: 6px; }
  .hero-copy { margin-top: 4px; line-height: 1.5; }
  .hero-actions { margin-top: 10px; }
  .btn { min-height: 44px; font-size: 13.5px; padding: 0 14px; }
  .letter { margin-top: 8px; padding: 8px 12px 6px; line-height: 1.72; background-image: none; }
  .letter::before { display: none; }
  .steps { margin-top: 8px; min-height: 120px; }
  .step { padding: 8px 12px 10px; }
  .raku { margin-top: 8px; }
  .raku-p { margin-top: 6px; padding: 8px 12px; line-height: 1.65; }
  .raku-hint { margin-top: 6px; }
  .cue { display: none; }
  .company, .contact { padding-top: 22vh; }
  .cards { padding-top: calc(var(--bar) + 2vh); padding-bottom: 2vh; }
  .meishi-fig { max-width: min(100%, 90vh); margin-top: 12px; }
  .foot { padding: 18px var(--gut) calc(8px + env(safe-area-inset-bottom)); line-height: 1.6; }
  .foot-name { line-height: 1.6; }
  .meishi-fig figcaption { margin-top: 12px; }
}
/* 広い PC */
@media (min-aspect-ratio: 1/1) and (min-width: 1100px) {
  .sheet { padding: 26px 26px 24px; }
  .duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; align-items: start; }
}
/* 幅のせまいスマホ */
@media (max-width: 359px) {
  :root { --gut: 14px; }
  .brand span { font-size: 13px; }
  .topbar-btn { padding: 0 10px; font-size: 12px; }
  .hero-actions .btn { padding: 0 14px; font-size: 14px; }
  .slip-who > div, .row { grid-template-columns: 62px 1fr; }
  .row-v { padding-left: 10px; font-size: 16.5px; }
  .row-v--mail { font-size: 12px; padding-right: 10px; }
  a.row:has(.row-v--mail)::after { display: none; }
  .slip-name { font-size: 26px; }
  .stamp { width: 74px; height: 74px; font-size: 13px; }
}

/* ---------- 視差効果を減らす・JavaScript なし・3D を止めたとき ---------- */

.rm .scene, html:not(.js) .scene { height: auto; }
.rm .pin, html:not(.js) .pin { position: relative; height: auto; overflow: visible; padding: 14vh 0 6vh; }
.rm .pin-body, html:not(.js) .pin-body { position: relative; width: auto; padding-top: 0; padding-bottom: 0; }
.rm .steps, html:not(.js) .steps { min-height: 0; }
.rm .hero, html:not(.js) .hero { min-height: 0; padding-bottom: 12vh; }
.rm .cue, html:not(.js) .cue { display: none; }
html:not(.js) .raku-hint { display: none; }
.rm .thanks, html:not(.js) .thanks { min-height: 0; padding-bottom: 6vh; }
html:not(.has-stage) .thanks { min-height: 0; padding-bottom: 6vh; }
@media (min-aspect-ratio: 1/1) {
  .rm .pin-body, html:not(.js) .pin-body { padding-left: var(--gut); max-width: min(47vw, 580px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; }
}
