/* ==========================================================================
   Works — 作品集サイト
   ・余白を広めにとった、落ち着いたトーン
   ・一覧カード：4列（1360px〜）→ 3列（1024px〜）→ 2列（640px〜）→ 1列
   ・外部フォント・外部ライブラリは使わない（端末の標準フォント）
   ========================================================================== */

:root {
  /* 色 */
  --bg: #f7f6f3;
  --surface: #ffffff;
  --surface-2: #f0eee9;
  --text: #1f2328;
  --text-2: #565b62;
  --text-3: #7c8088;
  --line: #e7e4dd;
  --line-strong: #d3cfc5;
  --accent: #2e4877;
  --accent-hover: #213761;
  --accent-soft: #eaeef6;
  --danger-soft: #fbeeee;
  --danger: #9b2c2c;

  /* 形 */
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgb(24 24 27 / 0.04);
  --shadow: 0 1px 2px rgb(24 24 27 / 0.04), 0 12px 32px -12px rgb(24 24 27 / 0.12);

  /* 余白 */
  --gutter: clamp(20px, 4vw, 56px);
  --section-space: clamp(80px, 11vw, 144px);
  --grid-gap: clamp(20px, 2.2vw, 32px);
  --header-h: 68px;

  /* 文字 */
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic",
    "Meiryo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-en: "Helvetica Neue", "Segoe UI", Arial, var(--font);

  color-scheme: light;
}

/* ---------- リセット・基本 ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
  line-break: strict;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
video,
iframe,
svg {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

[tabindex="-1"]:focus {
  outline: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: #fff;
  font-size: 14px;
  transform: translateY(-160%);
  transition: transform 0.2s;
}

.skip-link:focus {
  transform: none;
}

.container {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.muted {
  color: var(--text-3);
}

.eyebrow {
  color: var(--accent);
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.6;
}

.section-title {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.04em;
  font-feature-settings: "palt";
}

.section-title--small {
  font-size: clamp(19px, 1.8vw, 22px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: rgb(46 72 119 / 0.35);
}

.text-link:hover {
  text-decoration-color: currentColor;
}

.icon {
  flex: none;
}

/* ---------- ボタン ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--outline {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.btn--outline:hover {
  border-color: var(--text-3);
}

.btn--small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 13.5px;
}

.btn--large {
  min-height: 54px;
  padding: 0 30px;
  font-size: 16px;
}

.btn--wide {
  min-width: min(100%, 280px);
}

/* ---------- ヘッダー ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(247 246 243 / 0.88);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom-color: var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 24px;
}

.brand {
  font-family: var(--font-en);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav ul {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--text);
}

.menu-button {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
}

.menu-button__bars,
.menu-button__bars::before,
.menu-button__bars::after {
  position: absolute;
  left: 50%;
  width: 20px;
  height: 1.6px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s, opacity 0.2s;
}

.menu-button__bars {
  top: 50%;
  transform: translate(-50%, -50%);
}

.menu-button__bars::before,
.menu-button__bars::after {
  content: "";
  left: 0;
}

.menu-button__bars::before {
  top: -6px;
}

.menu-button__bars::after {
  top: 6px;
}

.menu-button[aria-expanded="true"] .menu-button__bars {
  background: transparent;
}

.menu-button[aria-expanded="true"] .menu-button__bars::before {
  transform: translateY(6px) rotate(45deg);
}

.menu-button[aria-expanded="true"] .menu-button__bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- ヒーロー ---------- */

.hero {
  padding-top: clamp(64px, 10vw, 136px);
  padding-bottom: clamp(48px, 7vw, 88px);
}

.hero .eyebrow {
  margin-bottom: 20px;
}

