/*
 * PLai public-site mobile quality layer
 * Applies after page-local styles. The sitemap is the release scope.
 */

@media (max-width: 860px) {
  :root {
    --pl-mobile-gutter: clamp(20px, 5.65vw, 26px);
    --pl-mobile-header-edge: max(14px, env(safe-area-inset-left));
    --pl-mobile-section: clamp(64px, 17vw, 88px);
    --pl-mobile-radius: 20px;
  }

  /* Presentation decks: keep both navigation buttons reachable on narrow phones. */
  .deck-nav {
    width: calc(100% - 24px) !important;
    max-width: 420px !important;
    box-sizing: border-box !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    gap: 6px !important;
    padding: 8px 10px !important;
  }

  .deck-nav button {
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px !important;
  }

  .deck-nav .deck-nav__count {
    min-width: 48px !important;
    font-size: 12px !important;
  }

  .deck-nav .deck-nav__progress {
    width: auto !important;
    min-width: 28px !important;
    flex: 1 1 auto !important;
  }

  .pl-deck-mobile-tools {
    position: fixed;
    z-index: 18;
    left: 50%;
    bottom: max(86px, calc(env(safe-area-inset-bottom) + 78px));
    width: min(330px, calc(100% - 40px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 13px 12px 16px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 16px;
    background: rgba(35,34,58,.9);
    color: #fff;
    box-shadow: 0 14px 40px rgba(0,0,0,.3);
    backdrop-filter: blur(12px);
  }

  .pl-deck-mobile-tools strong {
    font-size: 11px;
    line-height: 1.55;
    letter-spacing: .02em;
  }

  .pl-deck-mobile-tools button {
    min-width: 96px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 999px;
    background: #7b6ce0;
    color: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
  }

  .pl-deck-mobile-tools.show-fallback strong::after {
    content: '（端末を横向きにしてピンチ拡大してください）';
    display: block;
    margin-top: 3px;
    color: #d8d3ff;
  }

  html {
    max-width: 100%;
    scroll-padding-top: 92px;
  }

  body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip !important;
    -webkit-text-size-adjust: 100%;
  }

  body * {
    min-width: 0;
  }

  img,
  picture,
  video,
  canvas,
  svg,
  iframe {
    max-width: 100%;
  }

  h1,
  h2,
  h3,
  h4,
  p,
  li,
  td,
  th,
  a {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  /* Mobile touch targets: preserve the visual style while making controls easy to tap. */
  summary {
    min-height: 44px !important;
    box-sizing: border-box !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  select,
  input[type="button"],
  input[type="submit"] {
    min-height: 44px !important;
  }

  /* Shared subpage header */
  .pl-chrome {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 78px !important;
    padding: 0 var(--pl-mobile-header-edge) !important;
    border-bottom: 1px solid rgba(111, 91, 180, .12) !important;
    background: rgba(250, 249, 255, .92) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.2) !important;
    backdrop-filter: blur(16px) saturate(1.2) !important;
    box-shadow: 0 6px 24px rgba(43, 31, 88, .06) !important;
  }

  .pl-chrome-logo {
    position: absolute !important;
    top: 17px !important;
    left: var(--pl-mobile-header-edge) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 60px !important;
    height: 44px !important;
    overflow: hidden !important;
  }

  .pl-chrome-logo img {
    flex: 0 0 auto !important;
    width: 164px !important;
    max-width: none !important;
    height: 92px !important;
    object-fit: contain !important;
  }

  .pl-chrome-pill {
    display: none !important;
  }

  .pl-chrome-cta {
    position: absolute !important;
    top: 16px !important;
    right: max(14px, env(safe-area-inset-right)) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 46px !important;
    padding: 0 22px !important;
    font-size: 13px !important;
    letter-spacing: .04em !important;
    box-shadow: 0 8px 22px rgba(123, 108, 224, .24) !important;
  }

  /* Shared reading width */
  .mw {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding-right: var(--pl-mobile-gutter) !important;
    padding-left: var(--pl-mobile-gutter) !important;
  }

  /* Media index and category pages */
  .md-head {
    padding-top: 118px !important;
    padding-bottom: 30px !important;
  }

  .md-head h1 {
    font-size: clamp(34px, 10vw, 44px) !important;
    line-height: 1.16 !important;
    letter-spacing: .08em !important;
  }

  .md-head p.desc {
    margin-top: 18px !important;
    font-size: 14px !important;
    line-height: 1.95 !important;
  }

  .md-crumb {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
    line-height: 1.75 !important;
  }

  .md-tools {
    margin: 26px 0 44px !important;
    padding: 18px !important;
    border-radius: 18px !important;
  }

  .md-search input,
  .md-search button,
  .md-tabs a,
  .md-cats a {
    min-height: 44px !important;
  }

  .md-tabs {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: wrap !important;
    gap: 9px !important;
    overflow-x: visible !important;
    white-space: normal !important;
  }

  .md-tabs a,
  .md-cats a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
    padding: 9px 16px !important;
  }

  .md-cats {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    white-space: normal !important;
  }

  .md-tools,
  .md-search,
  .md-hero,
  .md-feat,
  .md-latest,
  .md-rank,
  .md-topic,
  .md-grid,
  .md-card,
  .md-lrow,
  .md-rrow {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .md-feat .shot,
  .md-card > img {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 3 / 2 !important;
    object-fit: cover !important;
  }

  .md-hero {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 38px !important;
    margin-bottom: 70px !important;
  }

  .md-feat h2 {
    margin-top: 18px !important;
    font-size: 21px !important;
    line-height: 1.65 !important;
  }

  .md-lrow {
    gap: 14px !important;
    padding: 15px 0 !important;
  }

  .md-lrow img {
    width: 96px !important;
  }

  .md-sec-title {
    font-size: 27px !important;
    line-height: 1.35 !important;
    letter-spacing: .1em !important;
  }

  .md-rank {
    margin-bottom: 72px !important;
    padding: 12px 18px !important;
    border-radius: 20px !important;
  }

  .md-rrow {
    align-items: flex-start !important;
    gap: 13px !important;
    padding: 17px 0 !important;
  }

  .md-rrow img {
    width: 94px !important;
  }

  .md-rrow .t {
    margin-top: 0 !important;
    font-size: 13px !important;
    line-height: 1.7 !important;
  }

  .md-topic {
    margin-bottom: 72px !important;
  }

  .md-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px !important;
  }

  .md-card {
    width: 100% !important;
    border-radius: 18px !important;
  }

  .md-card .in {
    padding: 17px 18px 19px !important;
  }

  .md-card .t {
    font-size: 15px !important;
    line-height: 1.75 !important;
  }

  .md-cta {
    margin-bottom: 76px !important;
    padding: 42px 22px !important;
    border-radius: 22px !important;
  }

  .md-cta p {
    line-height: 1.9 !important;
  }

  /* Article header and body */
  .art-head {
    padding-top: 112px !important;
  }

  .art-head h1 {
    width: 100% !important;
    margin: 12px 0 18px !important;
    font-size: clamp(25px, 7.2vw, 31px) !important;
    line-height: 1.52 !important;
    letter-spacing: -.02em !important;
    text-wrap: pretty;
  }

  .art-head .meta {
    gap: 8px 15px !important;
    line-height: 1.75 !important;
  }

  .art-samecat {
    margin-top: 24px !important;
    padding: 17px 18px !important;
    border-radius: 16px !important;
  }

  .art-samecat a {
    padding: 6px 0 !important;
    line-height: 1.75 !important;
  }

  .art-eyecatch {
    width: 100% !important;
    margin: 30px 0 16px !important;
    border-radius: 18px !important;
    box-shadow: 0 14px 38px rgba(60, 40, 120, .14) !important;
  }

  .art-layout {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 30px var(--pl-mobile-gutter) 80px !important;
  }

  .art-body {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    font-size: 16px !important;
    line-height: 2.02 !important;
    letter-spacing: .008em !important;
  }

  .art-body > p,
  .art-body > ul,
  .art-body > ol {
    margin-top: 1.35em !important;
    margin-bottom: 1.35em !important;
  }

  .art-body h2 {
    width: 100% !important;
    margin: 54px 0 20px !important;
    padding: 16px 17px !important;
    font-size: clamp(20px, 5.7vw, 25px) !important;
    line-height: 1.6 !important;
    border-left-width: 4px !important;
    border-radius: 12px !important;
    scroll-margin-top: 96px !important;
  }

  .art-body h3 {
    margin: 40px 0 16px !important;
    padding-bottom: 10px !important;
    font-size: 18px !important;
    line-height: 1.65 !important;
    scroll-margin-top: 96px !important;
  }

  .art-body h4 {
    margin: 30px 0 12px !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
  }

  .art-body ul,
  .art-body ol {
    max-width: 100% !important;
    padding-left: 1.35em !important;
  }

  .art-body li {
    margin: 10px 0 !important;
    padding-left: .12em !important;
  }

  .art-toc {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 8px 0 40px !important;
    padding: 21px 19px !important;
    overflow: hidden !important;
    border: 1px solid rgba(123, 108, 224, .1) !important;
    border-radius: 18px !important;
  }

  .art-toc .h {
    margin-bottom: 13px !important;
    letter-spacing: .18em !important;
  }

  .art-toc ol {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 1.35em !important;
    font-size: 13.5px !important;
    line-height: 1.85 !important;
  }

  .art-toc ol ol {
    margin-top: 6px !important;
    padding-left: 1.15em !important;
  }

  .art-toc li {
    max-width: 100% !important;
    margin: 8px 0 !important;
  }

  .art-body .lead-box {
    margin-bottom: 32px !important;
    padding: 19px 18px !important;
    font-size: 14.5px !important;
    line-height: 1.95 !important;
  }

  .art-body blockquote {
    max-width: 100% !important;
    margin: 22px 0 !important;
    padding: 17px 18px !important;
    font-size: 14px !important;
    line-height: 1.9 !important;
  }

  .art-body table,
  .art-body .table-wrap {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overscroll-behavior-x: contain !important;
    -webkit-overflow-scrolling: touch;
  }

  .pl-mobile-table-region {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 24px 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    box-shadow: inset -18px 0 18px -18px rgba(54,42,120,.6);
  }

  .pl-mobile-table-region .art-body table,
  .pl-mobile-table-region table {
    width: max-content !important;
    min-width: 100% !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  .pl-mobile-table-hint {
    position: sticky;
    left: 0;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    margin: 0 0 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ede9ff;
    color: #5947c7;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
    transition: opacity .2s ease;
  }

  .pl-mobile-table-region.has-scrolled .pl-mobile-table-hint {
    opacity: .35;
  }

  .yt-embed .pl-video-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    color: #fff;
    text-align: center;
    text-decoration: none;
    background:
      radial-gradient(circle at 22% 18%, rgba(123,108,224,.55), transparent 38%),
      linear-gradient(145deg, #141222, #050505 72%);
  }

  .yt-embed .pl-video-play {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    padding-left: 4px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #e60012;
    box-shadow: 0 10px 24px rgba(0,0,0,.32);
    font-size: 20px;
  }

  .yt-embed .pl-video-cover strong {
    font-size: 15px;
    line-height: 1.5;
  }

  .yt-embed .pl-video-cover small {
    color: #f7d100;
    font-size: 11px;
    font-weight: 800;
  }

  #agi-op .op-cue {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: calc(100% - 40px);
    min-height: 44px;
    padding: 0 18px;
    bottom: max(24px, env(safe-area-inset-bottom)) !important;
    border: 1px solid rgba(104,86,215,.2);
    border-radius: 999px;
    background: rgba(255,255,255,.88);
    color: #332763 !important;
    box-shadow: 0 8px 28px rgba(51,39,99,.12);
    font-size: 12px !important;
    letter-spacing: .08em !important;
  }

  .art-body table {
    margin: 24px 0 !important;
    font-size: 13px !important;
  }

  .art-body th,
  .art-body td {
    min-width: 110px !important;
    padding: 11px 12px !important;
    line-height: 1.75 !important;
  }

  .art-body pre {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 24px 0 !important;
    padding: 18px !important;
    overflow-x: auto !important;
    font-size: 12.5px !important;
    line-height: 1.75 !important;
    white-space: pre !important;
    overscroll-behavior-x: contain !important;
  }

  .art-body :not(pre) > code {
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  .art-body figure,
  .art-body img,
  .art-body video,
  .art-body iframe {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .art-ctaband {
    margin-top: 60px !important;
    padding: 34px 20px !important;
    border-radius: 20px !important;
  }

  .art-ctaband p {
    line-height: 1.9 !important;
  }

  .art-ctaband a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 48px !important;
    margin: 8px 0 0 !important;
    padding: 10px 18px !important;
  }

  .art-author {
    align-items: flex-start !important;
    gap: 14px !important;
    margin-top: 48px !important;
    padding: 18px !important;
  }

  .art-author img {
    flex: 0 0 58px !important;
    width: 58px !important;
    height: 58px !important;
  }

  .art-related {
    margin-top: 52px !important;
  }

  .art-side {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    margin-top: 64px !important;
    padding-right: 0 !important;
    overflow: visible !important;
  }

  .art-side .box {
    padding: 18px !important;
  }

  .lm-band {
    max-width: 100% !important;
    margin: 44px 0 !important;
    padding: 23px 19px !important;
    overflow: hidden !important;
  }

  .lm-head {
    flex-direction: column !important;
    gap: 20px !important;
    text-align: left !important;
  }

  .lm-covers {
    width: 100% !important;
    max-width: 330px !important;
  }

  .lm-fields {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .lm-fields input[name="phone"] {
    grid-column: auto !important;
  }

  .lm-fields input,
  .lm-submit,
  .lm-row input,
  .lm-row button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
  }

  /* Corporate, business, works and flow pages */
  .pl-hero {
    width: 100% !important;
    max-width: 100% !important;
    padding: 120px var(--pl-mobile-gutter) 54px !important;
  }

  .pl-hero h1 {
    width: 100% !important;
    font-size: clamp(30px, 8.7vw, 40px) !important;
    line-height: 1.42 !important;
    text-wrap: pretty;
  }

  .pl-hero p.lead {
    margin-top: 22px !important;
    font-size: 15px !important;
    line-height: 2 !important;
  }

  .pl-hero > [style*="min-width"],
  .pl-section > [style*="min-width"],
  .fl-guar > [style*="min-width"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .pl-section {
    width: 100% !important;
    max-width: 100% !important;
    padding: var(--pl-mobile-section) var(--pl-mobile-gutter) !important;
  }

  .pl-section h2 {
    font-size: clamp(25px, 7.2vw, 34px) !important;
    line-height: 1.5 !important;
    text-wrap: pretty;
  }

  .pl-section h2 + p.sub {
    margin-top: 12px !important;
    margin-bottom: 34px !important;
    line-height: 1.95 !important;
  }

  .pl-grid,
  .pl-grid.c2,
  .pl-grid.c3,
  .pl-grid.c4,
  .pl-grid[style] {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 18px !important;
  }

  .pl-card,
  .pl-shot {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .pl-card {
    padding: 24px 22px !important;
    border-radius: 18px !important;
  }

  .pl-card h3 {
    font-size: 18px !important;
    line-height: 1.6 !important;
  }

  .pl-card p,
  .pl-shot figcaption {
    font-size: 14px !important;
    line-height: 1.9 !important;
  }

  .pl-shot img,
  .pl-shot video {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .pl-dark {
    width: auto !important;
    max-width: none !important;
    margin: 48px var(--pl-mobile-gutter) !important;
    padding: 44px 22px !important;
    border-radius: 22px !important;
  }

  .pl-dark p {
    line-height: 1.95 !important;
  }

  .pl-dark a.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 50px !important;
    padding: 10px 20px !important;
  }

  .pl-table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  .growth-graph {
    width: 100% !important;
    max-width: 100% !important;
    padding: 26px 20px !important;
  }

  .growth-graph__header,
  .growth-graph__highlight {
    gap: 14px !important;
  }

  .growth-graph__current {
    font-size: 32px !important;
  }

  .growth-graph__highlight {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .pl-flow .pl-card {
    padding: 62px 22px 24px !important;
  }

  .pl-flow .pl-card::before {
    top: 20px !important;
    left: 22px !important;
  }

  .fl-heroimg {
    overflow: clip !important;
  }

  /* The AGI CAMP page intentionally uses wide animated rails. Clip those
     decorations at their section boundary instead of the document boundary. */
  body.body-3 main,
  body.body-3 main > section,
  body.body-3 [class*="_section_"],
  body.body-3 [class*="_wrapper_"] {
    max-width: 100% !important;
    overflow-x: clip !important;
  }

  body.body-3 #agi-contents .acx-left,
  body.body-3 #agi-contents .acx-mac-wrap,
  body.body-3 #agi-mobile .apx-visual,
  body.body-3 #agi-corp .cx-unit {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* Shared footer */
  .pl-chrome-foot {
    padding: 54px var(--pl-mobile-gutter) 28px !important;
  }

  .pcf-top {
    flex-direction: column !important;
    gap: 30px !important;
  }

  .pcf-nav {
    width: 100% !important;
    gap: 4px 20px !important;
  }

  .pcf-nav a,
  .pcf-legal a {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 40px !important;
  }

  .pcf-copy {
    margin-top: 36px !important;
    line-height: 1.8 !important;
  }
}

@media (max-width: 359px) {
  :root {
    --pl-mobile-gutter: 18px;
  }

  .pl-chrome-cta {
    padding-right: 17px !important;
    padding-left: 17px !important;
    font-size: 12px !important;
  }

  .md-search {
    flex-direction: column !important;
  }

  .md-search button {
    min-height: 46px !important;
  }

  .md-lrow {
    display: grid !important;
    grid-template-columns: 82px minmax(0, 1fr) !important;
  }

  .md-rrow {
    display: grid !important;
    grid-template-columns: 26px 74px minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .md-rrow .no {
    display: block !important;
    width: 26px !important;
    font-size: 21px !important;
  }

  .md-lrow img {
    width: 82px !important;
  }

  .md-rrow img {
    width: 74px !important;
  }

  .art-body {
    font-size: 15.5px !important;
  }

  .art-author {
    display: block !important;
  }

  .art-author img {
    margin-bottom: 14px !important;
  }
}

@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
