/* Scene pages, help center, articles, privacy and 404. */
.page-hero { position: relative; padding-block: clamp(56px, 7vw, 104px) clamp(40px, 5vw, 64px); overflow: clip; }
.page-hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 70%; height: 140%; background: radial-gradient(closest-side, rgba(0, 136, 255, .1), rgba(0, 136, 255, 0)); pointer-events: none; }
.page-hero .wrap { position: relative; }
.page-hero .h1 { max-width: 20em; text-wrap: balance; }
.page-hero .lead { margin-top: 22px; }
.crumbs [aria-current] { color: var(--ink); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 22px; font-size: 14px; color: var(--ink-2); }
.crumbs a:hover { color: var(--blue-ink); }
.crumbs .i { width: 13px; height: 13px; transform: rotate(-90deg); }

/* Scenes index */
.scenes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding-bottom: clamp(72px, 8vw, 120px); }
.scene-tile { display: flex; flex-direction: column; padding: 30px 30px 26px; border-radius: 28px; background: var(--surface); transition: transform .5s var(--snappy), box-shadow .4s var(--ease), background-color .3s; }
.scene-tile:hover { transform: translateY(-3px); background: #fff; box-shadow: 0 0 0 .5px rgba(10, 20, 38, .07), 0 26px 48px -26px rgba(var(--shadow), .35); }
.scene-tile h2 { margin-top: 16px; font-size: 21px; font-weight: 700; line-height: 1.5; text-wrap: balance; }
.scene-tile p { margin-top: 10px; font-size: 15.5px; line-height: 1.8; color: var(--ink-2); }
.scene-tile-ex { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 22px; }
.scene-tile-ex li { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; background: #fff; font-size: 14px; box-shadow: 0 0 0 .5px rgba(10, 20, 38, .06); }
.scene-tile:hover .scene-tile-ex li { background: var(--surface); box-shadow: none; }
.scene-tile-ex span { font: 600 14px/1 ui-rounded, "SF Pro Rounded", -apple-system, sans-serif; color: var(--blue-ink); }
.scene-tile-ex .i { width: 13px; height: 13px; color: var(--ink-3); }
.scene-tile-ex b { font: 700 15px/1 var(--brand-ja); }

/* Scene page */
.page-hero--scene .wrap, .scene-body { width: min(1000px, calc(100% - 96px)); }
.page-hero--scene .h1 { max-width: 18em; }
.scene-body { display: grid; gap: clamp(56px, 6vw, 84px); padding-bottom: clamp(72px, 8vw, 120px); }
.scene-sec h2 { margin-bottom: 22px; font-size: 24px; font-weight: 700; line-height: 1.4; }
.examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ex { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; min-height: 128px; padding: 18px 20px; border-radius: 26px; background: var(--surface); }
.ex-key { display: flex; flex-direction: column; justify-content: center; }
.ex-key--solid { align-self: start; min-width: 118px; max-width: 220px; height: 58px; padding: 0 16px; border-radius: 16px; background: var(--blue); color: #fff; box-shadow: 0 6px 8px -4px rgba(var(--shadow), .2), 0 16px 26px -12px rgba(var(--shadow), .35); }
.ex-in { font: 600 18px/1 ui-rounded, "SF Pro Rounded", -apple-system, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex.is-typing .ex-in::after { content: ""; display: inline-block; width: 2px; height: 19px; margin-left: 2px; vertical-align: -3px; background: rgba(255, 255, 255, .9); animation: blink 1s steps(1) infinite; }
.ex-key--glass { position: relative; z-index: 1; align-self: end; margin: 28px 0 0 -26px; min-height: 74px; padding: 10px 18px; border-radius: 20px; background: linear-gradient(150deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .66)); -webkit-backdrop-filter: blur(14px) saturate(170%); backdrop-filter: blur(14px) saturate(170%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8), 0 12px 26px -14px rgba(var(--shadow), .38); overflow: hidden; transition: opacity .3s, transform .5s var(--bouncy); }
.ex-key--glass::before { content: ""; position: absolute; inset: 0; background: radial-gradient(110% 110% at 0 0, rgba(0, 136, 255, .24), rgba(0, 136, 255, 0) 60%); pointer-events: none; }
.ex.is-typing .ex-key--glass { opacity: 0; transform: translate(14px, 12px) scale(.94); }
.ex-reading, .ex-note { position: relative; font-size: 12.5px; font-weight: 600; color: var(--blue-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-out { position: relative; font: 700 26px/1.3 var(--brand-ja); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-via { position: absolute; right: 16px; top: 14px; padding: 2px 9px; border-radius: 999px; background: #fff; color: var(--ink-2); font-size: 12px; font-weight: 650; }
.pains { display: grid; gap: 10px; }
.pains li { position: relative; padding: 16px 20px 16px 46px; border-radius: 18px; background: var(--surface); font-size: 16.5px; line-height: 1.6; color: var(--ink); }
.pains li::before { content: ""; position: absolute; left: 24px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--ink-3); }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.how-item { padding: 24px 22px; border-radius: 24px; box-shadow: inset 0 0 0 1px var(--line); }
.how-n { font: 600 13px/1 var(--mono); color: var(--blue-ink); }
.how-item h3 { margin-top: 14px; font-size: 18.5px; font-weight: 700; line-height: 1.45; }
.how-item p { margin-top: 8px; font-size: 15px; line-height: 1.8; color: var(--ink-2); }
.scene-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.pack-list { display: grid; gap: 2px; }
.pack-list li { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--line-2); font-size: 16px; }
.toggle { position: relative; flex: none; width: 40px; height: 24px; border-radius: 12px; background: #34c759; }
.toggle::after { content: ""; position: absolute; right: 2px; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .15); }
.ticks { display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.7; color: var(--ink); }
.ticks .i { width: 22px; height: 22px; margin-top: 2px; padding: 4px; border-radius: 50%; background: var(--blue-wash); color: var(--blue-ink); stroke-width: 2.6; }
.faq-item summary { padding: 20px 4px; }
.faq-item h3 { font-size: 17.5px; }
.faq-a { padding-bottom: 22px; }
.related h2 { margin-bottom: 18px; font-size: 20px; font-weight: 700; }
.related-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.related-guide { background: var(--blue-wash) !important; }
.related-guide small { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.related-guide .scene-card-tag { background: #fff; }
.related-list a { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 22px; background: var(--surface); transition: transform .4s var(--snappy), background-color .3s; }
.related-list a:hover { transform: translateY(-2px); background: var(--blue-wash); }
.related-list b { font-size: 15.5px; font-weight: 650; line-height: 1.55; }
.related-list .i { width: 18px; height: 18px; color: var(--blue-ink); margin-top: auto; }

/* CTA band */
.cta-band { padding-block: 8px clamp(72px, 8vw, 112px); }
.cta-band-inner { display: flex; align-items: center; gap: 36px; padding: 36px 44px; border-radius: 34px; background: var(--blue); color: #fff; overflow: hidden; position: relative; }
.cta-band-inner::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 120% at 0 0, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 60%); pointer-events: none; }
.cta-band-keys { position: relative; flex: none; width: 112px; height: 112px; }
.cta-band-keys .keycap { font-size: 34px; }
.cta-band-keys .keycap--solid { width: 70px; height: 70px; background: #fff; color: var(--blue); }
.cta-band-keys .keycap--glass { left: 42px; top: 42px; width: 66px; height: 66px; color: #fff; background: linear-gradient(145deg, rgba(255, 255, 255, .36), rgba(255, 255, 255, .14)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55), 0 12px 24px -10px rgba(0, 30, 90, .45); }
.cta-band-title { position: relative; flex: 1; min-width: 0; font-size: 30px; font-weight: 700; line-height: 1.35; }
.cta-band .store-btn { position: relative; background: #fff; color: var(--blue-ink); }
.cta-band .store-btn:hover { background: var(--blue-wash); }

/* Help center */
.help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.help-card { position: relative; display: flex; flex-direction: column; min-height: 168px; padding: 24px 24px 22px; border-radius: 24px; background: var(--surface); transition: transform .45s var(--snappy), background-color .3s, box-shadow .4s var(--ease); }
.help-card:hover { transform: translateY(-3px); background: #fff; box-shadow: 0 0 0 .5px rgba(10, 20, 38, .07), 0 22px 40px -24px rgba(var(--shadow), .35); }
.help-n { font: 600 13px/1 var(--mono); color: var(--blue-ink); }
.help-card h2 { margin-top: 14px; font-size: 19px; font-weight: 700; }
.help-card p { margin-top: 6px; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
.help-card .i { position: absolute; right: 22px; top: 22px; width: 18px; height: 18px; color: var(--ink-3); transition: transform .35s var(--snappy), color .2s; }
.help-card:hover .i { transform: translateX(3px); color: var(--blue-ink); }
.help-contact { padding-block: 36px clamp(72px, 8vw, 112px); color: var(--ink-2); font-size: 15px; }
.help-contact a { margin-left: 4px; color: var(--blue-ink); font-weight: 600; }

/* Articles */
.doc-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr) 200px; gap: 56px; align-items: start; padding-block: 52px 96px; }
.doc-layout.doc-layout--plain { grid-template-columns: minmax(0, 760px); justify-content: center; }
.doc-nav { position: sticky; top: calc(var(--head) + 28px); display: grid; gap: 2px; font-size: 15px; }
.doc-nav a { padding: 8px 12px; border-radius: 10px; line-height: 1.45; color: var(--ink-2); transition: background-color .2s, color .2s; }
.doc-nav a:hover { color: var(--ink); background: var(--surface); }
.doc-nav a[aria-current] { background: var(--blue-wash); color: var(--blue-ink); font-weight: 650; }
.doc-nav-home { margin-bottom: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; color: var(--ink-2) !important; background: none !important; }
.doc-main { min-width: 0; max-width: 760px; }
.doc-title { margin-bottom: 26px; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.3; font-weight: 700; }
.doc-toc { position: sticky; top: calc(var(--head) + 28px); font-size: 14px; }
.doc-toc h2 { margin-bottom: 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; color: var(--ink-2); }
.doc-toc ol { border-left: 1.5px solid var(--line); }
.doc-toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1.5px; border-left: 1.5px solid transparent; line-height: 1.45; color: var(--ink-2); transition: color .2s, border-color .2s; }
.doc-toc a:hover { color: var(--ink); }
.doc-toc a.is-active { color: var(--blue-ink); border-color: var(--blue); font-weight: 600; }
.doc-next { display: flex; flex-direction: column; gap: 4px; margin-top: 56px; padding: 22px 24px; border-radius: 22px; background: var(--surface); position: relative; transition: background-color .3s; }
.doc-next:hover { background: var(--blue-wash); }
.doc-next small { font-size: 13px; color: var(--ink-2); }
.doc-next b { font-size: 18px; font-weight: 700; }
.doc-next .i { position: absolute; right: 22px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--blue-ink); }

.prose { font-size: 17px; line-height: 1.9; color: var(--ink); overflow-wrap: break-word; }
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3 { line-height: 1.4; scroll-margin-top: calc(var(--head) + 24px); }
.prose h2 { margin-top: 2em; font-size: 25px; font-weight: 700; }
.prose h3 { margin-top: 1.7em; font-size: 20px; font-weight: 700; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose li { color: #2b3446; }
.prose a { color: var(--blue-ink); text-decoration: underline; text-decoration-color: rgba(0, 102, 221, .3); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--blue); }
.prose strong { font-weight: 700; color: var(--ink); }
.prose code { font: .88em/1.5 var(--mono); padding: .12em .42em; border-radius: 7px; background: var(--surface); color: var(--blue-deep); }
.prose pre { position: relative; margin: 1.3em 0; padding: 18px 20px; border-radius: 16px; background: #0f1a2e; color: #e8eef9; overflow: auto; font: 14px/1.7 var(--mono); }
.prose pre code { padding: 0; background: none; color: inherit; font: inherit; }
.copy-code { position: absolute; top: 10px; right: 10px; padding: 5px 11px; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .12); color: #e8eef9; font-size: 12px; cursor: pointer; transition: background-color .2s; }
.copy-code:hover { background: rgba(255, 255, 255, .22); }
.table-wrap { overflow-x: auto; margin: 1.3em 0; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
.prose th, .prose td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.prose th { background: var(--surface); font-weight: 650; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }

/* 404 */
.not-found { display: grid; justify-items: center; text-align: center; padding: clamp(80px, 12vw, 160px) 20px; }
.keycaps--small { width: 120px; height: 120px; margin-bottom: 36px; }
.keycaps--small .keycap { font-size: 38px; }
.keycaps--small .keycap--solid { width: 76px; height: 76px; }
.keycaps--small .keycap--glass { left: 44px; top: 44px; width: 72px; height: 72px; }
.not-found .lead { margin-top: 16px; }
.not-found-links { display: flex; align-items: center; gap: 24px; margin-top: 32px; }
.not-found-langs { display: flex; gap: 18px; margin-top: 40px; font-size: 14px; color: var(--ink-2); }

@media (max-width: 1100px) {
  .page-hero--scene .wrap, .scene-body { width: calc(100% - 64px); }
  .related-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 44px; }
  .doc-toc { display: none; }
  .help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); padding-block: 32px 80px; }
  .doc-nav { display: none; }
  .scenes-grid, .examples, .scene-two { grid-template-columns: minmax(0, 1fr); }
  .how { grid-template-columns: minmax(0, 1fr); }
  .related-list { grid-template-columns: minmax(0, 1fr); }
  .cta-band-inner { flex-direction: column; align-items: flex-start; gap: 22px; padding: 30px 26px; }
  .cta-band-keys { width: 92px; height: 92px; }
  .cta-band-keys .keycap { font-size: 28px; }
  .cta-band-keys .keycap--solid { width: 58px; height: 58px; }
  .cta-band-keys .keycap--glass { left: 34px; top: 34px; width: 54px; height: 54px; }
}
@media (max-width: 600px) {
  .page-hero--scene .wrap, .scene-body { width: calc(100% - 40px); }
  .help-grid { grid-template-columns: minmax(0, 1fr); }
  .help-card { min-height: 0; }
  .scene-tile { padding: 24px 22px 22px; }
  .ex { min-height: 118px; padding: 16px; }
  .ex-out { font-size: 23px; }
  .ex-key--solid { min-width: 0; max-width: 58%; }
  .ex-key--glass { margin-left: -18px; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 22px; }
  .prose pre { font-size: 13px; padding: 14px 16px; }
  .prose th { white-space: normal; }
  .prose th, .prose td { padding: 10px 12px; }
  .cta-band-title { font-size: 24px; }
}