.hero__title {
  max-width: 20em;
  font-size: clamp(28px, 4.2vw, 50px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.04em;
  font-feature-settings: "palt";
  text-wrap: balance;
}

.hero__lead {
  max-width: 38em;
  margin-top: 28px;
  color: var(--text-2);
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 2;
}

/* ---------- 作品一覧 ---------- */

.works {
  padding-bottom: var(--section-space);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  margin-bottom: 28px;
}

.result-count {
  color: var(--text-3);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

/* 絞り込み */
.filters {
  display: grid;
  gap: 16px;
  padding: 24px 28px;
  margin-bottom: clamp(32px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.filters__row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.filters__label {
  padding-top: 9px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.filters__description {
  margin-left: 112px;
  margin-top: -4px;
  color: var(--text-2);
  font-size: 14px;
}

.chip-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.chip:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.chip[aria-pressed="true"] {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}

.chip__count {
  color: var(--text-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.chip[aria-pressed="true"] .chip__count {
  color: rgb(255 255 255 / 0.7);
}

.search {
  position: relative;
  max-width: 420px;
}

.search__icon {
  position: absolute;
  top: 50%;
  left: 16px;
  color: var(--text-3);
  transform: translateY(-50%);
  pointer-events: none;
}

.search__input {
  width: 100%;
  min-height: 44px;
  padding: 0 16px 0 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 16px; /* iOS で拡大されないように16px */
  transition: border-color 0.2s, background-color 0.2s;
}

.search__input::placeholder {
  color: var(--text-3);
}

.search__input:focus {
  border-color: var(--accent);
  background: var(--surface);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* カードのグリッド */
.card-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr));
  gap: var(--grid-gap);
}

@media (min-width: 640px) {
  .card-grid {
    --cols: 2;
  }
}

@media (min-width: 1024px) {
  .card-grid {
    --cols: 3;
  }
}

@media (min-width: 1360px) {
  .card-grid {
    --cols: 4;
  }

  .card-grid--related {
    --cols: 3;
  }
}

/* カード */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.card__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card__media img {
  transform: scale(1.025);
}

.card__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--text-3);
  font-size: 40px;
  font-weight: 700;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 24px 0;
}

.card__category {
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.card__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.03em;
}

.card__title a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.card__catch {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.75;
}

.card .tag-list {
  margin-top: 10px;
}

.card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding: 22px 24px 24px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
}

.link-arrow::after {
  content: "→";
  margin-left: 6px;
  transition: transform 0.2s;
}

.link-arrow:hover {
  color: var(--text);
}

.link-arrow:hover::after {
  transform: translateX(3px);
}

/* 読み込み中 */
.card--skeleton {
  min-height: 340px;
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.6s linear infinite;
}

.card--skeleton:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

@keyframes shimmer {
  to {
    background-position: -150% 0;
  }
}

/* タグ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.4;
}

/* 対応OS：白地に枠線＋アイコン（色付きのタグと見分けられるように） */
.tag--platform {
  gap: 4px;
  padding: 0 9px 0 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}

.tag--platform .icon {
  color: var(--text-3);
}

.tag--link {
  transition: background-color 0.2s, color 0.2s;
}

.tag--link:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.tag-list--large .tag {
  min-height: 34px;
  padding: 0 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
}

/* もっと見る・該当なし */
.more {
  display: flex;
  justify-content: center;
  margin-top: clamp(40px, 5vw, 56px);
}

.empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 72px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  grid-column: 1 / -1;
}

.empty .btn {
  margin-top: 12px;
}

.empty__title {
  font-size: 18px;
  font-weight: 700;
}

.empty--page {
  margin-block: clamp(64px, 10vw, 120px);
  border-style: solid;
  background: var(--surface);
}

.notice {
  padding: 24px 28px;
  border-radius: var(--radius);
  grid-column: 1 / -1;
}

.notice--error {
  background: var(--danger-soft);
  color: var(--danger);
}

.notice__title {
  font-weight: 700;
}

/* ---------- プロフィール ---------- */

.profile {
  padding-block: var(--section-space);
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.profile__inner {
  display: grid;
  gap: 32px;
}

.profile__head .eyebrow {
  margin-bottom: 10px;
}

.profile__name {
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.profile__role {
  margin-top: 4px;
  color: var(--text-3);
  font-size: 14.5px;
}

.profile__bio {
  display: grid;
  gap: 12px;
  max-width: 40em;
  margin-top: 28px;
  color: var(--text-2);
  line-height: 2;
}

.profile .tag-list {
  margin-top: 32px;
}

@media (min-width: 900px) {
  .profile__inner {
    grid-template-columns: minmax(200px, 1fr) 2.2fr;
    gap: 64px;
  }
}

/* ---------- お問い合わせ ---------- */

.contact {
  display: grid;
  justify-items: center;
  padding-block: var(--section-space);
  text-align: center;
}

.contact .eyebrow {
  margin-bottom: 10px;
}

.contact__lead {
  max-width: 34em;
  margin-top: 20px;
  color: var(--text-2);
  line-height: 2;
}

.contact__action {
  margin-top: 36px;
}

/* ---------- フッター ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 13px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 36px;
}

/* ==========================================================================
   個別ページ
   ========================================================================== */

#work-root {
  padding-bottom: var(--section-space);
}

.breadcrumb {
  padding-block: 28px clamp(28px, 4vw, 44px);
  font-size: 13.5px;
  color: var(--text-3);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
}

.breadcrumb li + li::before {
  content: "/";
  margin-inline: 10px;
  color: var(--line-strong);
}

.breadcrumb a {
  color: var(--text-2);
}

.breadcrumb a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.detail {
  display: grid;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

@media (min-width: 960px) {
  .detail {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }

  .detail__info {
    position: sticky;
    top: calc(var(--header-h) + 32px);
  }
}

.gallery__main {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

.gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__main--empty {
  display: grid;
  place-items: center;
  color: var(--text-3);
  font-size: 24px;
  font-weight: 700;
}

.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.gallery__thumb {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  opacity: 0.6;
  transition: opacity 0.2s, border-color 0.2s;
}

.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__thumb:hover {
  opacity: 0.9;
}

.gallery__thumb[aria-pressed="true"] {
  border-color: var(--text);
  opacity: 1;
}

.detail__info .eyebrow {
  margin-bottom: 12px;
}

.detail__title {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  font-feature-settings: "palt";
}

.detail__catch {
  margin-top: 12px;
  color: var(--text-2);
  font-size: clamp(16px, 1.4vw, 18px);
  font-weight: 500;
}

.detail__description {
  margin-top: 28px;
  color: var(--text-2);
  line-height: 2;
}

.point-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.point-list li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  line-height: 1.75;
}

.point-list li::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 2px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.meta-list {
  margin-top: 40px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}

.meta-list__row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}

.meta-list dt {
  color: var(--text-3);
  font-size: 13.5px;
}

.meta-list dd {
  color: var(--text);
}

.detail-section {
  margin-top: var(--section-space);
}

.detail-section > .section-title {
  margin-bottom: 24px;
}

.detail-video {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #000;
}

/* ここで試す */
.demo__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.demo__stage {
  overflow: hidden;
  height: min(78vh, 760px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.demo__placeholder {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  height: 100%;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0) 0 0 / 22px 22px,
    var(--surface);
}

.demo__placeholder .btn {
  margin-top: 12px;
}

.demo__host {
  font-family: var(--font-en);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.demo__frame {
  width: 100%;
  height: 100%;
  border: 0;
}

/* 前後の作品 */
.pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: var(--section-space);
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.pager__link {
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 8px 0;
}

.pager__link--next {
  text-align: right;
}

.pager__label {
  color: var(--text-3);
  font-size: 12.5px;
}

.pager__label::before,
.pager__label::after {
  font-family: var(--font-en);
}

.pager__link--prev .pager__label::before {
  content: "← ";
}

.pager__link--next .pager__label::after {
  content: " →";
}

.pager__title {
  font-weight: 600;
  font-size: 15px;
}

.pager__link:hover .pager__title {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.pager__index {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
}

.pager__index:hover {
  border-color: var(--line-strong);
}

/* 読み込み中 */
.detail-skeleton {
  display: grid;
  gap: 48px;
  margin-top: 88px;
}

.detail-skeleton__media,
.detail-skeleton__text {
  border-radius: var(--radius-lg);
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.6s linear infinite;
}

.detail-skeleton__media {
  aspect-ratio: 16 / 10;
}

.detail-skeleton__text {
  height: 320px;
}

@media (min-width: 960px) {
  .detail-skeleton {
    grid-template-columns: 1.4fr 1fr;
  }
}

/* ショートカット一覧（活用術） */
.shortcut-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 12px;
}

.shortcut-list__row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 10px 20px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.shortcut-list dd {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
  text-align: right;
}

@media (max-width: 480px) {
  .shortcut-list__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .shortcut-list dd {
    text-align: left;
  }
}

.keys {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.keys__plus {
  color: var(--text-3);
  font-size: 13px;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 3px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-en);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ==========================================================================
   状態の印（画像の右上）：開発中・限定公開
   ========================================================================== */

.card__media,
.gallery__main {
  position: relative;
}

.media-badges {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: calc(100% - 24px);
  pointer-events: none;
}

.gallery__main .media-badges {
  top: 16px;
  right: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgb(24 24 27 / 0.12), 0 4px 12px -4px rgb(24 24 27 / 0.2);
}

.gallery__main .badge {
  min-height: 30px;
  padding: 0 14px;
  font-size: 13px;
}

/* 開発中：黄色系 */
.badge--dev {
  background: #f6c344;
  color: #3d2c00;
}

/* 限定公開（解除済み）：濃い紺に白 */
.badge--unlocked {
  background: var(--accent);
  color: #fff;
}

/* ロック中：黒 */
.badge--locked {
  background: var(--text);
  color: #fff;
}

.chip--dev[aria-pressed="false"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f6c344;
}

/* ---------- ロック中のカード ---------- */

.card--locked {
  border-style: dashed;
  border-color: var(--line-strong);
  background: var(--surface);
}

.card--locked:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.card__media--locked {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(135deg, transparent 0 10px, rgb(31 35 40 / 0.035) 10px 20px),
    var(--surface-2);
}

.locked-visual {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-3);
  box-shadow: var(--shadow-sm);
}

.locked-visual .icon {
  width: 28px;
  height: 28px;
}

.card--locked .card__actions .btn {
  gap: 6px;
}

/* ---------- 解錠中のお知らせ ---------- */

.unlock-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 24px;
  padding: 14px 16px 14px 20px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
}

.unlock-bar__text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
}

.unlock-bar .btn {
  gap: 6px;
}

/* ---------- パスワード入力 ---------- */

.unlock-dialog {
  width: min(480px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 64px -16px rgb(24 24 27 / 0.35);
}

.unlock-dialog::backdrop {
  background: rgb(24 24 27 / 0.4);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.unlock-dialog__inner {
  position: relative;
  padding: 40px 36px 36px;
}

.unlock-dialog__title {
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.unlock-dialog__lead {
  margin-top: 12px;
  color: var(--text-2);
  font-size: 14.5px;
}

.unlock-dialog__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-3);
}

.unlock-dialog__close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.unlock {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 420px;
  margin-top: 24px;
  text-align: left;
}

.unlock__label {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
}

.unlock__row {
  display: flex;
  gap: 8px;
}

.unlock__input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 16px;
}

.unlock__input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.unlock .btn {
  min-height: 48px;
  border-radius: var(--radius-sm);
}

.unlock__status {
  min-height: 1.6em;
  color: var(--danger);
  font-size: 13.5px;
}

.empty--locked .unlock {
  margin-block: 12px 8px;
}

/* ==========================================================================
   埋め込み表示（embed.html）
   ========================================================================== */

body.embed {
  background: transparent;
}

.embed__main {
  padding: 4px;
}

.card-grid--embed {
  --max-cols: 3;
  --min-card: 240px;
  grid-template-columns: repeat(
    auto-fill,
    minmax(max(var(--min-card), calc((100% - (var(--max-cols) - 1) * var(--grid-gap)) / var(--max-cols))), 1fr)
  );
  gap: 24px;
  --grid-gap: 24px;
}

.card-grid--max-1 {
  --max-cols: 1;
}

.card-grid--max-2 {
  --max-cols: 2;
}

.card-grid--max-3 {
  --max-cols: 3;
}

.card-grid--max-4 {
  --max-cols: 4;
}

.embed .card:hover {
  transform: none;
}

.embed__more {
  margin-top: 24px;
  text-align: center;
}

/* ==========================================================================
   画面幅ごとの調整
   ========================================================================== */

/* ノートPC（〜1359px）：余白を少し詰める */
@media (max-width: 1359px) {
  .card__body {
    padding: 20px 22px 0;
  }

  .card__actions {
    padding: 20px 22px 22px;
  }
}

/* タブレット以下 */
@media (max-width: 899px) {
  .filters__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .filters__label {
    padding-top: 0;
  }

  .filters__description {
    margin-left: 0;
    margin-top: -8px;
  }
}

/* スマホ */
@media (max-width: 767px) {
  :root {
    --header-h: 60px;
  }

  .menu-button {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    padding: 8px var(--gutter) 20px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    box-shadow: 0 16px 24px -16px rgb(24 24 27 / 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav li + li {
    border-top: 1px solid var(--line);
  }

  .site-nav a {
    display: flex;
    min-height: 52px;
    font-size: 16px;
    color: var(--text);
  }

  /* 絞り込みは横スクロール */
  .filters {
    padding: 0;
    border: 0;
    background: transparent;
    gap: 18px;
  }

  .chip-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .chip-scroll::-webkit-scrollbar {
    display: none;
  }

  .chip {
    min-height: 44px;
    scroll-snap-align: start;
  }

  .search {
    max-width: none;
  }

  .search__input {
    background: var(--surface);
  }

  /* 指で押しやすい大きさ（44px以上） */
  .btn--small {
    min-height: 44px;
  }

  .link-arrow {
    min-height: 44px;
  }

  .detail__actions .btn {
    width: 100%;
  }

  .gallery__main {
    border-radius: var(--radius);
  }

  .gallery__thumbs {
    gap: 8px;
  }

  /* スマホではページ内デモの代わりに、上の「アプリを開く」ボタンを使う */
  .demo {
    display: none;
  }

  .pager {
    grid-template-columns: 1fr 1fr;
  }

  .pager__index {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
  }

  .meta-list__row {
    grid-template-columns: 84px minmax(0, 1fr);
  }
}

/* 動きを減らす設定の人には、アニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 印刷時（お客様に紙で渡す場合など） */
@media print {
  .site-header,
  .filters,
  .more,
  .demo,
  .pager,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
  }
}
