/* 홈 전용 화면 크기·입력 방식 대응 */
@media (min-width: 1180px) and (pointer: fine) {
  .home-page {
    scroll-snap-type: y proximity;
  }

  .home-scene {
    scroll-snap-align: start;
  }
}

@media (min-width: 1180px) {
  .recent-scene .scene-shell {
    width: min(calc(100% - 96px), 1440px);
    padding-left: clamp(0px, calc((100vw - 1180px) / 9), 80px);
  }

  .recent-scene .split-scene {
    grid-template-columns: minmax(410px, 580px) minmax(440px, 560px);
    justify-content: space-between;
    gap: clamp(36px, 4vw, 80px);
  }

  .recent-scene .scene-copy {
    max-width: 580px;
  }

  .recent-scene .scene-copy h2 {
    font-size: clamp(3rem, 3.65vw, 4.25rem);
    white-space: nowrap;
  }

  .recent-scene .latest-posts-panel {
    width: min(100%, 560px);
    justify-self: end;
  }

  .recent-scene .latest-posts-panel.is-static {
    gap: 8px;
    padding-block: 24px;
  }

  /* 데스크톱 장면 메뉴 예약 폭의 절반만큼 이동해 화면 중심축에 맞춥니다. */
  .roles-scene .dual-role-rail,
  .roles-scene .role-support {
    left: calc(var(--rail-safe) / 2);
  }

  .roles-scene .role-support {
    position: relative;
  }

  .journey-scene .scene-shell,
  .location-scene .scene-shell,
  .ledger-scene .scene-shell,
  .app-scene .scene-shell {
    width: min(calc(100% - 96px), 1440px);
  }

  .journey-layout,
  .location-layout,
  .ledger-scene .ledger-layout,
  .app-layout {
    grid-template-columns: minmax(410px, 1fr) minmax(440px, 620px);
    justify-content: space-between;
    gap: clamp(32px, 3.5vw, 64px);
  }

  .journey-scene .scene-copy,
  .location-scene .scene-copy,
  .ledger-scene .scene-copy,
  .app-scene .scene-copy {
    max-width: 620px;
  }

  .journey-scene .scene-copy h2,
  .location-scene .scene-copy h2,
  .app-scene .scene-copy h2 {
    font-size: clamp(2.5rem, 3.2vw, 3.4rem);
    white-space: nowrap;
  }

  .ledger-scene .scene-copy h2 {
    font-size: clamp(2.1rem, 2.9vw, 3rem);
    white-space: nowrap;
  }

  .journey-board {
    width: min(100%, 620px);
    justify-self: end;
  }

  .location-scene .location-grid {
    width: min(100%, 560px);
    justify-self: end;
  }

  .ledger-scene .evidence-ledger {
    width: min(100%, 540px);
    justify-self: end;
  }

  .store-board {
    width: min(100%, 560px);
    justify-self: end;
  }
}

@media (min-width: 1180px) and (max-height: 820px) {
  .journey-scene .scene-shell,
  .ledger-scene .scene-shell {
    padding-block: 20px;
  }
}

@media (min-width: 761px) {
  .home-footer-scene {
    padding-top: 0;
  }

  .footer-scene-intro {
    padding-top: 38px;
    padding-bottom: 31px;
  }

  .home-footer-scene footer.site {
    padding: 44px 0 22px;
  }

  .home-footer-scene footer.site .top {
    padding-bottom: 30px;
  }

  .home-footer-scene footer.site .legal {
    padding-top: 20px;
  }
}

