/* 作品一覧ページ（works.html）。トップの配色・書体に合わせる。style.css の既存ルールは変更しない */
.works-page { background: var(--cream); }
.wl-header, .wl-footer { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 18px clamp(20px, 5vw, 56px); }
.wl-brand { font-size: 13px; letter-spacing: .27em; white-space: nowrap; }
.wl-brand b { font-size: 22px; letter-spacing: 0; }
.wl-header nav { display: flex; gap: 28px; }
.wl-header nav a { font-size: 13px; font-weight: 700; letter-spacing: .025em; }
.wl-footer { border-top: 1px solid #efdbd6; margin-top: 40px; }
.wl-footer .wl-brand { font-size: 10px; }
.wl-footer .wl-brand b { font-size: 16px; }

.wl { max-width: 1200px; margin: 0 auto; padding: 36px clamp(20px, 5vw, 56px) 40px; }
.wl-label { font-size: 15px; font-weight: 700; color: var(--accent); }
.wl h1 { margin-top: 10px; font-family: var(--heavy); font-size: clamp(34px, 5vw, 52px); line-height: 1; font-weight: 700; color: var(--heading); }
.wl-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.wl-tabs a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 20px; border: 1px solid var(--accent); border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--accent); transition: background .3s, color .3s; }
.wl-tabs a.is-current { background: var(--accent); color: var(--cream); }

.wl-grid { list-style: none; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 18px; }
.wl-grid a, .wl-open { display: block; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; }
.wl-open { cursor: zoom-in; }
.wl-grid figure { margin: 0; aspect-ratio: 206 / 172; border-radius: 8px; overflow: hidden; background: #f1e5ec; }
.wl-grid img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wl-grid .cat { margin-top: 12px; font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--accent); }
.wl-grid .ttl { margin-top: 4px; font: 500 14px/1.6 var(--jp); letter-spacing: .04em; color: var(--ink); }
.wl-grid .date { margin-top: 2px; font-size: 11px; letter-spacing: .08em; color: #8a7470; }
.wl-empty { margin-top: 40px; padding: 50px 20px; text-align: center; font: 500 14px/1.6 var(--jp); color: var(--accent); background: var(--pink); border-radius: 16px; }
.wl-back { margin-top: 56px; text-align: center; }
.wl-back a { display: inline-flex; align-items: center; gap: .5em; min-height: 46px; padding: 0 28px; border-radius: 999px; background: var(--accent); color: var(--cream); font-size: 14px; font-weight: 700; letter-spacing: .06em; }

/* 作品名：単語の途中で改行しない */
.wl-grid .ttl .ch, #work-viewer h2 .ch { display: inline-block; max-width: 100%; }
.wl-grid .ttl .nb, #work-viewer h2 .nb { display: inline-block; }

/* 拡大表示 */
#work-viewer { width: min(92vw, 560px); text-align: center; }
#work-viewer .dialog-head button { background: var(--accent); color: white; border: 0; border-radius: 20px; padding: 8px 14px; }
.wv-cat { font-size: 13px; font-weight: 700; letter-spacing: .16em; color: var(--accent); }
#work-viewer h2 { font: 500 16px/1.6 var(--jp); letter-spacing: .06em; }
.wv-figure { margin: 14px 0 0; }
.wv-figure img { display: block; width: auto; max-width: 100%; max-height: calc(85vh - 170px); margin: 0 auto; border-radius: 10px; }
.wv-date { margin-top: 10px; font-size: 11px; letter-spacing: .08em; color: #8a7470; }

@media (prefers-reduced-motion: no-preference) {
  .wl-grid figure { transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s; }
  .wl-grid img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
  @media (hover: hover) {
    .wl-grid :is(a, .wl-open):hover figure { transform: translateY(-6px); box-shadow: 0 14px 26px rgb(120 87 85 / .22); }
    .wl-grid :is(a, .wl-open):hover img { transform: scale(1.07); }
  }
}
@media (hover: hover) { .wl-tabs a:not(.is-current):hover { background: var(--pink); } }

@media (max-width: 960px) { .wl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .wl-header nav { gap: 14px; }
  .wl-header nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; }
  .wl-brand b { font-size: 19px; }
  .wl-tabs { gap: 8px; }
  .wl-tabs a { min-height: 36px; padding: 0 14px; font-size: 12px; }
  .wl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .wl-grid .ttl { font-size: 13px; letter-spacing: .02em; }
}
@media (max-width: 420px) {
  .wl-header { flex-wrap: wrap; gap: 0 12px; }
  .wl-header .wl-brand { font-size: 11px; letter-spacing: .2em; }
  .wl-header .wl-brand b { font-size: 18px; }
}

/* スライドで見せる作品（images が複数） */
.wl-grid figure { position: relative; }
.wl-count { position: absolute; right: 8px; top: 8px; padding: 2px 9px; border-radius: 999px; background: rgb(255 255 255 / .9); font-size: 11px; letter-spacing: .06em; color: var(--accent); }
.wv-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 12px; }
.wv-nav[hidden] { display: none; }
.wv-nav button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--accent); background: transparent; color: var(--accent); font-size: 18px; line-height: 1; cursor: pointer; }
#wv-count { min-width: 4em; font-size: 13px; letter-spacing: .1em; color: var(--accent); }
@media (hover: hover) { .wv-nav button:hover { background: var(--accent); color: #fff; } }

/* Back button: same space above (to the grid) and below (to the footer line). */
.wl { padding-bottom: 16px; }
