@charset "UTF-8";

/* ==========================================================
   ピクトグラム素材（ken-maeda.com/pictogram/）
   色・文字・ボタンなどの共通部分は /contact/css/contact.css を使う
   ========================================================== */

:root {
  --gutter: 20px;               /* 左右の余白。スマホ20px → タブレット40px → PC 80〜120px */
  --picto-color: #000000;       /* アイコンの色（script.js で変える） */
  --picto-stroke: 0.5;          /* 線の太さ（script.js で変える） */
  --picto-bg: #ffffff;          /* アイコンの背景。白っぽい色を選んだときは暗くする */
  --c-panel: #f7f7f7;
  /* ホバーの時間と動き方（--hover-duration・--hover-easing）は、共通CSS（contact.css）でサイト全体を1か所で決めている */
}
.is-light-color { --picto-bg: #303030; }

@media (min-width: 600px) {
  :root { --gutter: 40px; }
}
@media (min-width: 1024px) {
  :root { --gutter: clamp(80px, 7vw, 120px); }
}

/* 中身の幅は最大1280px。左右の余白はその外側に取る */
.l-inner {
  width: 100%;
  max-width: calc(1280px + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ダイアログを開いている間は、後ろのページをスクロールさせない */
html:has(.picto-dialog[open]) { overflow: hidden; }

/* ---------- ヘッダー・フッター（共通CSSの幅を、このページの幅に合わせる） ---------- */
.site-header {
  max-width: none;
  padding: 20px 0;
}

.picto-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 0 0 16px;
  padding: 0;
  font-size: 14px;
  list-style: none;
}

/* ---------- 見出し・説明 ---------- */
.picto-hero { padding-bottom: 32px; }
.picto .contact-title { margin: 8px 0 20px; }
/* 「PICTOGRAM」は9文字あるので、スマホで1行に収まる大きさにする */
.picto .contact-title__en { font-size: clamp(44px, 12.5vw, 112px); }

.picto-hero__lead {
  max-width: 46em;
  margin: 0 0 16px;
}

.picto-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.picto-points li {
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--c-accent-tint);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.8;
}

.picto-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}
/* 「ZIP・1.3MB」はボタンの文字の下に小さく出す */
.picto-zip {
  flex-direction: column;
  line-height: 1.4;
}
.picto-zip__meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.05em;
}
.picto-hero__note {
  max-width: 46em;
  margin: 16px 0 0;
  color: var(--c-muted);
  font-size: 14px;
}

/* ---------- 探す・色と線の太さ ---------- */
.picto-tools__row {
  display: grid;
  gap: 20px;
  padding: 20px;
  border-radius: 4px;
  background: var(--c-panel);
}

.picto-label {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.picto-search__input { background: #fff; }

.picto-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
}

/* 色 */
.picto-color {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.picto-color__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.picto-swatch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
}
.picto-swatch input[type="radio"] {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.picto-swatch__dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.picto-swatch:has(input:checked),
.picto-swatch.is-selected { box-shadow: 0 0 0 2px var(--c-text); }
.picto-swatch:has(input:focus-visible) {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}

/* ほかの色（カラーピッカー）。虹色の輪で「自由に選べる」ことを示す */
.picto-swatch--custom::before {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: conic-gradient(#f44, #fd3, #4c6, #3bf, #66f, #e4e, #f44);
  content: "";
}
.picto-swatch--custom input[type="color"] {
  position: relative;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  appearance: none;
}
.picto-swatch--custom input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.picto-swatch--custom input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 50%;
}
.picto-swatch--custom input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 50%;
}

.picto-color__code {
  min-width: 5.5em;
  margin-left: 4px;
  color: var(--c-muted);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px;
  letter-spacing: 0;
}

/* 線の太さ */
.picto-stroke { min-width: 0; }
.picto-stroke__value {
  display: inline-block;
  min-width: 2.5em;
  margin-left: 4px;
  font-family: var(--font-en);
  font-size: 16px;
  font-weight: 700;
}
.picto-stroke__row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}
.picto-stroke__range {
  width: 200px;
  max-width: 100%;
  margin: 0;
  accent-color: var(--c-accent);
  cursor: pointer;
}
.picto-stroke__reset {
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--c-input-border);
  border-radius: 4px;
  background: #fff;
  color: var(--c-text);
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: border-color var(--hover-duration) var(--hover-easing);
}
.picto-stroke__reset:hover { border-color: var(--c-accent); }

/* カテゴリ */
.picto-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.picto-filter__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 16px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: #fff;
  color: var(--c-text);
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition:
    border-color var(--hover-duration) var(--hover-easing),
    background-color var(--hover-duration) var(--hover-easing);
}
.picto-filter__btn:hover { border-color: var(--c-accent); }
.picto-filter__btn[aria-pressed="true"] {
  border-color: var(--c-accent);
  background: var(--c-accent-tint);
  font-weight: 700;
}
.picto-filter__num {
  color: var(--c-muted);
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 400;
}

.picto-count {
  margin: 16px 0 0;
  color: var(--c-muted);
  font-size: 14px;
}

/* ---------- 一覧 ---------- */
.picto-list { padding-top: 12px; }

