/* ===== トップページの演出 ===== */

:root {
  --foam: #fdf6ea;
  --hero-1: #fbf4ea;
  --hero-2: #f1e1cc;
}

/* ページの切り替えをなめらかに（対応しているブラウザだけ） */
@view-transition { navigation: auto; }

/* 読んだ位置のバー */
.read-bar { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; background: linear-gradient(90deg, var(--gold), #e6a9a3); transform-origin: 0 50%; transform: scaleX(0); }

/* ===== ヒーロー：ラテアートのカップ ===== */
.lx-hero {
  position: relative;
  overflow: hidden;
  color: var(--text);
  background: linear-gradient(160deg, var(--hero-1), var(--hero-2));
  padding: clamp(40px, 7vw, 100px) 0 clamp(64px, 8vw, 120px);
}
/* ミルクが混ざり合うような、ゆっくり動く色 */
.aurora { position: absolute; inset: -20%; pointer-events: none; filter: blur(70px); opacity: 0.75; }
.aurora i { position: absolute; border-radius: 50%; animation: drift 22s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 46%; height: 50%; left: 50%; top: 5%; background: #e8c39a; }
.aurora i:nth-child(2) { width: 38%; height: 44%; left: 8%; top: 45%; background: #f4d3cd; animation-duration: 26s; animation-delay: -6s; }
.aurora i:nth-child(3) { width: 34%; height: 40%; left: 62%; top: 55%; background: #f6e6c9; animation-duration: 18s; animation-delay: -3s; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-8%, 6%) scale(1.15); }
  100% { transform: translate(6%, -6%) scale(0.95); }
}
.lx-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.lx-pill { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.lx-pill span { background: #fff; color: var(--latte-900); font-weight: 700; font-size: 14px; padding: 6px 14px; border-radius: 999px; box-shadow: 0 4px 14px rgba(74, 52, 38, 0.08); opacity: 0; transform: translateY(10px); animation: pill 0.6s cubic-bezier(.2,.8,.2,1) forwards; }
.lx-pill span:nth-child(1) { color: var(--green); animation-delay: 0.1s; }
.lx-pill span:nth-child(2) { color: var(--gold-dark); animation-delay: 0.2s; }
.lx-pill span:nth-child(3) { color: #c0726b; animation-delay: 0.3s; }
@keyframes pill { to { opacity: 1; transform: none; } }

/* 写真を主役に、カップは添えるだけ */
.lx-visual { position: relative; height: clamp(440px, 44vw, 560px); margin-bottom: 40px; }
.ph { position: absolute; margin: 0; border-radius: 28px; overflow: hidden; box-shadow: 0 24px 50px rgba(74, 52, 38, 0.2); background: #eee; clip-path: inset(100% 0 0 0 round 28px); animation: wipe 1.1s cubic-bezier(.7,0,.2,1) forwards; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.15); animation: settle 1.6s cubic-bezier(.2,.8,.2,1) forwards; }
.ph figcaption { position: absolute; left: 12px; bottom: 12px; right: 12px; background: rgba(255, 255, 255, 0.88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 14px; padding: 8px 12px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.ph figcaption b { display: block; font-size: 15px; color: var(--latte-900); }
.ph-1 { left: 0; top: 0; width: 54%; height: 84%; animation-delay: 0.2s; }
.ph-1 img { animation-delay: 0.2s; }
.ph-2 { right: 0; top: 6%; width: 42%; height: 52%; animation-delay: 0.45s; border-radius: 50% 50% 28px 28px; clip-path: inset(100% 0 0 0 round 50% 50% 28px 28px); animation-name: wipe2; }
.ph-2 img { animation-delay: 0.45s; }
@keyframes wipe { to { clip-path: inset(0 0 0 0 round 28px); } }
@keyframes wipe2 { to { clip-path: inset(0 0 0 0 round 50% 50% 28px 28px); } }
@keyframes settle { to { transform: scale(1); } }
.ph-badge { position: absolute; left: 47%; top: 0; background: var(--green); color: #fff; border-radius: 50%; width: 92px; height: 92px; display: grid; place-content: center; text-align: center; font-size: 12px; font-weight: 700; line-height: 1.3; box-shadow: 0 12px 24px rgba(95, 138, 107, 0.35); animation: bob 4s ease-in-out infinite, pop 0.6s 1s cubic-bezier(.2,1.6,.4,1) backwards; z-index: 2; }
.ph-badge b { font-family: "Zen Maru Gothic", sans-serif; font-size: 26px; line-height: 1; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pop { from { transform: scale(0); } }
.lx-title { font-family: "Zen Maru Gothic", sans-serif; font-weight: 700; font-size: clamp(32px, 5.4vw, 64px); line-height: 1.4; letter-spacing: 0.04em; margin: 0 0 24px; color: var(--latte-900); }
.lx-title em { font-style: normal; color: var(--gold-dark); }
.ch { display: inline-block; }
.lx-title .ch { opacity: 0; transform: translateY(0.6em) rotate(4deg); filter: blur(8px); animation: lx-ch 0.9s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--i) * 45ms + 0.4s); }
@keyframes lx-ch { to { opacity: 1; transform: none; filter: blur(0); } }
.lx-hero .desc { color: var(--muted); max-width: 32em; line-height: 2; margin: 0 0 28px; }
.lx-hero .cta { display: flex; flex-wrap: wrap; gap: 12px; }
.lx-facts { display: flex; gap: clamp(16px, 3vw, 40px); margin-top: 36px; }
.lx-facts div { display: flex; flex-direction: column; }
.lx-facts b { font-family: "Zen Maru Gothic", sans-serif; font-size: clamp(28px, 3.4vw, 40px); color: var(--gold-dark); line-height: 1.1; font-variant-numeric: tabular-nums; }
.lx-facts b .num { font-style: normal; }
.lx-facts b small { font-size: 0.5em; margin-left: 2px; }
.lx-facts span { font-size: 13px; color: var(--muted); }

.cup-wrap { position: absolute; right: 7%; bottom: 0; z-index: 3; width: clamp(140px, 13vw, 180px); aspect-ratio: 1; animation: pop 0.7s 1.2s cubic-bezier(.2,1.4,.4,1) backwards; transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.3s ease-out; }
.cup-saucer { position: absolute; inset: -9%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffffff, #f1e6d6 62%, #dccab2 70%, transparent 71%); box-shadow: 0 40px 80px rgba(74, 52, 38, 0.22); }
.cup-rim { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffffff, #f2e9dc 70%); box-shadow: inset 0 -10px 24px rgba(74, 52, 38, 0.18), 0 18px 40px rgba(74, 52, 38, 0.22); }
.cup-handle { position: absolute; right: -16%; top: 38%; width: 24%; height: 24%; border: 8px solid #f2e9dc; border-left: 0; border-radius: 0 50% 50% 0; box-shadow: 8px 10px 20px rgba(74, 52, 38, 0.15); }
.cup-surface { position: absolute; inset: 7%; border-radius: 50%; overflow: hidden; box-shadow: inset 0 8px 24px rgba(0, 0, 0, 0.4); touch-action: none; cursor: crosshair; }
.cup-surface canvas { width: 100%; height: 100%; display: block; }
.cup-surface::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(60% 40% at 30% 20%, rgba(255, 255, 255, 0.2), transparent 70%); pointer-events: none; }
.steam { position: absolute; left: 50%; top: -40%; width: 70%; height: 70%; transform: translateX(-50%); pointer-events: none; }
.steam span { position: absolute; bottom: 0; width: 18%; height: 100%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.9), transparent); filter: blur(10px); opacity: 0; animation: steam 5s ease-in-out infinite; }
.steam span:nth-child(1) { left: 20%; animation-delay: 0s; }
.steam span:nth-child(2) { left: 42%; animation-delay: 1.6s; }
.steam span:nth-child(3) { left: 64%; animation-delay: 3.2s; }
@keyframes steam { 0% { transform: translateY(40%) scaleX(0.6); opacity: 0; } 30% { opacity: 0.8; } 100% { transform: translateY(-40%) scaleX(1.4) skewX(12deg); opacity: 0; } }
/* 湯気といっしょに上がる小さなハート */
.float-heart { position: absolute; left: 50%; top: 20%; width: 18px; height: 18px; pointer-events: none; color: #e6a9a3; animation: rise 4.5s ease-out forwards; z-index: 3; }
@keyframes rise {
  0% { transform: translate(-50%, 0) scale(0.4); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--x, 0px)), -260px) scale(1.1) rotate(var(--r, 0deg)); opacity: 0; }
}
.cup-hint { position: absolute; right: 0; bottom: -48px; white-space: nowrap; font-size: 12px; margin: 0; color: var(--latte-700); display: flex; gap: 10px; align-items: center; }
.cup-hint button { font: inherit; font-size: 12px; font-weight: 700; color: var(--latte-700); background: rgba(255, 255, 255, 0.7); border: 1px solid var(--latte-300); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.cup-hint button:hover { background: #fff; }
.cup-hint .finger { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
.cup-hint.used .finger { animation: none; }

/* ===== スクロールで作るラテ ===== */
.lx-story { position: relative; height: 420vh; background: var(--cream); }
.lx-story-pin {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  grid-template-rows: auto auto 330px;
  grid-template-areas: "head head" "glass title" "glass steps";
  column-gap: clamp(24px, 5vw, 80px);
  align-content: center;
  max-width: var(--wrap); margin: 0 auto; padding: 80px 24px 24px;
}
.story-head { grid-area: head; text-align: center; margin-bottom: 32px; }
.story-head .en { color: var(--gold-dark); letter-spacing: 0.25em; font-size: 13px; }
.story-title { grid-area: title; align-self: end; }
.story-title h2 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 32px); }
.glass { grid-area: glass; position: relative; justify-self: center; align-self: center; width: min(260px, 40vw); height: min(400px, 50vh); border: 3px solid rgba(74, 52, 38, 0.18); border-top: 0; border-radius: 0 0 46px 46px; background: linear-gradient(90deg, rgba(255,255,255,.7), rgba(255,255,255,.2) 30%, rgba(255,255,255,.5)); overflow: hidden; box-shadow: 0 30px 60px rgba(74, 52, 38, 0.12); }
.glass::before { content: ""; position: absolute; top: 0; left: 10%; width: 8%; height: 85%; background: linear-gradient(rgba(255,255,255,.7), transparent); border-radius: 99px; z-index: 5; }
.layer { position: absolute; left: 0; right: 0; height: 0; }
.layer.l1 { background: linear-gradient(#5a3520, #2a1a10); }
.layer.l2 { background: linear-gradient(#f1dfc6, #d6b48e); }
.layer.l3 { background: radial-gradient(circle at 20% 30%, #fff 2px, transparent 3px) 0 0 / 22px 18px, radial-gradient(circle at 70% 60%, #fff 1.5px, transparent 2.5px) 0 0 / 30px 24px, #fbf3e6; }
.pour { position: absolute; left: 50%; top: 0; width: 10px; margin-left: -5px; border-radius: 0 0 6px 6px; height: 0; opacity: 0; transition: opacity 0.2s; z-index: 3; }
.glass-art { position: absolute; left: 50%; width: 46%; transform: translate(-50%, 0) scale(0.3); opacity: 0; transition: opacity 0.4s, transform 0.6s cubic-bezier(.2,.8,.2,1); z-index: 4; }
.glass-art.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.story-steps { grid-area: steps; position: relative; min-height: 300px; margin-top: 12px; }
.story-step { position: absolute; inset: 0; opacity: 0; transform: translateY(24px); transition: opacity 0.5s, transform 0.5s; pointer-events: none; }
.story-step.on { opacity: 1; transform: none; pointer-events: auto; }
.story-step .no { font-family: "Zen Maru Gothic", sans-serif; color: var(--gold); letter-spacing: 0.2em; font-size: 13px; }
.story-step h3 { font-size: clamp(22px, 3vw, 32px); margin: 6px 0 4px; word-break: auto-phrase; }
.story-step .kind { color: var(--gold-dark); font-weight: 700; margin: 0 0 10px; }
.story-step p { color: var(--muted); line-height: 1.9; margin: 0 0 10px; }
.story-step ul { margin: 0; padding-left: 1.2em; color: var(--text); }
.story-dots { display: flex; gap: 8px; }
.story-dots i { width: 28px; height: 4px; border-radius: 4px; background: var(--line); transition: background 0.3s; }
.story-dots i.on { background: var(--gold); }

/* ===== 訪問エリアの星座 ===== */
.lx-area { background: linear-gradient(180deg, var(--cream), var(--latte-100)); }
.orbit { position: relative; max-width: 760px; margin: 0 auto; aspect-ratio: 16 / 10; }
.orbit svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orbit .link { fill: none; stroke: var(--latte-500); stroke-width: 1.5; stroke-dasharray: 4 6; vector-effect: non-scaling-stroke; stroke-dashoffset: 400; transition: stroke-dashoffset 2s ease; }
.orbit.on .link { stroke-dashoffset: 0; }
.orbit .ring { position: absolute; width: 160px; height: 160px; border: 1.5px solid var(--gold); border-radius: 50%; transform: translate(-50%, -50%) scale(0.4); opacity: 0; pointer-events: none; }
.orbit.on .ring { animation: ripple 3.2s ease-out infinite; animation-delay: var(--d, 0s); }
@keyframes ripple { from { transform: translate(-50%, -50%) scale(0.4); opacity: 0.8; } to { transform: translate(-50%, -50%) scale(1.8); opacity: 0; } }
.node, .chip { position: absolute; transform: translate(-50%, -50%) scale(0.6); opacity: 0; transition: transform 0.6s cubic-bezier(.2,1.4,.4,1), opacity 0.4s; transition-delay: var(--d, 0s); }
.orbit.on .node, .orbit.on .chip { transform: translate(-50%, -50%); opacity: 1; }
.node { background: var(--latte-900); color: var(--foam); border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: 15px; white-space: nowrap; box-shadow: 0 10px 24px rgba(74, 52, 38, 0.25); }
.chip { background: #fff; border: 1.5px solid var(--latte-300); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 700; color: var(--latte-700); white-space: nowrap; box-shadow: var(--shadow); }
.chip.city { background: var(--green-100); border-color: transparent; color: var(--green); }

/* ===== スクロールで浮かび上がる ===== */
.rv { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }
/* 見出しは1文字ずつ */
.split-s .ch { opacity: 0; transform: translateY(0.5em); filter: blur(6px); }
.split-s.in .ch { animation: lx-ch 0.7s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--i) * 35ms + 0.1s); }

/* ボタン：ミルクが満ちるように */
.fx .btn { position: relative; overflow: hidden; isolation: isolate; }
.fx .btn::before { content: ""; position: absolute; left: var(--mx, 50%); top: var(--my, 50%); width: 0; height: 0; border-radius: 50%; background: rgba(255, 250, 242, 0.35); transform: translate(-50%, -50%); transition: width 0.5s, height 0.5s; z-index: -1; }
.fx .btn.ghost::before { background: rgba(201, 151, 79, 0.15); }
.fx .btn:hover::before { width: 260%; height: 600%; }
.fx .card, .fx .job { transition: transform 0.4s cubic-bezier(.2,.8,.2,1), box-shadow 0.4s; will-change: transform; }
.fx .card:hover, .fx .job:hover { box-shadow: 0 18px 40px rgba(74, 52, 38, 0.14); }

/* コーヒー豆のカーソル（マウスのときだけ） */
.bean { position: fixed; left: 0; top: 0; width: 14px; height: 18px; margin: -9px 0 0 -7px; border-radius: 50%; background: var(--latte-900); pointer-events: none; z-index: 70; opacity: 0; transition: opacity 0.3s; }
.bean::after { content: ""; position: absolute; left: 50%; top: 15%; bottom: 15%; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--latte-500); transform: rotate(12deg); }
.bean.on { opacity: 0.85; }


@media (max-width: 860px) {
  .lx-grid { grid-template-columns: 1fr; }
  .lx-text { display: contents; }
  .lx-pill { order: 1; margin-bottom: 14px; }
  .lx-visual { order: 2; height: 280px; margin: 0 0 64px; }
  .lx-title, .lx-hero .desc, .lx-hero .cta, .lx-facts { order: 3; }
  .ph-1 { left: 0; width: 58%; height: 100%; }
  .ph-2 { width: 40%; height: 54%; top: 0; }
  .ph figcaption { left: 8px; right: 8px; bottom: 8px; padding: 6px 8px; font-size: 11px; }
  .ph figcaption b { font-size: 13px; }
  .ph-badge { width: 64px; height: 64px; top: -14px; left: 46%; font-size: 9px; }
  .ph-badge b { font-size: 18px; }
  .cup-wrap { width: 108px; right: 6%; bottom: -16px; }
  .cup-hint { bottom: -58px; font-size: 11px; }
  .cup-hint button { padding: 4px 10px; }
  .lx-facts { margin-top: 28px; }
  .lx-story-pin {
    grid-template-columns: 76px 1fr;
    grid-template-rows: auto auto 1fr;
    grid-template-areas: "head head" "glass title" "steps steps";
    align-content: stretch;
    column-gap: 16px;
    align-content: start;
    padding: 64px 20px 16px;
  }
  .story-head { text-align: left; margin-bottom: 10px; }
  .glass { width: 76px; height: 120px; border-width: 2px; border-radius: 0 0 22px 22px; align-self: end; }
  .glass::before { left: 12%; }
  .pour { width: 5px; margin-left: -2.5px; }
  .story-title { align-self: center; }
  .story-title h2 { font-size: 20px; line-height: 1.5; }
  .story-steps { min-height: 0; margin-top: 20px; }
  .story-step h3 { font-size: 22px; }
  .story-step p { font-size: 15px; line-height: 1.8; }
  .story-step ul { font-size: 14px; }
  .orbit { aspect-ratio: 4 / 5; }
  .chip { font-size: 12px; padding: 4px 10px; }
  .node { font-size: 13px; padding: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .lx-title .ch, .split-s .ch { animation: none; opacity: 1; transform: none; filter: none; }
  .ph, .ph img, .ph-badge, .cup-wrap, .lx-pill span { animation: none !important; clip-path: none !important; opacity: 1 !important; transform: none !important; }
  .steam span, .aurora i, .cup-hint .finger { animation: none; }
  .rv { opacity: 1; transform: none; transition: none; }
  .orbit .ring { animation: none !important; }
  .cup-wrap { transform: none; }
}

/* ===== スクロールで作るラテ：リンクと案内 ===== */
.story-step .more { display: inline-block; margin-top: 12px; font-weight: 700; color: var(--gold-dark); text-decoration: none; }
.story-step .more::after { content: " →"; }
.story-cue { grid-area: cue; margin: 0; text-align: center; font-size: 12px; color: var(--latte-500); letter-spacing: 0.1em; }
.story-cue::after { content: ""; display: block; width: 1px; height: 28px; margin: 6px auto 0; background: linear-gradient(var(--latte-500), transparent); animation: cue 1.6s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.lx-story-pin { grid-template-areas: "head head" "glass title" "glass steps" "cue cue"; grid-template-rows: auto auto 330px auto; }

/* ===== 求人の欄 ===== */
.lx-recruit { position: relative; overflow: hidden; padding: clamp(64px, 9vw, 120px) 0; background: radial-gradient(80% 60% at 90% 0%, #f4d3cd55, transparent 60%), radial-gradient(70% 60% at 0% 100%, #e8c39a55, transparent 60%), var(--cream); }
.rc-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.rc-head .en { color: var(--gold-dark); letter-spacing: 0.25em; font-size: 13px; }
.rc-title { font-size: clamp(26px, 4vw, 42px); margin: 8px 0 12px; line-height: 1.4; }
.rc-head p { color: var(--muted); margin: 0; }
.rings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 860px; margin: 0 auto 56px; }
.ring-stat { position: relative; text-align: center; }
.ring-stat svg { width: 100%; max-width: 160px; transform: rotate(-90deg); }
.ring-stat circle { fill: none; stroke-width: 9; }
.ring-stat .bg { stroke: var(--line); }
.ring-stat .fg { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 1.6s cubic-bezier(.2,.8,.2,1); }
.rings.in .fg { stroke-dashoffset: calc(326.7 * (1 - var(--p))); }
.ring-stat:nth-child(2) .fg { stroke: var(--green); }
.ring-stat:nth-child(3) .fg { stroke: #e6a9a3; }
.ring-stat:nth-child(4) .fg { stroke: var(--latte-500); }
.ring-stat p { position: absolute; inset: 0; display: grid; place-content: center; margin: 0 auto; max-width: 160px; aspect-ratio: 1; }
.ring-stat b { font-family: "Zen Maru Gothic", sans-serif; font-size: clamp(26px, 3.4vw, 38px); color: var(--latte-900); line-height: 1; }
.ring-stat b .num { font-style: normal; }
.ring-stat b small { font-size: 0.45em; margin-left: 2px; }
.ring-stat span { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; padding: 0 14%; line-height: 1.4; }

.jf { max-width: 960px; margin: 0 auto 56px; }
.jf-q { text-align: center; font-size: 20px; margin: 0 0 16px; }
.jf-tabs { display: flex; justify-content: center; gap: 6px; background: #fff; padding: 6px; border-radius: 999px; box-shadow: var(--shadow); width: max-content; max-width: 100%; margin: 0 auto 24px; }
.jf-tabs button { font: inherit; font-weight: 700; font-size: 15px; border: 0; background: transparent; color: var(--latte-700); padding: 10px 20px; border-radius: 999px; cursor: pointer; min-height: 44px; transition: background 0.3s, color 0.3s; }
.jf-tabs button[aria-selected="true"] { background: var(--latte-900); color: var(--foam); }
.jf-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.jf-card { display: flex; flex-direction: column; gap: 4px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; text-decoration: none; color: var(--text); animation: jf-in 0.5s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: var(--d, 0s); transition: transform 0.3s, box-shadow 0.3s; }
.jf-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(74, 52, 38, 0.14); }
@keyframes jf-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.jf-card h3 { font-size: 18px; margin: 6px 0 0; }
.jf-pay { font-family: "Zen Maru Gothic", sans-serif; font-weight: 700; font-size: 24px; color: var(--gold-dark); margin: 4px 0 0; }
.jf-sub { margin: 0; font-size: 14px; color: var(--text); }
.jf-note { margin: 0; font-size: 13px; color: var(--muted); flex: 1; }
.jf-card .more { margin-top: 10px; font-weight: 700; font-size: 14px; color: var(--gold-dark); }
.jf-card .more::after { content: " →"; }
.jf-st { background: var(--green-100); }

.vc-wrap { margin: 0 auto 56px; }
.vcs { display: grid; grid-auto-flow: column; grid-auto-columns: min(360px, 82%); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 16px; justify-content: safe center; scrollbar-width: thin; }
.vc { scroll-snap-align: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.vc img { width: 64px; height: 64px; border-radius: 50%; background: var(--latte-100); }
.vc h3 { font-size: 16px; margin: 10px 0 2px; word-break: auto-phrase; }
.vc-who { font-size: 12px; font-weight: 700; color: var(--gold-dark); margin: 0 0 8px; }
.vc p:last-child { font-size: 14px; margin: 0; color: var(--text); line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }

.rc-cta { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: center; max-width: 960px; margin: 0 auto; }
.rc-quiz { display: flex; flex-direction: column; gap: 4px; background: var(--latte-900); color: var(--foam); border-radius: var(--radius); padding: 22px 24px; text-decoration: none; position: relative; overflow: hidden; }
.rc-quiz::after { content: "→"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 24px; transition: transform 0.3s; }
.rc-quiz:hover::after { transform: translate(6px, -50%); }
.rc-quiz b { font-size: 20px; }
.rc-quiz span:last-child { font-size: 13px; opacity: 0.8; padding-right: 32px; }
.rc-quiz .tag { width: max-content; }
.rc-btns { display: flex; flex-direction: column; gap: 10px; }
.rc-btns .btn { text-align: center; }

/* 求人のボタン（スクロールすると出る） */
.rc-float { position: fixed; right: 16px; bottom: 16px; z-index: 55; display: flex; align-items: center; gap: 8px; background: var(--green); color: #fff; text-decoration: none; border-radius: 999px; padding: 10px 18px; box-shadow: 0 10px 24px rgba(95, 138, 107, 0.35); font-size: 13px; transform: translateY(140%); transition: transform 0.4s cubic-bezier(.2,.8,.2,1); }
.rc-float.show { transform: none; }
.rc-float b { background: #fff; color: var(--green); border-radius: 999px; padding: 2px 10px; font-size: 13px; }

@media (max-width: 860px) {
  .lx-story-pin { grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-areas: "head head" "glass title" "steps steps" "cue cue"; align-content: stretch; padding-bottom: 20px; }
  .glass { width: 96px; height: 170px; }
  .lx-story-pin { grid-template-columns: 96px 1fr; }
  .story-steps { min-height: 0; margin-top: 24px; }
  .story-step { display: flex; flex-direction: column; justify-content: center; }
  .rings { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
  .ring-stat svg { max-width: 140px; }
  .jf-tabs button { padding: 8px 14px; font-size: 14px; }
  .rc-cta { grid-template-columns: 1fr; }
  .rc-float { left: 50%; right: auto; transform: translate(-50%, 140%); }
  .rc-float.show { transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .jf-card, .story-cue::after { animation: none; }
  .ring-stat .fg { transition: none; }
}

.jf-panel[hidden] { display: none; }
.ring-stat span { white-space: nowrap; padding: 0; font-size: 11px; }
.rc-float { white-space: nowrap; }
.rc-head .small { font-size: 12px; margin-top: 8px; }
@media (max-width: 860px) {
  .rc-float { padding: 8px 14px; font-size: 12px; bottom: 12px; }
  .story-step { transition: opacity 0.35s, transform 0.35s; }
}

/* 説明は同じマスに重ねて置き、一番長い説明の高さに合わせる（下の案内と重ならないように） */
.story-steps { display: grid; min-height: 0; }
.story-step { position: relative; inset: auto; grid-area: 1 / 1; }
.lx-story-pin { grid-template-rows: auto auto auto auto; align-content: center; }
@media (max-width: 860px) {
  .lx-story-pin { grid-template-rows: auto auto auto; grid-template-areas: "head head" "glass title" "steps steps"; align-content: center; }
  .story-cue { display: none; }
  .story-step { justify-content: flex-start; }
}
.story-cue { margin-top: 28px; }
.vc-more { text-align: center; margin: 4px 0 0; }
.vc-more a { font-weight: 700; color: var(--gold-dark); }
.vc-more a::after { content: " →"; }
@media (prefers-reduced-motion: reduce) { .vc { animation: none !important; } }

/* スクロールしてよいことが分かる案内（何番目か・下向きの矢印） */
.story-hint { display: inline-flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 6px 14px 6px 6px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); font-size: 13px; color: var(--latte-700); }
.story-count { background: var(--latte-900); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-variant-numeric: tabular-nums; }
.story-arrow { font-style: normal; font-weight: 700; color: var(--gold-dark); animation: hint-bob 1.4s ease-in-out infinite; }
@keyframes hint-bob { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(4px); } }
@media (max-width: 860px) { .story-hint { font-size: 12px; gap: 6px; padding: 4px 10px 4px 4px; } }
@media (prefers-reduced-motion: reduce) { .story-arrow { animation: none; } }
.story-count, .story-hint { white-space: nowrap; }

/* ===== 24時間の時計（ラテアートのカップの代わり） ===== */
.clock-wrap { position: absolute; right: 6%; bottom: 0; z-index: 3; width: clamp(150px, 14vw, 190px); aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: 0 18px 40px rgba(74, 52, 38, 0.22), inset 0 -6px 14px rgba(74, 52, 38, 0.08); padding: 6%; animation: pop 0.7s 1.2s cubic-bezier(.2,1.4,.4,1) backwards; transition: background 0.6s; }
.clock { width: 100%; height: 100%; display: block; }
.clock .face { fill: #fffaf2; transition: fill 0.6s; }
.clock .rim { fill: none; stroke: var(--latte-300); stroke-width: 2; }
.clock .tk { stroke: var(--latte-300); stroke-width: 1.5; stroke-linecap: round; }
.clock .tk.big { stroke: var(--latte-700); stroke-width: 2.5; }
.clock .hand { stroke-linecap: round; }
.clock .hand.h { stroke: var(--latte-900); stroke-width: 4.5; }
.clock .hand.m { stroke: var(--latte-700); stroke-width: 3; }
.clock .hand.s { stroke: #e6a9a3; stroke-width: 1.5; }
.clock .heart { fill: #e6a9a3; }
.clock .sky { font-size: 13px; fill: var(--gold); }
/* 夜は空の色に */
.clock-wrap.night { background: #2c3550; }
.clock-wrap.night .face { fill: #39446a; }
.clock-wrap.night .rim, .clock-wrap.night .tk { stroke: #5b678f; }
.clock-wrap.night .tk.big { stroke: #c9d0ea; }
.clock-wrap.night .hand.h { stroke: #fffaf2; }
.clock-wrap.night .hand.m { stroke: #dfe3f3; }
.clock-wrap.night .sky { fill: #f3d68a; }
.clock-msg { position: absolute; right: 0; bottom: -64px; z-index: 4; max-width: 300px; margin: 0; background: #fff; border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow); font-size: 13px; line-height: 1.6; color: var(--text); animation: pop 0.6s 1.6s cubic-bezier(.2,1.4,.4,1) backwards; }
.clock-msg b { display: block; font-family: "Zen Maru Gothic", sans-serif; font-size: 18px; color: var(--gold-dark); font-variant-numeric: tabular-nums; }
.clock-msg::before { content: ""; position: absolute; top: -7px; right: 26%; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); }
@media (max-width: 860px) {
  .clock-wrap { width: 112px; right: 4%; bottom: -10px; }
  .clock-msg { bottom: -78px; max-width: 250px; font-size: 12px; padding: 8px 12px; }
  .clock-msg b { font-size: 15px; }
  .lx-visual { margin-bottom: 92px; }
}
@media (prefers-reduced-motion: reduce) { .clock-wrap, .clock-msg { animation: none !important; } }
/* 訪問リハビリの写真も、訪問看護の写真と同じ角の丸い四角に */
.ph-2 { border-radius: 28px; clip-path: inset(100% 0 0 0 round 28px); animation-name: wipe; }
/* 時計：幅と高さを同じ数字で決めて、どのブラウザでも真ん丸に。外側の白い縁はなくす */
.clock-wrap { --cs: clamp(140px, 13vw, 176px); width: var(--cs); height: var(--cs); aspect-ratio: auto; padding: 0; background: transparent; box-shadow: none; border-radius: 50%; }
.clock { filter: drop-shadow(0 12px 22px rgba(74, 52, 38, 0.22)); overflow: visible; }
.clock .rim { stroke: #fff; stroke-width: 5; }
.clock-wrap.night { background: transparent; }
.clock-wrap.night .rim { stroke: #2c3550; }
@media (max-width: 860px) { .clock-wrap { --cs: 104px; } }
@media (max-width: 860px) {
  .clock-wrap { bottom: 6px; }
  .clock-msg { bottom: -84px; }
  .lx-visual { margin-bottom: 104px; }
}

/* ===== 採用中心のヒーロー（2026-10） ===== */
.rt-hero .lx-title { font-size: clamp(30px, 4.6vw, 56px); }
.rt-sub { font-weight: 700; color: var(--latte-900); margin: 0 0 8px; max-width: 30em; line-height: 1.9; word-break: auto-phrase; }
.rt-hero .lx-pill .tag { margin-left: 6px; font-size: 11px; padding: 1px 8px; vertical-align: 1px; }
.rt-cta .btn { min-height: 52px; }
.rt-bonus { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 20px 0 0; font-size: 14px; font-weight: 700; color: var(--latte-900); }
@media (max-width: 600px) {
  .rt-cta { flex-direction: column; }
  .rt-cta .btn { width: 100%; }
}
@media (max-width: 860px) {
  /* 求人のヒーローは、スマホでは言葉を先に、写真をあとに */
  .rt-hero .lx-text { display: block; }
  .rt-hero .lx-visual { margin-top: 48px; }
  .rt-hero { padding-top: 28px; }
}
.vcs { grid-auto-columns: min(340px, 82%); }
.lx-pill .tag.urgent { background: #c0726b; color: #fff; box-shadow: none; opacity: 1; transform: none; animation: none; font-size: 11px; padding: 1px 8px; }

/* ===== 見出しを、細いペンの手書きで、やわらかく ===== */
.rt-hero .lx-text { container-type: inline-size; }
.rt-hero .lx-title.pen {
  font-family: "Zen Kurenaido", "Zen Maru Gothic", sans-serif;
  font-weight: 400;
  font-size: min(56px, 7.9cqi);
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #5a4232;
  margin: 0 0 26px;
}
.lx-title.pen .ln { display: block; white-space: nowrap; position: relative; width: max-content; }
.lx-title.pen .l2 { margin-left: 1.1em; }
.lx-title.pen em { background: linear-gradient(100deg, #b07a35, #c4706b); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.1em; }
.lx-title.pen em .c { -webkit-text-fill-color: transparent; background: inherit; -webkit-background-clip: text; background-clip: text; }
.lx-title.pen .w { display: inline-block; white-space: nowrap; }
.lx-title.pen .c { display: inline-block; transform: translateY(var(--y)) rotate(var(--r)) scale(var(--s)); }
/* 書いていくように、1文字ずつ出る */
.lx-title.pen .c { opacity: 0; clip-path: inset(0 100% 0 0); animation: pen-ch 0.35s ease-out forwards; animation-delay: calc(var(--i) * 0.09s + 0.3s); }
@keyframes pen-ch { to { opacity: 1; clip-path: inset(-30% -30% -30% -30%); } }
/* 「ここにある。」の下に、細い線と小さなハート */
.lx-title.pen .swash { position: absolute; left: -4%; bottom: -0.08em; width: 112%; height: 0.36em; overflow: visible; pointer-events: none; }
.lx-title.pen .swash path { fill: none; stroke: #cf8f8a; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 420; stroke-dashoffset: 420; animation: swash 1s 2.2s cubic-bezier(.6,.1,.3,1) forwards; }
@keyframes swash { to { stroke-dashoffset: 0; } }
/* スマホ：「あなたの／「働きたい」が、／ここにある。」の3行 */
@media (max-width: 600px) {
  .rt-hero .lx-title.pen { font-size: min(48px, 11.6cqi); line-height: 1.42; }
  .lx-title.pen .ln:first-child .w { display: block; width: max-content; }
  .lx-title.pen .ln:first-child .w:last-child { margin-left: 0.4em; }
  .lx-title.pen .l2 { margin-left: 0.9em; }
}
@media (prefers-reduced-motion: reduce) {
  .lx-title.pen .c { animation: none; opacity: 1; clip-path: none; }
  .lx-title.pen .swash path { animation: none; stroke-dashoffset: 0; }
}
.rt-hero .desc, .rt-sub, .rt-bonus { word-break: auto-phrase; text-wrap: pretty; }
.rt-bonus > span:not(.tag) { display: block; width: 100%; }
.rt-bonus b { font-size: 1.2em; color: var(--gold-dark); margin-left: 2px; }
.rt-bonus .rb-st { color: var(--green); }
.rt-bonus .rb-st b { color: var(--green); }

/* ===== ヒーローの文：それぞれの魅力へ ===== */
.rt-sub a { color: inherit; text-decoration: underline; text-decoration-color: rgba(201, 151, 79, 0.55); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.rt-sub a::after { content: " ›"; color: var(--gold-dark); }
.rt-sub a:hover { color: var(--gold-dark); }

/* ===== ヒーローの入社祝い金（目立たせる） ===== */
.rt-bonus { position: relative; overflow: hidden; display: grid; gap: 2px; margin: 22px 0 0; padding: 14px 18px 14px; border-radius: 18px; text-decoration: none; color: var(--latte-900); background: linear-gradient(135deg, #fff6e6, #ffe6d2 60%, #fde0dc); box-shadow: 0 12px 28px rgba(201, 151, 79, 0.3); border: 2px solid #f1c98d; max-width: 30em; }
.rt-bonus::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.8) 50%, transparent 65%); transform: translateX(-100%); animation: bonus-shine 3.6s ease-in-out infinite; pointer-events: none; }
.rt-bonus > * { position: relative; }
.rt-bonus .rb-label { justify-self: start; background: linear-gradient(90deg, #c9974f, #d97a6f); color: #fff; font-size: 13px; letter-spacing: 0.15em; padding: 3px 14px; border-radius: 999px; margin-bottom: 4px; }
.rt-bonus > span:not(.tag) { width: auto; }
.rt-bonus .rb-main { font-size: 15px; }
.rt-bonus b { display: inline-block; font-family: "Zen Maru Gothic", sans-serif; font-size: 36px; line-height: 1.15; margin-left: 6px; background: linear-gradient(180deg, #d9a54f, #a8742f); -webkit-background-clip: text; background-clip: text; color: transparent; vertical-align: -4px; }
.rt-bonus .rb-st { font-size: 14px; color: var(--green); }
.rt-bonus .rb-st b { font-size: 26px; background: linear-gradient(180deg, #74a481, #4c7a59); -webkit-background-clip: text; background-clip: text; }
.rt-bonus .rb-st i { font-style: normal; background: #c0726b; color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 999px; margin-right: 6px; vertical-align: 2px; }
@media (prefers-reduced-motion: reduce) { .rt-bonus::before { animation: none; } }

/* ===== スマホ：最初に職員の写真 ===== */
@media (max-width: 860px) {
  .rt-hero { padding-top: 16px; }
  .rt-hero .lx-grid { display: flex; flex-direction: column; align-items: stretch; }
  .rt-hero .lx-text, .rt-hero .lx-visual { width: 100%; }
  .rt-hero .lx-visual { order: -1; margin: 0 0 96px; height: min(108vw, 440px); }
  .rt-hero .ph-1 { width: 66%; height: 100%; }
  .rt-hero .ph-2 { width: 40%; height: 46%; top: 8%; }
  .rt-hero .ph-badge { top: -6px; left: 54%; }
}
.rt-sub { display: flex; flex-wrap: wrap; gap: 2px 16px; }
.rt-sub a { white-space: nowrap; padding: 2px 0; }
