/*
Theme Name: 作品販売ページ（試作・段階1）
Description: 森山さんのワイヤー（Figma、PC版・スマホ版）に寄せた見た目。スマホで横にはみ出さないことを優先。
*/

:root {
  --ws-text: #222;
  --ws-muted: #666;
  --ws-bg: #fff;
  --ws-bg-alt: #f5f5f5;
  --ws-line: #e2e2e2;
  --ws-ph: #e8e8e8;
  --ws-dark: #2b2b2b;
  --ws-soldout: #7a7a7a;
  --ws-callout-bg: #fff6ea;
  --ws-callout-line: #f1cf9c;

  /* カテゴリーの色（ワイヤーのタイルの色に寄せた） */
  --ws-c-illust: #f08ca2;
  --ws-c-goods: #f6b81f;
  --ws-c-accessory: #27b5b9;
  --ws-c-paper: #a6cf55;
  --ws-c-design: #4a92d4;
  --ws-c-other: #f08a12;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  color: var(--ws-text);
  background: var(--ws-bg);
  line-height: 1.7;
  font-size: 16px;
  overflow-wrap: anywhere;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #4a92d4; outline-offset: 2px; }
main:focus { outline: none; }

.ws-container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.ws-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 8px 12px;
  background: #fff;
}
.ws-skip:focus { left: 8px; top: 8px; }

/* ---------- 社内向けの注意書き ---------- */
.ws-notice {
  margin: 0;
  padding: 6px 16px;
  background: #fff6d6;
  border-bottom: 1px solid #ecd98a;
  font-size: 12px;
  text-align: center;
}

/* ---------- ヘッダー ---------- */
.ws-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--ws-line);
}
.ws-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  min-height: 60px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.ws-logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
}
.ws-logo__name { font-weight: 700; font-size: 20px; letter-spacing: .04em; }
.ws-logo:has(.ws-logo__img) { align-items: center; }
.ws-logo__img { display: block; height: 28px; width: auto; }
@media (max-width: 600px) { .ws-logo__img { height: 22px; } }
.ws-logo__sub { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--ws-muted); }
.ws-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.ws-nav a { text-decoration: none; font-size: 13px; padding: 4px 0; border-bottom: 2px solid transparent; }
.ws-nav a:hover { border-bottom-color: var(--ws-line); }
.ws-nav a[aria-current="page"] { border-bottom-color: var(--ws-dark); font-weight: 700; }

/* ---------- セクション共通 ---------- */
.ws-section { padding: 64px 0; scroll-margin-top: 64px; }
.ws-section--alt { background: var(--ws-bg-alt); }
.ws-section--tight { padding-top: 0; }
.ws-eyebrow {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--ws-muted);
}
.ws-heading { font-size: 26px; margin: 0 0 6px; line-height: 1.45; }
.ws-lead { margin: 0 0 28px; font-size: 13px; color: var(--ws-muted); }
.ws-note { margin: 12px 0 0; font-size: 12px; color: var(--ws-muted); }
.ws-empty { padding: 24px; text-align: center; color: var(--ws-muted); border: 1px dashed var(--ws-line); }
.ws-center { margin: 32px 0 0; text-align: center; }
.ws-crumb { margin: 0 0 24px; font-size: 12px; color: var(--ws-muted); }
.ws-crumb a { color: var(--ws-muted); }
.ws-ph { background: var(--ws-ph); }