@media (max-width: 1179px) {
  :root {
    --rail-safe: 0px;
    --bottom-nav: 68px;
  }

  .ledger-scene .scene-media {
    bottom: auto;
    height: clamp(660px, 82svh, 820px);
    mask-image: linear-gradient(180deg, black 0 72%, transparent 100%);
  }

  .ledger-scene .scene-media img {
    object-fit: cover;
    object-position: center;
  }

  .ledger-scene .evidence-ledger { background: rgb(10 11 14 / 62%); }

  .scene-rail {
    display: none;
  }

  .scene-nav-mobile {
    position: fixed;
    z-index: 95;
    right: 16px;
    bottom: 14px;
    left: 16px;
    display: block;
    border: 1px solid rgb(255 255 255 / 12%);
    border-radius: 15px;
    background: rgb(10 11 14 / 92%);
    box-shadow: 0 16px 44px rgb(0 0 0 / 34%);
    backdrop-filter: blur(18px);
  }

  .scene-nav-mobile summary {
    min-height: 54px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    color: var(--white);
    font-size: 12px;
    cursor: pointer;
    list-style: none;
  }

  .scene-nav-mobile summary::-webkit-details-marker {
    display: none;
  }

  .scene-nav-mobile summary > span:first-child {
    color: var(--night-subtle);
    letter-spacing: 0.1em;
  }

  .scene-nav-mobile summary > span:last-child {
    color: #71a9ff;
    font-size: 19px;
    transition: transform 180ms ease;
  }

  .scene-nav-mobile[open] summary > span:last-child {
    transform: rotate(45deg);
  }

  .scene-nav-mobile nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 6px 12px 14px;
    border-top: 1px solid rgb(255 255 255 / 9%);
  }

  .scene-nav-mobile nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 8px;
    color: var(--night-muted);
    font-size: 12px;
    text-decoration: none;
  }

  .scene-nav-mobile nav a[aria-current] {
    background: rgb(30 111 239 / 16%);
    color: var(--white);
  }

  .home-page main,
  .home-footer-scene {
    padding-bottom: var(--bottom-nav);
  }

  .scene-nav-mobile-spacer {
    display: block;
    height: calc(var(--bottom-nav) + 24px);
  }

  .home-page .scene-shell {
    padding-bottom: calc(var(--bottom-nav) + 52px);
  }

  .scene-shell {
    width: min(calc(100% - 48px), 980px);
  }

  .split-scene,
  .journey-layout,
  .ledger-scene .ledger-layout,
  .app-layout {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .scene-copy {
    max-width: 780px;
  }

  .hero-scope {
    right: 0;
  }

  .recent-scene .latest-posts-panel,
  .journey-board,
  .location-scene .location-grid,
  .ledger-scene .evidence-ledger,
  .store-board {
    width: 100%;
    max-width: 820px;
  }
}

@media (min-width: 761px) and (max-width: 1279px) {
  .journey-board .journey-timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 0;
  }

  .journey-board .journey-timeline .timeline-step {
    border-top: 1px solid rgb(255 255 255 / 10%);
  }

  .journey-board .journey-timeline .timeline-step:nth-child(3n) {
    border-right: 0;
  }
}

