/* Juggly の紹介ページ（/juggly/）と子ページ（support・privacy・terms・legal）。
   紹介ページはアプリの見た目の決まりに合わせる: 地と文字は無彩色、色は先方（朱・藍）と今回の候補（緑）だけ。
   状態は色に頼らず、塗り（埋まり）・斜線（たぶん埋まり）・枠と名前（他の先方に提案中）・破線（空き）で見分ける。
   幅の区切り: 1024px 以上（2 列・大きい端末）／700〜1023px（2 列・小さい端末）／699px 以下（1 列）。 */
.product-juggly {
  --jg-bg: #fff;
  --jg-fill: #f2f2f7;
  --jg-ink: #1c1c1e;
  --jg-ink-2: #5d5d63;
  --jg-busy: #d1d1d6;
  --jg-hair: #e5e5ea;
  --jg-maybe: #aeaeb2;
  --jg-red: #c93434;
  --jg-blue: #3a5bd9;
  --jg-green: #197a47;
  background: var(--jg-bg);
  color: var(--jg-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
/* ヘッダーは流れの中に浮いた帯なので、その周りと上の余白も最初の画面と同じ面の色にする（紹介ページだけ。子ページは明るい地のまま） */
body:has(.product-juggly) { background: #f2f2f7; }
.product-juggly h1, .product-juggly h2, .product-juggly h3 { color: var(--jg-ink); font-family: inherit; letter-spacing: 0; word-break: auto-phrase; text-wrap: balance; }
.product-juggly .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.product-juggly :focus-visible { outline: 3px solid var(--jg-ink); outline-offset: 3px; }
.product-juggly a { color: var(--jg-ink); text-decoration: underline; text-underline-offset: .2em; }

/* ---------- 端末のフレーム（最初の画面のデモと、画面写真で共通） ----------
   iphone-frame.webp は 980×2000。画面の穴は左 50・上 44・幅 880・高さ 1912。穴の角は円ではなく四隅まで張り出した形なので、
   画面は穴より少し大きく、角を小さめに丸めて、はみ出しをフレームの黒い縁に隠す（角を穴に合わせると四隅から背景が見える）。 */
.jg-device { position: relative; width: 100%; aspect-ratio: 980 / 2000; }
.jg-screen {
  position: absolute; left: 4.4%; top: 1.85%; width: 91.2%; height: 96.3%;
  border-radius: 11% / 5.2%; overflow: hidden; background: var(--jg-bg);
  container-type: inline-size;
}
.jg-screen > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.jg-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; }

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

.jg-hero { background: var(--jg-fill); padding: clamp(28px, 5vw, 64px) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.jg-hero-grid {
  --pw: clamp(300px, min(30vw, (100svh - 150px) * .49), 380px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--pw);
  grid-template-areas: "copy device" "try device";
  grid-template-rows: auto 1fr;
  column-gap: clamp(40px, 7vw, 112px);
  align-items: start;
}
.jg-hero-copy { grid-area: copy; align-self: end; padding-top: clamp(24px, 9vh, 120px); }
.jg-hero-try { grid-area: try; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--jg-busy); max-width: 30em; }
.jg-device-demo { grid-area: device; width: var(--pw); scroll-margin-top: 96px; filter: drop-shadow(0 30px 40px rgb(0 0 0 / .14)); }

.jg-app { display: flex; align-items: center; gap: 12px; font-size: 1.125rem; font-weight: 700; line-height: 1; }
.jg-app img { width: 44px; height: 44px; border-radius: 22%; }
.jg-title { margin-top: 24px; font-size: clamp(2.125rem, 4.4vw, 3.75rem); font-weight: 700; line-height: 1.22; }
.jg-title span { display: inline-block; }
.jg-lead { margin-top: 20px; max-width: 30em; font-size: clamp(1rem, 1.5vw, 1.125rem); color: var(--jg-ink-2); }
.jg-avail { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: .875rem; color: var(--jg-ink-2); }
.jg-avail-store { font-weight: 700; color: var(--jg-ink); }

.jg-hint { font-size: .9375rem; font-weight: 600; }
.jg-legend { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .8125rem; color: var(--jg-ink-2); }
.jg-legend li { display: inline-flex; align-items: center; gap: 7px; margin: 0; }
.jg-legend .sw { width: 22px; height: 15px; border-radius: 4px; flex: none; display: inline-block; }
.jg-legend .sw-busy { background: var(--jg-busy); }
.jg-legend .sw-maybe { background-color: var(--jg-bg); background-image: repeating-linear-gradient(135deg, transparent 0 4px, var(--jg-maybe) 4px 5.5px); box-shadow: inset 0 0 0 1px var(--jg-maybe); }
.jg-legend .sw-held { background: color-mix(in srgb, var(--jg-red) 12%, var(--jg-bg)); border: 2px solid var(--jg-red); }
.jg-legend .sw-free { background: color-mix(in srgb, var(--jg-green) 8%, var(--jg-bg)); border: 1.5px dashed var(--jg-green); }
.jg-legend .sw-cand { background: var(--jg-green); }

/* ---------- 端末の中（アプリの「新しい提案」の画面）。単位は画面の幅（cqw）なので、端末の大きさが変わっても同じ見た目 ---------- */

.jg-screen { --hh: 13cqw; --gutter: 10.5cqw; }
.jg-app-bar { display: flex; align-items: center; gap: 2.6cqw; padding: 13.5cqw 4cqw 0; height: 24cqw; font-size: 4.2cqw; line-height: 1; }
.jg-app-x { width: 8.4cqw; height: 8.4cqw; border-radius: 50%; background: var(--jg-fill); position: relative; flex: none; }
.jg-app-x::before, .jg-app-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 3.6cqw; height: .5cqw; background: var(--jg-ink); border-radius: 1cqw; transform: translate(-50%, -50%) rotate(45deg); }
.jg-app-x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.jg-app-chip { margin-left: auto; padding: 1.8cqw 3cqw; border-radius: 99cqw; background: var(--jg-fill); font-size: 3.2cqw; font-weight: 600; }

.jg-days, .jg-grid { display: grid; grid-template-columns: var(--gutter) repeat(3, minmax(0, 1fr)); }
.jg-days { padding: 2.4cqw 0 1.6cqw; border-bottom: 1px solid var(--jg-hair); }
.jg-day { padding-left: 2cqw; font-weight: 600; font-size: 3.8cqw; line-height: 1.2; font-variant-numeric: tabular-nums; }
.jg-day small { margin-left: .6cqw; font-weight: 400; font-size: 2.8cqw; color: var(--jg-ink-2); }
.jg-hours { position: relative; height: calc(var(--hh) * 10); }
.jg-hours span {
  position: absolute; right: 1.6cqw; top: calc((var(--h) - 9) * var(--hh)); transform: translateY(-50%);
  font-size: 2.6cqw; line-height: 1; color: var(--jg-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.jg-hours span:first-child { transform: translateY(1cqw); }
.jg-col {
  position: relative; height: calc(var(--hh) * 10); border-left: 1px solid var(--jg-hair);
  background-image: linear-gradient(to bottom, var(--jg-hair) 1px, transparent 1px);
  background-size: 100% var(--hh); background-position: 0 -1px;
}
.jg-col::after { content: ""; position: absolute; inset: auto 0 0; height: var(--hh); background: var(--jg-fill); }

.product-juggly .jg-blk {
  position: absolute; left: .7cqw; right: .7cqw; z-index: 1;
  top: calc((var(--s) - 9) * var(--hh) + .3cqw);
  height: calc((var(--e) - var(--s)) * var(--hh) - .6cqw);
  margin: 0; padding: .9cqw 1.4cqw; border: 0; border-radius: 1.8cqw;
  font: inherit; font-size: 2.85cqw; line-height: 1.25; text-align: left; color: var(--jg-ink);
  overflow: hidden; display: flex; flex-direction: column; align-items: flex-start;
}

/* 帯の種類（デモと見分け方の節で共通） */
.product-juggly .jg-busy { background: var(--jg-busy); }
.product-juggly .jg-maybe {
  background-color: var(--jg-fill);
  background-image: repeating-linear-gradient(135deg, transparent 0 5px, var(--jg-maybe) 5px 6.5px);
  box-shadow: inset 0 0 0 1px var(--jg-maybe);
}
.product-juggly .jg-maybe > span { background: var(--jg-fill); border-radius: 4px; padding: 0 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.product-juggly .jg-free {
  background: color-mix(in srgb, var(--jg-green) 8%, var(--jg-bg));
  border: 1.5px dashed color-mix(in srgb, var(--jg-green) 85%, var(--jg-bg));
}
.product-juggly .jg-held { --c: var(--jg-red); background: color-mix(in srgb, var(--c) 12%, var(--jg-bg)); border: 2px solid var(--c); }
.product-juggly .jg-c-a { --c: var(--jg-red); }
.product-juggly .jg-c-b { --c: var(--jg-blue); }

/* 押せる枠 */
.product-juggly .jg-slot { cursor: pointer; width: auto; }
.product-juggly .jg-slot .on { display: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.product-juggly .jg-slot .sub { font-weight: 400; }
.product-juggly .jg-slot[aria-pressed="true"] { background: var(--jg-green); color: #fff; border-style: solid; border-color: var(--jg-green); }
.product-juggly .jg-held[aria-pressed="true"] { border-color: var(--c); }
.product-juggly .jg-slot[aria-pressed="true"] .on { display: inline; }
.product-juggly .jg-slot[aria-pressed="true"] .off { display: none; }
.product-juggly .jg-slot:hover { filter: brightness(.96); }
.product-juggly .jg-slot:focus-visible { outline: 2px solid var(--jg-ink); outline-offset: 1px; z-index: 2; }

/* 下に浮いたパネル（アプリと同じく、操作の層だけガラス） */
.jg-out {
  position: absolute; left: 3cqw; right: 3cqw; bottom: 4cqw; z-index: 3;
  padding: 3.6cqw 3.6cqw 3.2cqw; border-radius: 7cqw;
  background: rgb(255 255 255 / .86); -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6);
  box-shadow: 0 0 0 1px rgb(0 0 0 / .06), 0 4cqw 10cqw -4cqw rgb(0 0 0 / .25);
}
.jg-text {
  margin: 0; padding: 0 .6cqw; border: 0; background: none; font: inherit; font-size: 3.4cqw; line-height: 1.6; white-space: pre-wrap;
  font-variant-numeric: tabular-nums; color: var(--jg-ink); max-height: 27cqw; overflow-y: auto; overscroll-behavior: contain;
}
.jg-text:focus-visible { outline-offset: 1px; }
.jg-warn { margin-top: 1.6cqw; padding: 0 .6cqw; font-size: 2.9cqw; line-height: 1.45; color: var(--jg-ink); }
.jg-warn:empty { display: none; }
.jg-out-row { display: flex; gap: 2cqw; margin-top: 2.6cqw; }
.jg-seg { display: flex; flex: 1.15; margin: 0; padding: .8cqw; border: 0; border-radius: 99cqw; background: rgb(118 118 128 / .14); }
.jg-seg label { position: relative; flex: 1; cursor: pointer; }
.jg-seg input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.jg-seg span { display: flex; align-items: center; justify-content: center; height: 9cqw; border-radius: 99cqw; font-size: 3cqw; white-space: nowrap; color: var(--jg-ink-2); }
.jg-seg input:checked + span { background: var(--jg-bg); color: var(--jg-ink); font-weight: 600; box-shadow: 0 .3cqw 1cqw rgb(0 0 0 / .12); }
.jg-seg input:focus-visible + span { outline: 2px solid var(--jg-ink); outline-offset: 1px; }
.jg-copy {
  flex: 1; height: 10.6cqw; padding: 0 3cqw; border: 0; border-radius: 99cqw; cursor: pointer;
  background: var(--jg-green); color: #fff; font: inherit; font-size: 3.6cqw; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 1.6cqw;
  transition: transform .12s ease;
}
.jg-copy:active { transform: scale(.97); }
.jg-copy:disabled { background: var(--jg-busy); color: var(--jg-ink-2); cursor: default; transform: none; }
.jg-copy svg { width: 4.6cqw; height: 4.6cqw; }
/* コピーの結果は上に出る知らせ（アプリのトーストと同じ位置） */
.jg-status {
  position: absolute; left: 50%; top: 14cqw; z-index: 4; transform: translateX(-50%);
  max-width: 86cqw; padding: 2.2cqw 4.4cqw; border-radius: 99cqw;
  background: rgb(28 28 30 / .9); color: #fff; font-size: 3.2cqw; line-height: 1.4; text-align: center; white-space: nowrap;
}
.jg-status:empty { display: none; }

/* ---------- 節 ---------- */

.jg-sec { padding: clamp(56px, 8vw, 112px) 0; }
.jg-sec-fill { background: var(--jg-fill); }
.product-juggly .jg-sec h2 { font-size: clamp(1.5rem, 3.4vw, 2.25rem); font-weight: 700; line-height: 1.35; }
.jg-sec-lead { margin-top: 14px; max-width: 36em; color: var(--jg-ink-2); }

/* 見分け方 */
.jg-kinds { margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 28px; }
.jg-kinds dt { font-weight: 700; }
.jg-kinds dd { margin: 6px 0 0; font-size: .9375rem; color: var(--jg-ink-2); }
.product-juggly .jg-sample {
  display: flex; align-items: flex-start; height: 96px; margin-bottom: 16px; padding: 8px 10px;
  border-radius: 10px; font-size: .8125rem; font-weight: 400; line-height: 1.3; color: var(--jg-ink);
}

/* 送ったあと */
.jg-flow { margin: 48px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); counter-reset: jg-flow; }
.jg-flow li { margin: 0; counter-increment: jg-flow; }
.jg-flow .jg-device { max-width: 250px; filter: drop-shadow(0 18px 24px rgb(0 0 0 / .12)); }
.product-juggly .jg-flow h3 { margin-top: 24px; font-size: 1.0625rem; font-weight: 700; }
.product-juggly .jg-flow h3::before { content: counter(jg-flow) "  "; white-space: pre; color: var(--jg-ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.jg-flow p { margin-top: 6px; max-width: 22em; font-size: .9375rem; color: var(--jg-ink-2); }
.jg-more { margin: 64px 0 0; padding-top: 32px; border-top: 1px solid var(--jg-busy); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 40px; }
.jg-more dt { font-weight: 700; }
.jg-more dd { margin: 6px 0 0; font-size: .9375rem; color: var(--jg-ink-2); }
.jg-more > div { scroll-margin-top: 100px; }

/* 料金 */
.jg-table { margin-top: 32px; overflow-x: auto; }
.product-juggly .jg-table table { width: 100%; min-width: 30em; border-collapse: collapse; table-layout: fixed; font-size: .9375rem; line-height: 1.6; font-variant-numeric: tabular-nums; }
.product-juggly .jg-table :is(th, td) { padding: 14px 16px 14px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--jg-hair); }
.product-juggly .jg-table thead th { width: 33%; font-weight: 700; font-size: 1rem; border-bottom: 1.5px solid var(--jg-ink); }
.product-juggly .jg-table thead th:first-child { width: 34%; }
.product-juggly .jg-table tbody th { font-weight: 400; color: var(--jg-ink-2); }
.jg-price-row b { font-size: 1.375rem; font-weight: 600; color: var(--jg-ink); }
.jg-nw { white-space: nowrap; }
.jg-price-row small { display: block; margin-top: 4px; font-size: .8125rem; color: var(--jg-ink-2); }
.jg-note { margin-top: 16px; font-size: .875rem; color: var(--jg-ink-2); }

/* よくある質問・サポートと規約: 見出しの下に、容器いっぱいの幅で並べる */
.jg-split { display: grid; gap: 28px; }
.jg-split + .jg-split { margin-top: clamp(56px, 7vw, 88px); }
.jg-split-head .jg-sec-lead { font-size: .9375rem; }

.jg-faq { display: grid; gap: 10px; }
.jg-faq details { background: var(--jg-bg); border-radius: 18px; scroll-margin-top: 100px; transition: box-shadow .2s ease; }
.jg-faq details[open] { box-shadow: 0 0 0 1px var(--jg-hair), 0 10px 24px -16px rgb(0 0 0 / .18); }
.jg-faq summary {
  display: flex; align-items: center; gap: 16px; justify-content: space-between;
  min-height: 68px; padding: 16px 20px 16px 24px; list-style: none; cursor: pointer;
  font-size: 1.0625rem; font-weight: 700; line-height: 1.5; border-radius: 18px;
}
.jg-faq summary::-webkit-details-marker { display: none; }
.jg-faq summary:hover .jg-faq-icon { background: var(--jg-busy); }
.jg-faq summary:focus-visible { outline-offset: 2px; }
/* ＋ が開くと × に回る */
.jg-faq-icon { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--jg-fill); transition: transform .25s ease, background-color .2s ease; }
.jg-faq-icon::before, .jg-faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: var(--jg-ink); }
.jg-faq-icon::after { transform: rotate(90deg); }
.jg-faq details[open] .jg-faq-icon { transform: rotate(45deg); background: var(--jg-ink); }
.jg-faq details[open] .jg-faq-icon::before, .jg-faq details[open] .jg-faq-icon::after { background: #fff; }
.jg-faq details > p { margin: 0; padding: 0 72px 22px 24px; max-width: 48em; color: var(--jg-ink-2); }

.jg-doc-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.product-juggly .jg-doc-card {
  position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 112px;
  padding: 20px 52px 20px 24px; border-radius: 18px; background: var(--jg-bg);
  color: var(--jg-ink); text-decoration: none; transition: box-shadow .2s ease;
}
.product-juggly .jg-doc-card:hover { box-shadow: 0 0 0 1px var(--jg-busy); }
.jg-doc-title { font-weight: 700; line-height: 1.5; }
.jg-doc-desc { font-size: .875rem; line-height: 1.6; color: var(--jg-ink-2); }
.jg-doc-go { position: absolute; right: 20px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--jg-ink-2); transition: transform .2s ease; }
.jg-doc-card:hover .jg-doc-go { transform: translateX(3px); color: var(--jg-ink); }

/* ---------- 幅ごとの調整 ---------- */

/* 700〜1023px: 2 列のまま、端末を小さく */
@media (max-width: 1023px) {
  .jg-hero-grid { --pw: clamp(270px, 36vw, 320px); column-gap: 40px; }
  .jg-hero-copy { padding-top: 16px; }
  .jg-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .jg-doc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 699px 以下: 1 列。文 → 押し方と見方 → 端末 */
@media (max-width: 699px) {
  .jg-hero-grid {
    --pw: min(330px, 84vw);
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "try" "device";
    grid-template-rows: none;
  }
  .jg-hero-copy { padding-top: 0; }
  .jg-device-demo { justify-self: center; margin-top: 28px; }
  .jg-hero-try { margin-top: 28px; padding-top: 20px; }
  .jg-kinds { gap: 28px 16px; }
  .product-juggly .jg-sample { height: 60px; margin-bottom: 12px; }
  .jg-flow { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: min(62vw, 240px); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 0 12px; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .jg-flow li { scroll-snap-align: start; }
  .jg-more { grid-template-columns: minmax(0, 1fr); margin-top: 48px; }
  .product-juggly .jg-table table { min-width: 0; font-size: .875rem; }
  .product-juggly .jg-table :is(th, td) { padding-right: 10px; }
  .product-juggly .jg-table thead th { width: 29%; }
  .product-juggly .jg-table thead th:first-child { width: 42%; }
  .jg-price-row b { font-size: 1.125rem; }
  .jg-doc-cards { grid-template-columns: minmax(0, 1fr); }
  .product-juggly .jg-doc-card { min-height: 0; padding: 18px 48px 18px 20px; }
  .jg-faq summary { padding: 14px 16px 14px 20px; font-size: 1rem; }
  .jg-faq details > p { padding: 0 20px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .jg-copy, .jg-faq details, .jg-faq-icon, .jg-doc-card, .jg-doc-go { transition: none; }
}

/* ---------- 子ページ（support・privacy・terms・legal） ---------- */

.juggly-doc :focus-visible { outline: 3px solid var(--tp-indigo); outline-offset: 3px; }
.juggly-doc .table-scroll { overflow-x: auto; }
.juggly-doc .table-scroll:focus-visible { outline-offset: 2px; }
.juggly-doc table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; line-height: 1.6; }
.juggly-doc :is(th, td) { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--tp-line); }
.juggly-doc thead th { font-weight: 700; border-bottom: 1.5px solid var(--tp-ink); white-space: nowrap; }
.juggly-doc .wide { min-width: 36em; }
.juggly-doc-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; border-top: 1px solid var(--tp-line); padding-top: 16px; }
.juggly-doc-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--tp-indigo); text-decoration: underline; text-underline-offset: .2em; }
.juggly-doc-nav a[aria-current="page"] { font-weight: 700; }
.juggly-doc .juggly-doc-toc { padding: 20px; border-radius: 12px; background: var(--tp-lavender-3); }
.juggly-doc .juggly-doc-toc h2 { margin: 0; }
.juggly-doc .juggly-doc-toc ol { margin-bottom: 0; }
.juggly-doc .page-body dt { font-weight: 700; margin-top: 16px; }
.juggly-doc .page-body dd { margin-top: 4px; }
.juggly-doc .page-body h2[id] { scroll-margin-top: 100px; }
.juggly-doc .page-body .doc-end { margin-block: 36px 24px; }
.juggly-doc .page-body { overflow-wrap: anywhere; }
