/*
 * デザイン候補（見比べるための見本）の共通の部品
 * - ネットに置く分には入れない（make-dist.mjs の一覧に無いので、集められない）
 * - 混み具合の状態は、アドレスの ?s=free / few / full / off で切り替える（state.js が html に付ける）
 * - 写真は Unsplash の無料の写真（Unsplash License。商用可・表記は不要）。出どころは photos.md
 * - 動きは、ずっと続く動き（ゆれる・回る・流れる・湯気・ゆっくり寄る）だけ。
 *   スクロールすると文字や写真が現れる演出は、ひな形の決まりにより使わない
 * - スマホで「動きを減らす」を選んでいる人には、動きを止める
 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
/* 斜めの帯や傾けた写真が、画面の横にはみ出さないように */
.wrap { overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; }

/* 状態ごとに、出す文を切り替える */
.st { display: none; }
[data-state="free"] .st--free,
[data-state="few"] .st--few,
[data-state="full"] .st--full,
[data-state="off"] .st--off { display: revert; }
[data-state="off"] .only-open { display: none !important; }
html:not([data-state="off"]) .only-off { display: none !important; }

/* 開け閉じの印は、各案で描く */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* 写真（背景に敷く）。--img に写真のアドレスを入れる */
.ph { position: relative; overflow: hidden; background: #1b130d; }
.ph > i {
  position: absolute; inset: 0;
  background: var(--img) center / cover no-repeat;
}
/* ゆっくり寄っていく写真 */
.ph--zoom > i { animation: kenburns 22s ease-in-out infinite alternate; transform-origin: var(--origin, 50% 50%); }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.14); } }

/* 写真を順に入れ替える（重ねた写真を、順に濃くする） */
.ph--slides > i { opacity: 0; animation: slide var(--dur, 18s) infinite; }
.ph--slides > i:nth-child(1) { animation-delay: 0s; }
.ph--slides > i:nth-child(2) { animation-delay: calc(var(--dur, 18s) / 3); }
.ph--slides > i:nth-child(3) { animation-delay: calc(var(--dur, 18s) / 3 * 2); }
@keyframes slide {
  0% { opacity: 0; transform: scale(1.02); }
  6% { opacity: 1; }
  33% { opacity: 1; }
  40% { opacity: 0; transform: scale(1.12); }
  100% { opacity: 0; }
}

/* 流れる文字（中身を2回並べて、半分ずらす） */
.marquee { overflow: hidden; white-space: nowrap; }
.marquee > span { display: inline-block; animation: marquee var(--speed, 24s) linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ゆれる（提灯・札・暖簾） */
@keyframes sway { 0%, 100% { transform: rotate(-2.2deg); } 50% { transform: rotate(2.2deg); } }
/* 回る（レコード・丸い文字） */
@keyframes spin { to { transform: rotate(360deg); } }
/* 営業中の丸が、ゆっくり光る */
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--glow-c, #2fa866) 55%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
.live-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--glow-c, #2fa866); animation: glow 2.4s ease-in-out infinite; }

/* スマホで「動きを減らす」を選んでいる人には、動きを止める */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ph--slides > i:first-child { opacity: 1; }
}

/* 細い線のアイコン（ひな形と同じ絵。色は currentColor） */
.icon {
  display: inline-block;
  flex: none;
  width: 1.2em;
  height: 1.2em;
  vertical-align: -0.2em;
  background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
}
.icon--mic { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='2.5' width='6' height='11.5' rx='3'/%3E%3Cpath d='M5.5 11a6.5 6.5 0 0 0 13 0M12 17.5V21.5M8.5 21.5h7'/%3E%3C/svg%3E"); }
.icon--pot { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 10.5h15v5.5a4 4 0 0 1-4 4h-7a4 4 0 0 1-4-4z'/%3E%3Cpath d='M2.5 10.5h19M9.5 7.5c-.6-.9.6-1.6 0-2.5M14.5 7.5c-.6-.9.6-1.6 0-2.5'/%3E%3C/svg%3E"); }
.icon--note { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5.5l11-2V16'/%3E%3Ccircle cx='6.5' cy='18' r='2.5'/%3E%3Ccircle cx='17.5' cy='16' r='2.5'/%3E%3C/svg%3E"); }
.icon--glass { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16l-8 9z'/%3E%3Cpath d='M12 13v7.5M8 20.5h8M6.5 7h11'/%3E%3C/svg%3E"); }
.icon--phone { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3.5h3.3l1.7 4.3-2.2 1.4a11.5 11.5 0 0 0 5 5l1.4-2.2 4.3 1.7V17a2 2 0 0 1-2 2C10 19 5 14 3 7.5V5.5a2 2 0 0 1 2-2z'/%3E%3C/svg%3E"); }
.icon--pin { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6.5-6-6.5-11a6.5 6.5 0 0 1 13 0c0 5-6.5 11-6.5 11z'/%3E%3Ccircle cx='12' cy='10' r='2.4'/%3E%3C/svg%3E"); }
.icon--clock { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E"); }
.icon--yen { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 4l5.5 8 5.5-8M12 12v8M8 13h8M8 16.5h8'/%3E%3C/svg%3E"); }
.icon--people { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.2'/%3E%3Cpath d='M3 19.5c.6-3.3 3-5 6-5s5.4 1.7 6 5'/%3E%3Ccircle cx='17' cy='9' r='2.4'/%3E%3Cpath d='M16.5 14.6c2.3.2 4 1.6 4.5 4.4'/%3E%3C/svg%3E"); }
.icon--chat { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5h16v10H10l-4.5 3.5v-3.5H4z'/%3E%3C/svg%3E"); }
.icon--plus { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.icon--instagram { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.4' cy='6.6' r='1.1' fill='black' stroke='none'/%3E%3C/svg%3E"); }

/* 開いた札では、＋を×の向きに回す（各案の summary の中の .icon--plus） */
.icon--plus { transition: transform 0.2s ease; }
details[open] > summary .icon--plus { transform: rotate(45deg); }

/* 見本の印（一番下） */
.mihon-note { font-size: 12px; opacity: 0.75; }