@media (max-width: 760px) {
  .home-scene {
    overflow: hidden;
  }

  .scene-shell {
    width: min(calc(100% - 36px), 680px);
    padding-block: calc(var(--site-header-height) + 42px) calc(var(--bottom-nav) + 64px);
  }

  .hero-shell {
    align-content: end;
    padding-top: calc(var(--site-header-height) + 90px);
    padding-bottom: calc(var(--bottom-nav) + 64px);
  }

  .scene-media img {
    object-position: 52% center;
  }

  .home-hero .scene-media img {
    object-position: 56% center;
  }

  .roles-scene .scene-media img {
    object-position: 58% center;
  }

  .journey-scene .scene-media img {
    object-position: 52% center;
    filter: saturate(0.76) contrast(1.04) brightness(0.74);
  }

  .ledger-scene .scene-media img {
    object-position: center;
    filter: saturate(0.72) contrast(1.06) brightness(0.62);
  }

  .location-scene .scene-media img {
    object-position: 53% center;
  }

  .app-scene .scene-media img {
    object-position: 57% center;
  }

  .recent-scene .scene-media img {
    object-position: center;
    filter: saturate(0.8) contrast(1.04) brightness(0.68);
  }

  .scene-scrim,
  .roles-scene .scene-scrim,
  .location-scene .scene-scrim,
  .app-scene .scene-scrim {
    background:
      linear-gradient(0deg, rgb(6 7 10 / 96%) 0%, rgb(6 7 10 / 70%) 58%, rgb(6 7 10 / 40%) 100%),
      linear-gradient(90deg, rgb(6 7 10 / 68%), rgb(6 7 10 / 32%));
  }

  .ledger-scene .scene-scrim {
    background:
      linear-gradient(0deg, rgb(6 7 10 / 94%) 0%, rgb(6 7 10 / 63%) 62%, rgb(6 7 10 / 42%) 100%),
      linear-gradient(90deg, rgb(6 13 23 / 68%), rgb(6 7 10 / 42%));
  }

  .recent-scene .scene-scrim {
    background:
      linear-gradient(0deg, rgb(5 14 24 / 97%) 0%, rgb(5 14 24 / 84%) 52%, rgb(5 14 24 / 62%) 100%),
      linear-gradient(90deg, rgb(5 14 24 / 72%), rgb(5 14 24 / 42%));
  }

  .journey-scene .scene-scrim {
    background:
      linear-gradient(0deg, rgb(6 7 10 / 90%) 0%, rgb(6 7 10 / 58%) 58%, rgb(6 7 10 / 30%) 100%),
      linear-gradient(90deg, rgb(6 7 10 / 52%), rgb(6 7 10 / 22%));
  }

  .grid-field {
    background-size: 40px 40px;
    mask-image: linear-gradient(180deg, black, rgb(0 0 0 / 40%));
  }

  .recent-scene .grid-field {
    opacity: 0.12;
  }

  .journey-scene .grid-field {
    opacity: 0.08;
  }

  .scene-kicker {
    margin-bottom: 18px;
    font-size: 10px;
    letter-spacing: 0.11em;
  }

  .location-copy > p.scene-kicker,
  .ledger-copy > p.scene-kicker {
    font-size: 10px;
  }

  .scene-copy h2,
  .footer-scene-intro h2 {
    margin-bottom: 21px;
    font-size: clamp(2.35rem, 11vw, 3.7rem);
  }

  .journey-scene .scene-copy h2 {
    font-size: clamp(1.625rem, 8.2vw, 2rem);
    white-space: nowrap;
  }

  .ledger-scene .scene-copy h2,
  .app-scene .scene-copy h2 {
    font-size: clamp(1.65rem, 8vw, 2rem);
    white-space: nowrap;
  }

  .hero-copy h1 {
    font-size: clamp(3.15rem, 14vw, 5.4rem);
  }

  .hero-scope {
    position: static;
    max-width: 520px;
    margin-top: 28px;
    text-align: left;
  }

  .recent-scene .latest-posts-panel {
    min-height: 0;
    padding: 24px 18px;
  }

  .roles-shell {
    gap: 26px;
  }

  .roles-scene .dual-role-rail {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .roles-scene .dual-role-rail::before,
  .roles-scene .dual-role-rail::after {
    display: none;
  }

  .roles-scene .role-lane {
    min-height: 0;
    border-radius: 16px;
  }

  .roles-scene .agreement-node {
    width: 92px;
    height: 92px;
    margin: -8px auto;
    box-shadow: 0 0 0 8px rgb(10 11 14 / 76%);
  }

  .role-support,
  .roles-scene .saved-signals {
    grid-template-columns: 1fr;
  }

  .roles-scene .saved-signals > div + div {
    padding-left: 0;
    border-left: 0;
  }

  .roles-scene .saved-signals > div {
    grid-template-columns: 28px auto 1fr;
  }

  .proposal-preview[open] {
    grid-column: auto;
  }

  .journey-board {
    padding: 26px 20px;
  }

  .journey-board .journey-timeline {
    grid-template-columns: 1fr 1fr;
  }

  .journey-board .journey-timeline .timeline-step {
    min-height: 172px;
    padding: 24px 16px 16px;
    border-bottom: 1px solid rgb(255 255 255 / 10%);
  }

  .journey-board .journey-timeline .timeline-step:nth-child(2n) {
    border-right: 0;
  }

  .location-scene .location-grid {
    min-height: 290px;
    grid-template-columns: 1fr 24px 1fr;
    gap: 10px;
    padding: 28px 18px;
  }

  .location-scene .public-grid {
    grid-template-columns: repeat(3, 34px);
    grid-template-rows: repeat(3, 34px);
  }

  .ledger-scene .evidence-ledger,
  .store-board {
    padding: 24px 18px;
  }

  .ledger-flow {
    gap: 7px;
  }

  .ledger-flow span {
    min-height: 54px;
    font-size: 11px;
  }

  .ledger-scene .evidence-ledger li {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
  }

  .ledger-scene .evidence-ledger li > a {
    grid-column: 2;
    justify-self: start;
  }

  .ledger-source {
    grid-column: 2;
    justify-self: start;
  }

  .store-board > div {
    padding-inline: 14px;
  }

  .home-footer-scene {
    padding-top: calc(var(--site-header-height) + 70px);
    padding-bottom: var(--bottom-nav);
  }

  .footer-scene-intro {
    padding-bottom: 60px;
  }
}

@media (max-height: 720px) and (min-width: 761px) {
  .scene-shell {
    padding-block: 88px 64px;
  }

  .hero-shell {
    padding-top: calc(var(--site-header-height) + 70px);
    padding-bottom: 64px;
  }

  .scene-copy h2 {
    font-size: clamp(2.4rem, 4.2vw, 4rem);
  }
}

@media (max-width: 760px) and (max-height: 640px) {
  .home-page {
    scroll-padding-bottom: calc(var(--bottom-nav) + 24px);
  }

  .home-scene {
    scroll-margin-bottom: calc(var(--bottom-nav) + 24px);
  }

  .home-hero .hero-shell {
    align-content: end;
    padding-top: calc(var(--site-header-height) + 90px);
    padding-bottom: calc(var(--bottom-nav) + 64px);
  }

  .home-hero .scene-kicker {
    margin-bottom: 10px;
  }

  .home-hero .hero-copy h1 {
    margin-bottom: 14px;
    font-size: clamp(2.7rem, 13vw, 4.8rem);
  }

  .home-hero .hero-promise {
    margin-bottom: 14px;
    line-height: 1.5;
  }

  .home-hero .actions {
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .home-hero .actions .btn {
    width: auto;
    flex: 1 1 auto;
    padding-inline: 12px;
  }

  .home-hero .actions .text-link {
    flex: 0 0 auto;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page {
    scroll-snap-type: none;
  }
}