.picto-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.picto-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 1px solid var(--c-line);
  border-radius: 4px;
  background: #fff;
  color: var(--c-text);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--hover-duration) var(--hover-easing);
}
.picto-card:hover { border-color: var(--c-accent); }
.picto-card__icon {
  display: block;
  padding: 4%;
  border-radius: 3px 3px 0 0;
  background: var(--picto-bg);
  color: var(--picto-color);
}
.picto-card__icon svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}
/* 元の太さ（0.5）の線だけを、選んだ太さにする */
.picto-card__icon [stroke-width=".5"] { stroke-width: var(--picto-stroke); }
.picto-card__name {
  display: flex;
  flex-grow: 1;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-top: 1px solid var(--c-line);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.03em;
}

.picto-empty {
  padding: 40px 0;
  color: var(--c-muted);
  text-align: center;
}
.picto-noscript {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 4px;
  background: var(--c-accent-tint);
  font-size: 14px;
}
.picto-updated {
  margin: 24px 0 0;
  color: var(--c-muted);
  font-size: 13px;
  text-align: right;
}

/* ---------- 制作のご相談 ---------- */
.picto-cta {
  padding-top: 48px;
  padding-bottom: 64px;
}
.picto-cta__box {
  padding: 32px 20px;
  border-radius: 4px;
  background: var(--c-panel);
  text-align: center;
}
.picto-cta__title {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.5;
}
.picto-cta__box p {
  max-width: 40em;
  margin: 0 auto 8px;
}
.picto-cta__sns {
  color: var(--c-muted);
  font-size: 14px;
}
.picto-cta__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

/* ---------- アイコンの詳細（ダイアログ） ---------- */
.picto-dialog {
  width: min(100% - 24px, 920px);
  max-width: none;
  max-height: calc(100% - 24px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--c-text);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
.picto-dialog::backdrop { background: rgba(48, 48, 48, 0.6); }

.picto-dialog__inner {
  position: relative;
  display: grid;
  gap: 20px;
  padding: 56px 20px 24px;
}

.picto-dialog__close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color var(--hover-duration) var(--hover-easing);
}
.picto-dialog__close::before,
.picto-dialog__close::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 2px;
  margin: -1px 0 0 -11px;
  background: var(--c-text);
  content: "";
}
.picto-dialog__close::before { transform: rotate(45deg); }
.picto-dialog__close::after { transform: rotate(-45deg); }
.picto-dialog__close:hover { background: var(--c-panel); }

.picto-dialog__preview {
  width: 100%;
  max-width: 280px;
  margin-inline: auto;
  align-self: start;
  border: 1px solid var(--c-line);
  border-radius: 4px;
  background: var(--picto-bg);
}
.picto-dialog__preview img {
  display: block;
  width: 100%;
  height: auto;
}

.picto-dialog__category {
  margin: 0;
  color: var(--c-muted);
  font-size: 13px;
}
.picto-dialog__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.5;
}
.picto-dialog__file {
  margin: 0 0 20px;
  color: var(--c-muted);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0;
}
.picto-dialog .picto-color { margin-bottom: 12px; }

.picto-dialog__actions {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.picto-dialog__actions .btn {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 10px 12px;
  letter-spacing: 0.05em;
}
.picto-png {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 8px;
}
/* 共通CSSで矢印が消えているので、▼を背景で付ける */
.picto-png__size {
  min-height: 52px;
  padding: 8px 32px 8px 12px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23303030' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center / 12px 8px;
  cursor: pointer;
}
.picto-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.6;
  cursor: pointer;
}
.picto-check input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--c-accent);
  cursor: pointer;
}
.picto-check small {
  display: block;
  color: var(--c-muted);
  font-size: 12px;
}

.picto-dialog__status {
  min-height: 1.8em;
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 700;
}
.picto-dialog__note {
  margin: 4px 0 0;
  color: var(--c-muted);
  font-size: 13px;
}

/* ---------- 480px以上：一覧を3列 ---------- */
@media (min-width: 480px) {
  .picto-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 600px以上 ---------- */
@media (min-width: 600px) {
  .picto-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
  }
  .picto-cta__box { padding: 40px; }
  .picto-cta__buttons .btn { min-width: 220px; }
}

/* ---------- 768px以上：ダイアログを左右2列に ---------- */
@media (min-width: 768px) {
  .picto-dialog__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    padding: 56px 40px 40px;
  }
  .picto-dialog__preview { max-width: none; }
}

/* ---------- 1024px以上：検索と設定を横に並べる ---------- */
@media (min-width: 1024px) {
  .picto-tools__row {
    grid-template-columns: minmax(240px, 1fr) auto;
    align-items: start;
    gap: 32px;
    padding: 24px 32px;
  }
}

/* ---------- スマホ（599px以下）：ボタンは横幅いっぱい ---------- */
@media (max-width: 599px) {
  .picto-hero__actions .btn,
  .picto-cta__buttons .btn {
    width: 100%;
    min-width: 0;
    letter-spacing: 0.08em;
  }
  .picto-stroke { flex-grow: 1; }
  .picto-stroke__range {
    flex-grow: 1;
    width: auto;
  }
}

/* 「視差効果を減らす」を設定している人には、すぐに切り替える */
@media (prefers-reduced-motion: reduce) {
  .picto-card,
  .picto-filter__btn,
  .picto-stroke__reset,
  .picto-dialog__close { transition: none; }
}
