/* =============================================
   Ver.1377 - PC home work thumbnail layout parity
   - Match public work-list thumbnail-first placement on PC.
   - Remove per-work outer card frames on home latest/recommended works.
   - Keep mobile carousel/mobile one-column policies untouched.
   - References: MDN grid-template-columns, aspect-ratio, object-fit.
   ============================================= */

body.page-home{
  --home-pc-work-thumb-ratio: 320 / 216;
}

@media (min-width: 761px){
  html body.page-home .home .home-card--latest .home-workgrid,
  html body.page-home .home .home-card--recommended .home-workgrid{
    display:grid !important;
    grid-auto-rows:auto !important;
    align-items:start !important;
    gap:clamp(18px, 2vw, 24px) clamp(18px, 2.2vw, 28px) !important;
  }

  html body.page-home .home .home-workgrid > .home-worktile{
    display:flex !important;
    flex-direction:column !important;
    min-width:0 !important;
    min-height:0 !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    background-color:transparent !important;
    box-shadow:none !important;
    overflow:visible !important;
    transform:none !important;
  }

  html body.page-home .home .home-workgrid > .home-worktile:hover,
  html body.page-home .home .home-workgrid > .home-worktile:focus-visible{
    border:0 !important;
    background:transparent !important;
    box-shadow:none !important;
  }

  html body.page-home .home .home-workgrid > .home-worktile > .home-worktile__img,
  html body.page-home .home .home-workgrid > .home-worktile > .home-worktile__img.is-wd-matte-trimmed,
  html body.page-home .home .home-workgrid > .home-worktile > .home-worktile__img[data-wd-smart-trim-mode]{
    display:block !important;
    position:relative !important;
    width:100% !important;
    inline-size:100% !important;
    height:auto !important;
    block-size:auto !important;
    aspect-ratio:var(--home-pc-work-thumb-ratio) !important;
    min-height:0 !important;
    padding:0 !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    background-color:transparent !important;
    box-shadow:none !important;
    overflow:hidden !important;
    line-height:0 !important;
  }

  html body.page-home .home .home-workgrid > .home-worktile > .home-worktile__img > img,
  html body.page-home .home .home-workgrid > .home-worktile > .home-worktile__img > img.is-wd-matte-trimmed-img,
  html body.page-home .home .home-workgrid > .home-worktile > .home-worktile__img[data-wd-smart-trim-mode] > img{
    display:block !important;
    position:static !important;
    inset:auto !important;
    width:100% !important;
    inline-size:100% !important;
    height:100% !important;
    block-size:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    max-width:100% !important;
    max-height:100% !important;
    transform:none !important;
    object-fit:cover !important;
    object-position:center top !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    background-color:transparent !important;
    box-shadow:none !important;
  }

  html body.page-home .home .home-workgrid > .home-worktile > .home-worktile__info{
    padding:8px 0 0 !important;
    gap:4px !important;
    min-height:0 !important;
    background:transparent !important;
    background-color:transparent !important;
  }

  html body.page-home .home .home-workgrid > .home-worktile .home-worktile__code{
    display:block !important;
    text-align:left !important;
    color:color-mix(in oklab, var(--accent) 78%, #93c5fd 22%) !important;
    font-size:clamp(.84rem, .82rem + .12vw, .96rem) !important;
    font-weight:900 !important;
    line-height:1.18 !important;
    letter-spacing:.01em !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }

  html body.page-home .home .home-workgrid > .home-worktile .home-worktile__title{
    display:-webkit-box !important;
    min-height:2.45em !important;
    margin:0 !important;
    color:var(--text) !important;
    font-size:clamp(.82rem, .80rem + .10vw, .93rem) !important;
    font-weight:800 !important;
    line-height:1.25 !important;
    -webkit-line-clamp:2 !important;
    -webkit-box-orient:vertical !important;
    overflow:hidden !important;
  }
}

@media (min-width:1101px){
  html body.page-home .home .home-card--latest .home-workgrid,
  html body.page-home .home .home-card--recommended .home-workgrid{
    grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (min-width:761px) and (max-width:1100px){
  html body.page-home .home .home-card--latest .home-workgrid,
  html body.page-home .home .home-card--recommended .home-workgrid{
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  }
}