/* ---------- ボタン ---------- */
.ws-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 24px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--ws-dark);
  border-radius: 2px;
  cursor: pointer;
}
.ws-btn--dark { background: var(--ws-dark); color: #fff; }
.ws-btn--dark:hover { background: #000; }
.ws-btn--line { background: #fff; color: var(--ws-dark); }
.ws-btn--line:hover { background: var(--ws-bg-alt); }
.ws-btn--block { display: flex; width: 100%; }
.ws-btn:disabled { background: #bdbdbd; border-color: #bdbdbd; color: #fff; cursor: not-allowed; }

/* ---------- ヒーロー ---------- */
.ws-hero { background: var(--ws-bg-alt); padding: 56px 0; overflow: hidden; }
.ws-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 40px;
  align-items: center;
}
.ws-hero__heading { margin: 0 0 16px; font-size: 34px; line-height: 1.5; }
.ws-hero__lead { margin: 0 0 24px; font-size: 13px; color: var(--ws-muted); }
.ws-hero__buttons { margin: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.ws-hero__collage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.ws-hero__ph { aspect-ratio: 1 / 1; overflow: hidden; }
.ws-hero__ph img { width: 100%; height: 100%; object-fit: cover; }
/* 真ん中の列だけ少し下げて、ワイヤーの段違いに寄せる */
.ws-hero__ph--2, .ws-hero__ph--5 { transform: translateY(16px); }

/* ---------- 作品カード ---------- */
.ws-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 20px;
}
.ws-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.ws-card__img {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--ws-ph);
}
.ws-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.ws-card:hover .ws-card__img img { transform: scale(1.03); }
.ws-card:hover .ws-card__name { text-decoration: underline; }
.ws-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--ws-dark);
}
.ws-badge--soldout { background: var(--ws-soldout); }
.ws-badge--order { background: #3c7a4c; }
.ws-badge--preparing { background: #8a6420; }
.ws-card.is-soldout .ws-card__img img { opacity: .5; }

.ws-card__body { padding: 12px 0 0; display: flex; flex-direction: column; gap: 2px; }
.ws-card__name { margin: 0; font-size: 14px; line-height: 1.5; }
.ws-card__maker { margin: 0; font-size: 11px; color: var(--ws-muted); }
.ws-card__price { margin: 2px 0 0; font-size: 14px; font-weight: 700; }
.ws-card__price small, .ws-detail__price small { font-size: 11px; font-weight: 400; margin-left: 4px; color: var(--ws-muted); }

/* ---------- タグ ---------- */
.ws-tags { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ws-tag {
  display: inline-block;
  padding: 1px 8px;
  font-size: 11px;
  line-height: 1.6;
  border-radius: 2px;
  color: #1f1f1f;
  background: var(--ws-bg-alt);
}
.ws-tag--plain { background: #fff; border: 1px solid var(--ws-line); }
.ws-tag--illust { background: var(--ws-c-illust); }
.ws-tag--goods { background: var(--ws-c-goods); }
.ws-tag--accessory { background: var(--ws-c-accessory); }
.ws-tag--paper { background: var(--ws-c-paper); }
.ws-tag--design { background: var(--ws-c-design); }
.ws-tag--other { background: var(--ws-c-other); }
.ws-tag--status { background: #fff; border: 1px solid var(--ws-dark); }
.ws-tag--st-soldout { border-color: var(--ws-soldout); color: var(--ws-soldout); }

/* ---------- カテゴリーのタイル ---------- */
.ws-tiles {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.ws-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 96px;
  padding: 12px 6px;
  text-align: center;
  text-decoration: none;
  color: #1f1f1f;
  border-radius: 2px;
  transition: filter .15s;
}
.ws-tile:hover { filter: brightness(1.06); }
.ws-tile__icon { font-size: 20px; line-height: 1; }
.ws-tile__label { font-size: 12px; font-weight: 700; line-height: 1.4; }
.ws-tile--illust { background: var(--ws-c-illust); }
.ws-tile--goods { background: var(--ws-c-goods); }
.ws-tile--accessory { background: var(--ws-c-accessory); }
.ws-tile--paper { background: var(--ws-c-paper); }
.ws-tile--design { background: var(--ws-c-design); }
.ws-tile--other { background: var(--ws-c-other); }

/* ---------- ご注文の流れ ---------- */
.ws-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.ws-flow__step {
  min-width: 0;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--ws-line);
}
.ws-flow__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  color: #1f1f1f;
}
.ws-flow__num--1 { background: var(--ws-c-illust); }
.ws-flow__num--2 { background: var(--ws-c-accessory); }
.ws-flow__num--3 { background: var(--ws-c-goods); }
.ws-flow__num--4 { background: var(--ws-c-design); }
.ws-flow__title { margin: 10px 0 4px; font-size: 14px; line-height: 1.5; }
.ws-flow__text { margin: 0; font-size: 12px; color: var(--ws-muted); }
.ws-callout {
  margin: 20px 0 0;
  padding: 12px 16px;
  font-size: 12px;
  background: var(--ws-callout-bg);
  border: 1px solid var(--ws-callout-line);
}

/* ---------- About ---------- */
.ws-about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
.ws-about__ph { aspect-ratio: 16 / 9; overflow: hidden; }
.ws-about__ph img { width: 100%; height: 100%; object-fit: cover; }
.ws-about__body p { margin: 0 0 10px; font-size: 13px; color: #444; }

/* ---------- 作品一覧 ---------- */
.ws-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.ws-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 14px;
  font-size: 12px;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--ws-line);
  border-radius: 999px;
}
.ws-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--ws-line);
}
.ws-chip--illust::before { background: var(--ws-c-illust); }
.ws-chip--goods::before { background: var(--ws-c-goods); }
.ws-chip--accessory::before { background: var(--ws-c-accessory); }
.ws-chip--paper::before { background: var(--ws-c-paper); }
.ws-chip--design::before { background: var(--ws-c-design); }
.ws-chip--other::before { background: var(--ws-c-other); }
.ws-chip:hover { border-color: #999; }
.ws-chip[aria-current="page"] { background: var(--ws-dark); border-color: var(--ws-dark); color: #fff; font-weight: 700; }
.ws-count { margin: 0 0 16px; font-size: 12px; color: var(--ws-muted); }

/* ---------- 作品詳細 ---------- */
.ws-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.ws-detail__mainimg { aspect-ratio: 1 / 1; overflow: hidden; }
.ws-detail__mainimg img { width: 100%; height: 100%; object-fit: cover; }
.ws-detail__thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.ws-thumb {
  padding: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--ws-ph);
  border: 2px solid transparent;
  cursor: pointer;
}
.ws-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ws-thumb[aria-pressed="true"] { border-color: var(--ws-dark); }
.ws-detail__name { margin: 0 0 6px; font-size: 26px; line-height: 1.45; }
.ws-detail__maker { margin: 0 0 12px; font-size: 13px; color: var(--ws-muted); }
.ws-detail__price { margin: 0; font-size: 24px; font-weight: 700; }
.ws-detail__desc {
  margin: 20px 0 16px;
  padding-top: 20px;
  border-top: 1px solid var(--ws-line);
  font-size: 13px;
  white-space: pre-wrap;
}
.ws-specs { width: 100%; margin: 0 0 20px; border-collapse: collapse; font-size: 12px; }
.ws-specs th, .ws-specs td { padding: 10px 4px; text-align: left; border-bottom: 1px solid var(--ws-line); vertical-align: top; }
.ws-specs th { width: 30%; font-weight: 400; color: var(--ws-muted); }

/* 売り切れ・準備中の注文ボタン（リンクを外した <a>） */
.ws-btn.is-disabled { background: #bdbdbd; border-color: #bdbdbd; color: #fff; cursor: not-allowed; }

/* ---------- 試作の注意（注文フォーム・完了） ---------- */
.ws-trial {
  margin: 0 0 24px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  background: #fff6d6;
  border: 1px solid #ecd98a;
  border-left: 4px solid #d9a400;
}

/* ---------- 注文フォーム ---------- */
.ws-order {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.ws-form, .ws-summary {
  min-width: 0;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--ws-line);
}
.ws-summary { position: sticky; top: 76px; }
.ws-field { margin: 0 0 20px; min-width: 0; }
.ws-field label, .ws-fieldset legend { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 700; }
.ws-fieldset { padding: 0; border: 0; }
.ws-req { margin-left: 4px; font-size: 10px; font-weight: 400; color: #b3261e; }
.ws-field input[type="text"],
.ws-field input[type="email"],
.ws-field select,
.ws-field textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px; /* 16px未満だと iPhone で入力時に拡大される */
  color: var(--ws-text);
  background: #fff;
  border: 1px solid #cfcfcf;
  border-radius: 2px;
}
.ws-field textarea { resize: vertical; }
.ws-field input::placeholder, .ws-field textarea::placeholder { color: #9a9a9a; }
.ws-hint { margin: 4px 0 0; font-size: 11px; color: var(--ws-muted); }
.ws-radios { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.ws-radio { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 400; cursor: pointer; }
.ws-radio input { width: 18px; height: 18px; margin: 0; }
.ws-center-text { text-align: center; }

.ws-summary__title { margin: 0 0 16px; font-size: 16px; }
.ws-summary__img { aspect-ratio: 16 / 10; overflow: hidden; margin: 0 0 12px; }
.ws-summary__img img { width: 100%; height: 100%; object-fit: cover; }
.ws-summary__name { margin: 0 0 8px; font-size: 14px; font-weight: 700; }

/* 表のような2列（ご注文内容・完了画面で共通） */
.ws-rows { margin: 0 0 8px; font-size: 13px; }
.ws-rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--ws-line); }
.ws-rows dt { color: var(--ws-muted); flex: 0 0 auto; }
.ws-rows dd { margin: 0; text-align: right; min-width: 0; }
.ws-rows__total { border-bottom: 0 !important; }
.ws-rows__total dt { color: var(--ws-text); font-weight: 700; }
.ws-rows__total dd { font-size: 20px; font-weight: 700; }

/* ---------- 注文完了 ---------- */
.ws-thanks {
  max-width: 560px;
  margin: 0 auto;
  padding: 36px 32px;
  background: #fff;
  border: 1px solid var(--ws-line);
}
.ws-thanks__check {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--ws-c-accessory);
  border: 2px solid var(--ws-c-accessory);
  border-radius: 50%;
}
.ws-thanks__heading { margin: 0 0 8px; font-size: 22px; text-align: center; line-height: 1.5; }
.ws-thanks__lead { margin: 0 0 20px; font-size: 13px; color: var(--ws-muted); text-align: center; }
.ws-thanks__box { margin: 0 0 12px; padding: 14px 16px; text-align: center; background: var(--ws-bg-alt); border: 1px solid var(--ws-line); }
.ws-thanks__box--deadline { margin-bottom: 28px; background: var(--ws-callout-bg); border-color: var(--ws-callout-line); }
.ws-thanks__label { margin: 0; font-size: 11px; color: var(--ws-muted); }
.ws-thanks__big { margin: 2px 0 0; font-size: 22px; font-weight: 700; letter-spacing: .02em; }
.ws-thanks__sub { margin: 0 0 8px; font-size: 16px; }
.ws-thanks .ws-rows { margin-bottom: 28px; }
.ws-thanks__transfer { margin: 0 0 20px; padding: 12px 14px; font-size: 13px; border: 1px solid var(--ws-line); }
.ws-thanks__notes { margin: 0 0 24px; padding-left: 2em; }
.ws-thanks__notes li { margin: 2px 0; }
.ws-thanks__back { margin: 0; }

/* ---------- フッター ---------- */
.ws-footer {
  padding: 32px 0;
  font-size: 12px;
  color: var(--ws-muted);
  border-top: 1px solid var(--ws-line);
}
.ws-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 24px;
}
.ws-footer p { margin: 0; }
.ws-footer__name { font-size: 18px; font-weight: 700; color: var(--ws-text); letter-spacing: .04em; }

/* ---------- タブレット ---------- */
@media (max-width: 900px) {
  .ws-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ws-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ws-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-detail { gap: 32px; }
  /* 注文フォーム：まとめを上に、入力欄を下に（スマホ版ワイヤーの並び） */
  .ws-order { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ws-summary { position: static; order: -1; }
}

/* ---------- スマホ ---------- */
@media (max-width: 640px) {
  .ws-container { padding: 0 16px; }
  .ws-section { padding: 44px 0; }
  .ws-heading, .ws-detail__name { font-size: 21px; }
  .ws-header__inner { min-height: 52px; }
  .ws-nav { gap: 0 16px; }

  .ws-hero { padding: 36px 0 44px; }
  .ws-hero__inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .ws-hero__heading { font-size: 25px; }
  .ws-hero__ph--2, .ws-hero__ph--5 { transform: translateY(10px); }

  .ws-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .ws-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ws-tile { min-height: 80px; }
  .ws-tile__label { font-size: 11px; }
  .ws-flow { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ws-about { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .ws-detail { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .ws-form, .ws-summary { padding: 20px 16px; }
  .ws-thanks { padding: 28px 16px; }
  .ws-thanks__big { font-size: 19px; }
  .ws-footer__inner { flex-direction: column; align-items: flex-start; }
}
