/* ============================================================
   cifa-request  DESIGN H: Sticker Pop (ネオメンフィス)
   クリーム / 極太黒フチ / ハードシャドウ / キャンディカラー
   ============================================================ */

/* デフォルトは「ソーダ」(青紫)
   --ink  = 本文テキスト色
   --line = フチ・ハードシャドウ色
   --card = カード/入力欄の面色
   --on-accent = アクセント色の上に載るテキスト/フチ色
   (ライトテーマでは --ink = --line = --on-accent で従来と同一見た目) */
:root {
  --bg: #ecf5fb;
  --card: #ffffff;
  --ink: #1d1d1f;
  --line: #1d1d1f;
  --on-accent: #1d1d1f;
  --dim: #8a8579;
  --yellow: #7ed2ff;
  --pink: #b79bff;
  --sky: #ffe66d;
  --lime: #6fe3c0;
  --r: 14px;
  --font-round: "M PLUS Rounded 1c", sans-serif;
}

/* ---------- カラーテーマ (左下のCOLORスウォッチで切替) ----------
   --yellow = メイン(見出しステッカー/CTA), --pink = サブ(CTAホバー/バッジ),
   --sky = 第3(ラベル/フォーカス), --lime = 第4(ステータス/完了) */

body.theme-candy {
  --bg: #fdf6ec;
  --yellow: #ffd644;
  --pink: #ff7ab6;
  --sky: #6ecbff;
  --lime: #a5e75c;
}

body.theme-berry {
  --bg: #fdeff4;
  --yellow: #ff9fc7;
  --pink: #ff6b81;
  --sky: #ffd97d;
  --lime: #8fe3b0;
}

body.theme-melon {
  --bg: #eefaf0;
  --yellow: #9fe884;
  --pink: #ff8fb3;
  --sky: #ffe07d;
  --lime: #6ecbff;
}

body.theme-grape {
  --bg: #f4effc;
  --yellow: #c9a6ff;
  --pink: #ff7ab6;
  --sky: #7ed2ff;
  --lime: #ffe66d;
}

/* ボルト: 黒背景 × 蛍光黄緑 (唯一のダークテーマ)
   サブアクセントはネオンピンク。選択状態・CTAホバー・バッジがピンクに反転する */
body.theme-volt {
  --bg: #0b0b0d;
  --card: #141418;
  --ink: #f1f2e6;
  --line: #d9f523;
  --on-accent: #131408;
  --dim: #8f927e;
  --yellow: #d9f523;
  --pink: #ff5fb2;
  --sky: #eaff7b;
  --lime: #b5f04a;
  background-image: radial-gradient(rgba(217, 245, 35, 0.06) 1.5px, transparent 2px);
}

/* 蛍光感: 主要ステッカーにネオングロー(ハードシャドウは維持したまま追加) */
body.theme-volt .scramble--accent {
  box-shadow: 5px 5px 0 var(--line), 0 0 28px rgba(217, 245, 35, 0.22);
}

body.theme-volt .nav__status {
  box-shadow: 3px 3px 0 var(--line), 0 0 16px rgba(181, 240, 74, 0.25);
}

body.theme-volt .btn--primary {
  box-shadow: 6px 6px 0 var(--line), 0 0 22px rgba(217, 245, 35, 0.25);
}

body.theme-volt .btn--primary:hover {
  box-shadow: 8px 8px 0 var(--line), 0 0 26px rgba(255, 95, 178, 0.4);
}

body.theme-volt .btn--primary:active {
  box-shadow: 2px 2px 0 var(--line), 0 0 18px rgba(255, 95, 178, 0.3);
}

/* 衣装は選択するとネオンピンクに反転 + ピンクの発光 */
body.theme-volt .outfit.is-selected {
  background: var(--pink);
  box-shadow: 6px 6px 0 var(--line), 0 0 22px rgba(255, 95, 178, 0.35);
}

body.theme-volt .outfit.is-selected .outfit__name { background: var(--pink); }

/* 選択順バッジはピンクカードの上で埋もれないようライムに */
body.theme-volt .outfit__order { background: var(--yellow); }

body.theme-volt .tag--req {
  box-shadow: 2px 2px 0 var(--line), 0 0 12px rgba(255, 95, 178, 0.3);
}

/* 衣装詳細モーダルのダーク対応 */
body.theme-volt .omodal { background: rgba(8, 8, 10, 0.95); }

body.theme-volt .omodal__img {
  background-image: radial-gradient(rgba(217, 245, 35, 0.07) 1.5px, transparent 2px);
}

body.theme-volt .omodal__choice input:checked + span {
  box-shadow: 2px 2px 0 var(--line), 0 0 12px rgba(217, 245, 35, 0.3);
}

body.theme-volt .omodal__note { color: #ff85ac; }

/* ヒーロー背景カルーセルはダークでは少し暗めに */
body.theme-volt .hero__bg { opacity: 0.42; }

/* 公開先カードとお題箱リンクにネオングロー */
body.theme-volt .pcard { box-shadow: 5px 5px 0 var(--line), 0 0 12px rgba(217, 245, 35, 0.12); }
body.theme-volt .pcard:nth-child(2) { box-shadow: 5px 5px 0 var(--line), 0 0 12px rgba(255, 95, 178, 0.18); }

body.theme-volt .odaibako-link {
  box-shadow: 3px 3px 0 var(--line), 0 0 14px rgba(217, 245, 35, 0.25);
}

body.theme-volt .outfit__thumb {
  background-image: radial-gradient(rgba(217, 245, 35, 0.07) 1.5px, transparent 2px);
}

body.theme-volt .field input::placeholder,
body.theme-volt .field textarea::placeholder,
body.theme-volt .omodal__custom input::placeholder { color: #62655a; }

body.theme-volt .outfit__thumb .noimg { color: #62655a; }

body.theme-volt .lightbox { background: rgba(8, 8, 10, 0.95); }

body.theme-volt .btn:disabled {
  background: #232327;
  color: #6c6f63;
  border-color: #3b3d33;
  box-shadow: 6px 6px 0 #3b3d33;
}

body.theme-volt .plink--empty { border-bottom-color: #2e2f28; }

body.theme-volt .field__error { color: #ff85ac; }

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(rgba(29, 29, 31, 0.05) 1.5px, transparent 2px);
  background-size: 26px 26px;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-round);
  font-size: 16px;
  line-height: 1.8;
  overflow-x: hidden;
}

::selection { background: var(--yellow); color: var(--on-accent); }

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

:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

.wrap-chunk { display: inline-block; }
body { line-break: strict; }
@supports (word-break: auto-phrase) { :lang(ja) { word-break: auto-phrase; } }

.hero__sub, .hero__note, .section-lead, .done__lead, .req-submit__note, .footer__note {
  text-wrap: pretty;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
  padding: 0 max(24px, calc((100vw - 1040px) / 2));
  background: var(--bg);
  border-bottom: 3px solid var(--line);
}

.nav__logo { font-weight: 800; font-size: 18px; }

.nav__links { display: flex; gap: 24px; font-size: 14px; font-weight: 700; color: var(--dim); }

.nav__links a:hover { color: var(--ink); }

.nav__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.lang-toggle {
  font-family: var(--font-round);
  font-weight: 800;
  font-size: 13px;
  color: var(--ink);
  background: var(--card);
  border: 3px solid var(--line);
  border-radius: 999px;
  padding: 2px 16px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--line);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lang-toggle:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--line);
  background: var(--sky);
  color: var(--on-accent);
  border-color: var(--on-accent);
}

.nav__status {
  font-size: 13px;
  font-weight: 800;
  color: var(--on-accent);
  background: var(--lime);
  border: 3px solid var(--on-accent);
  border-radius: 999px;
  padding: 2px 16px;
  transform: rotate(-2deg);
  box-shadow: 3px 3px 0 var(--line);
}

/* ---------- layout ---------- */
main { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

section { padding: 88px 0; }

.section-title {
  font-weight: 800;
  font-size: clamp(26px, 3.8vw, 38px);
  letter-spacing: 0.01em;
}

.request > .section-title { display: block; margin-bottom: 10px; }

.section-lead { color: var(--dim); font-weight: 500; font-size: 15px; margin-bottom: 40px; }

.dim { color: var(--dim); font-weight: 500; }

/* ---------- hero ---------- */
.hero { padding: 92px 0 96px; position: relative; z-index: 0; }

/* 背景カバーフローカルーセル。左右のカードは斜めに待機、中央だけ正面。
   コンテンツ幅を突き破って画面幅いっぱいに広げる。
   左と下を --bg のグラデでマスクして文字の可読性を守る */
.hero__bg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc((100% - 100vw) / 2);
  width: 100vw;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.5;
}

.hero__bg-stage { position: absolute; inset: 0; }

/* transform / opacity / z-index は app.js が位置(中央からのオフセット)に応じて設定する */
.hero__bg-stage img {
  position: absolute;
  top: 50%;
  left: 62%;
  height: 82%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 3px solid var(--line);
  border-radius: 18px;
  transition: transform 0.8s cubic-bezier(0.22, 0.9, 0.36, 1), opacity 0.8s ease;
  will-change: transform, opacity;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, var(--bg) 34%, transparent 80%),
    linear-gradient(0deg, var(--bg) 6%, transparent 42%);
}

.hero__title {
  font-weight: 800;
  font-size: clamp(32px, 7.2vw, 66px);
  line-height: 1.3;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 1;
}

.hero__title .scramble { display: inline-block; }

.scramble--accent {
  background: var(--yellow);
  color: var(--on-accent);
  padding: 0 14px;
  border: 3px solid var(--on-accent);
  border-radius: 12px;
  box-shadow: 5px 5px 0 var(--line);
  transform: rotate(-1deg);
}

.hero__sub { margin-top: 30px; font-weight: 500; font-size: 16px; max-width: 36em; }

.hero__note { margin-top: 8px; font-size: 13px; color: var(--dim); }

/* ---------- publish ---------- */
.publish { margin-top: 52px; }

.publish__label {
  display: inline-block;
  font-weight: 800;
  font-size: 13px;
  color: var(--on-accent);
  background: var(--sky);
  border: 3px solid var(--on-accent);
  border-radius: 999px;
  padding: 2px 18px;
  box-shadow: 3px 3px 0 var(--line);
  transform: rotate(-1.5deg);
  margin-bottom: 20px;
}

.publish__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 720px;
}

.pcard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--card);
  border: 3px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: 5px 5px 0 var(--line);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.pcard__name { font-weight: 800; font-size: 15px; }

.pcard__arrow { font-size: 15px; font-weight: 800; transition: transform 0.15s ease; }

/* 公開先はアクセント色のフチで強調 (ホバーで同色に塗られる) */
.pcard:nth-child(1) { border-color: var(--yellow); }
.pcard:nth-child(2) { border-color: var(--pink); }
.pcard:nth-child(3) { border-color: var(--sky); }
.pcard:nth-child(4) { border-color: var(--lime); }

.pcard:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--line);
  color: var(--on-accent);
  border-color: var(--on-accent);
}

.pcard:nth-child(1):hover { background: var(--yellow); }
.pcard:nth-child(2):hover { background: var(--pink); }
.pcard:nth-child(3):hover { background: var(--sky); }
.pcard:nth-child(4):hover { background: var(--lime); }

.pcard:hover .pcard__arrow { transform: translate(2px, -2px); }

.pcard--empty { opacity: 0.5; cursor: default; }
.pcard--empty:hover {
  transform: none;
  box-shadow: 5px 5px 0 var(--line);
  background: var(--card) !important;
  color: var(--ink);
  border-color: var(--line);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-round);
  font-weight: 800;
  font-size: 16px;
  padding: 14px 40px;
  border: 3px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn--primary {
  background: var(--yellow);
  color: var(--on-accent);
  border-color: var(--on-accent);
  box-shadow: 6px 6px 0 var(--line);
}

.btn--primary:hover { background: var(--pink); transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--line); }

.btn--primary:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--line); }

.btn--big { font-size: 18px; padding: 18px 56px; }

.btn:disabled {
  background: #e8e2d6;
  color: #a8a396;
  box-shadow: 6px 6px 0 #c9c3b6;
  border-color: #c9c3b6;
  cursor: not-allowed;
  transform: none;
}

.hero__cta { margin-top: 48px; }

/* ---------- samples ---------- */
.samples__bar-wrap { margin: 0; }

.samples__bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--card);
  border: 3px solid var(--line);
  border-radius: var(--r);
  box-shadow: 6px 6px 0 var(--line);
  padding: 24px 30px;
  cursor: pointer;
  color: var(--ink);
  text-align: left;
  font-family: var(--font-round);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.samples__bar:hover {
  background: var(--sky);
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--line);
  color: var(--on-accent);
  border-color: var(--on-accent);
}

.samples__bar-right { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }

.samples__bar-state { font-weight: 800; font-size: 14px; }

.samples__chev {
  width: 30px;
  height: 30px;
  border: 3px solid var(--on-accent);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--on-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: transform 0.2s ease;
}

.samples__bar[aria-expanded="true"] .samples__chev { transform: rotate(180deg); }

#samplesBody { padding-top: 40px; }

.samples__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.sample-card { margin: 0; }

.sample-card:nth-child(odd) { transform: rotate(-0.8deg); }
.sample-card:nth-child(even) { transform: rotate(0.8deg); }

.ph-slot {
  position: relative;
  border: 3px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 5px 5px 0 var(--line);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ph-slot--clickable { cursor: zoom-in; }
.ph-slot--clickable:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--line); }

.ph-slot__label {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--dim);
  background: var(--bg);
  border: 2px dashed var(--dim);
  border-radius: 999px;
  padding: 4px 18px;
}

.ph-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sample-card__title { margin-top: 12px; font-weight: 700; font-size: 13px; color: var(--dim); }

.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-nav:hover { background: var(--yellow); color: var(--on-accent); border-color: var(--on-accent); }

.slide-nav--prev { left: 10px; }
.slide-nav--next { right: 10px; }

.slide-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.slide-dots i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); }
.slide-dots i.on { background: var(--pink); }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(253, 246, 236, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 48px 24px;
}

.lightbox__body {
  max-width: min(880px, 90vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.lightbox__body img {
  max-width: 100%;
  max-height: 70vh;
  border: 3px solid var(--line);
  border-radius: var(--r);
  box-shadow: 8px 8px 0 var(--line);
}

.lightbox__comment {
  font-size: 14px;
  font-weight: 500;
  background: var(--card);
  border: 3px solid var(--line);
  border-radius: 999px;
  padding: 10px 26px;
  max-width: 40em;
  box-shadow: 4px 4px 0 var(--line);
}

.lightbox__close,
.lightbox__nav {
  width: 46px;
  height: 46px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 4px 4px 0 var(--line);
}

.lightbox__close { position: absolute; top: 20px; right: 24px; }

.lightbox__close:hover { background: var(--pink); color: var(--on-accent); border-color: var(--on-accent); }
.lightbox__nav:hover { background: var(--yellow); color: var(--on-accent); border-color: var(--on-accent); }

/* ---------- request form ---------- */
.req-form {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 52px;
}

.req-block { border: none; padding: 0; }

.req-block__title {
  font-weight: 800;
  font-size: 21px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.tag {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  transform: rotate(-2deg);
  box-shadow: 2px 2px 0 var(--line);
}

.tag--req { background: var(--pink); color: var(--on-accent); border-color: var(--on-accent); }
.tag--opt { background: var(--card); color: var(--dim); }

.field { display: flex; flex-direction: column; gap: 8px; flex: 1; }

.field-row { display: flex; gap: 24px; }

.field label { font-size: 14px; font-weight: 800; }

.field input,
.field textarea {
  font-family: var(--font-round);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  background: var(--card);
  border: 3px solid var(--line);
  border-radius: var(--r);
  padding: 12px 18px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder { color: #beb9ac; }

.field input:focus,
.field textarea:focus {
  outline: none;
  box-shadow: 4px 4px 0 var(--sky);
  transform: translate(-1px, -1px);
}

.field__error { font-size: 13px; color: #e0447c; font-weight: 800; }

/* copyright 警告 (キャラ名/作品名がブロックパターンにヒットしたとき) */

/* honeypot: 視覚的に画面外へ (display:none は bot に見破られるので使わない) */
.hp-input {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* outfit picker */
.outfit-counter { font-weight: 800; font-size: 14px; color: var(--dim); margin-bottom: 18px; }

.outfit-counter b {
  display: inline-block;
  min-width: 30px;
  text-align: center;
  color: var(--on-accent);
  background: var(--yellow);
  border: 2px solid var(--on-accent);
  border-radius: 999px;
  font-size: 16px;
}

.outfit-counter.is-full { color: var(--ink); }
.outfit-counter.is-full b { background: var(--lime); }

.outfit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.outfit {
  position: relative;
  border: 3px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  font-family: var(--font-round);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--line);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.outfit:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--line); }

.outfit:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--line); }

.outfit__thumb {
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(rgba(29, 29, 31, 0.06) 1.5px, transparent 2px);
  background-size: 14px 14px;
  background-color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.outfit__thumb .noimg { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; color: #beb9ac; }

.outfit__name {
  display: block;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  border-top: 3px solid var(--line);
}

.outfit.is-selected {
  background: var(--yellow);
  color: var(--on-accent);
  border-color: var(--on-accent);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--line);
}

.outfit.is-selected .outfit__name { background: var(--yellow); border-top-color: var(--on-accent); }

.outfit__order {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 3px solid var(--on-accent);
  border-radius: 50%;
  background: var(--pink);
  color: var(--on-accent);
  font-weight: 800;
  font-size: 14px;
  display: none;
  align-items: center;
  justify-content: center;
}

.outfit.is-selected .outfit__order { display: flex; }

.outfit.shake { animation: shake 0.3s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* カードとゴミ箱ボタンを重ねるラッパー (詳細モーダル方式のときだけ生成される) */
.outfit-wrap { position: relative; display: flex; }

.outfit-wrap .outfit { width: 100%; }

.outfit__trash {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--line);
  transform: rotate(-4deg);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

/* 選択中のカードにだけ表示 (ゴミ箱はカードの兄弟要素) */
.outfit.is-selected + .outfit__trash { display: flex; }

.outfit__trash:hover {
  background: var(--pink);
  color: var(--on-accent);
  border-color: var(--on-accent);
  transform: rotate(-4deg) scale(1.1);
}

/* ---------- 衣装詳細モーダル ---------- */
.omodal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(253, 246, 236, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.omodal__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 28px;
  width: min(760px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  background: var(--card);
  border: 3px solid var(--line);
  border-radius: 18px;
  box-shadow: 8px 8px 0 var(--line);
  padding: 30px;
}

.omodal__img {
  position: relative; /* 複数カット切替の矢印(slide-nav)用 */
  border: 3px solid var(--line);
  border-radius: var(--r);
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(rgba(29, 29, 31, 0.06) 1.5px, transparent 2px);
  background-size: 14px 14px;
  background-color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.omodal__title { font-weight: 800; font-size: 26px; }

.omodal__kicker {
  display: inline-block;
  font-weight: 800;
  font-size: 11px;
  color: var(--on-accent);
  background: var(--sky);
  border: 2px solid var(--on-accent);
  border-radius: 999px;
  padding: 1px 14px;
  box-shadow: 2px 2px 0 var(--line);
  transform: rotate(-1.5deg);
  margin-top: 16px;
}

.omodal__group { margin-top: 16px; }

.omodal__group-title { font-weight: 800; font-size: 13px; color: var(--dim); margin-bottom: 8px; }

/* バリエーション選択 = テキストピルのラジオ (画像は左のプレビューで確認) */
.omodal__choices { display: flex; flex-wrap: wrap; gap: 10px; }

.omodal__choice { position: relative; }

.omodal__choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.omodal__choice span {
  display: inline-block;
  font-weight: 800;
  font-size: 13px;
  padding: 6px 18px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--line);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.omodal__choice span:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--line); }

.omodal__choice input:checked + span {
  background: var(--yellow);
  color: var(--on-accent);
  border-color: var(--on-accent);
}

.omodal__choice input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }

/* キャラ衣装のカスタム指定欄 (.field input と同トーン) */
.omodal__custom {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.omodal__custom label { font-size: 13px; font-weight: 800; }

.omodal__custom input {
  font-family: var(--font-round);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
  background: var(--card);
  border: 3px solid var(--line);
  border-radius: var(--r);
  padding: 10px 16px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.omodal__custom input::placeholder { color: #beb9ac; }

.omodal__custom input:focus {
  outline: none;
  box-shadow: 4px 4px 0 var(--sky);
  transform: translate(-1px, -1px);
}

.omodal__note { margin-top: 14px; font-size: 13px; font-weight: 800; color: #e0447c; }

.omodal__actions {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.omodal__remove {
  font-family: var(--font-round);
  font-weight: 800;
  font-size: 13px;
  padding: 8px 20px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--line);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.omodal__remove:hover {
  background: var(--pink);
  color: var(--on-accent);
  border-color: var(--on-accent);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--line);
}

/* 送信確認モーダル (パネルを1カラム・小さめにする) */
.omodal__panel--confirm {
  grid-template-columns: 1fr;
  width: min(480px, 100%);
}

.cmodal__note { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--dim); }

.cmodal__summary {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px 16px;
  font-size: 14px;
  border-top: 3px solid var(--line);
  padding-top: 16px;
}

.cmodal__summary dt { color: var(--dim); font-weight: 800; font-size: 12px; padding-top: 2px; }

.cmodal__summary dd { font-weight: 700; overflow-wrap: anywhere; }

.omodal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--line);
}

.omodal__close:hover { background: var(--pink); color: var(--on-accent); border-color: var(--on-accent); }

@media (max-width: 640px) {
  .omodal { padding: 14px; }
  .omodal__panel { grid-template-columns: 1fr; gap: 18px; padding: 20px; padding-top: 60px; }
  /* iOS Safari は aspect-ratio + max-height の組合せでグリッド行高を誤計算し、
     後続の選択肢ボタンが画像に被る。枠は画像にぴったり沿わせたいので、
     箱ではなく <img> 自身に高さ・枠線・角丸を持たせて実寸に密着させる。
     (箱側 contain だとレターボックスの隙間が枠との間に出て「フィットしない」)
     74px = omodal padding 14*2 + panel padding 20*2 + border 3*2 */
  .omodal__img {
    aspect-ratio: auto;
    max-height: none;
    height: auto;
    border: none;
    background: none;
    padding: 0;
    overflow: visible;
  }
  .omodal__img img {
    width: auto;
    max-width: 100%;
    height: min(calc((100vw - 74px) * 4 / 3), 48svh);
    object-fit: contain;
    border: 3px solid var(--line);
    border-radius: 16px;
  }
}

/* submit */
.req-submit { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }

.req-submit__note { font-size: 13px; font-weight: 500; color: var(--dim); }

/* done panel */
.done {
  max-width: 720px;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  padding: 44px;
  box-shadow: 8px 8px 0 var(--line);
  transform: rotate(-0.5deg);
}

.done__title {
  font-weight: 800;
  font-size: 30px;
  margin-bottom: 8px;
  display: inline-block;
  color: var(--on-accent);
  background: var(--lime);
  border: 3px solid var(--on-accent);
  border-radius: 12px;
  padding: 2px 18px;
  box-shadow: 4px 4px 0 var(--line);
  transform: rotate(-1deg);
}

.done__lead { color: var(--dim); font-weight: 500; font-size: 14px; margin: 16px 0 28px; }

.done__summary {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px 20px;
  font-size: 15px;
  border-top: 3px solid var(--line);
  padding-top: 22px;
}

.done__summary dt { color: var(--dim); font-weight: 800; font-size: 13px; padding-top: 2px; }

.done__summary dd { overflow-wrap: anywhere; font-weight: 700; }

/* ---------- footer ---------- */
/* 上のラインが画面幅いっぱいに伸びるよう、中央寄せは padding で行う */
.footer {
  border-top: 3px solid var(--line);
  padding: 40px max(24px, calc((100vw - 1040px) / 2)) 56px;
}

.footer__odaibako { font-weight: 800; font-size: 15px; margin-bottom: 26px; }

.odaibako-link {
  display: inline-block;
  background: var(--yellow);
  color: var(--on-accent);
  border: 3px solid var(--on-accent);
  border-radius: 999px;
  padding: 2px 16px;
  margin: 0 6px;
  box-shadow: 3px 3px 0 var(--line);
  transform: rotate(-1deg);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.odaibako-link:hover {
  background: var(--pink);
  transform: rotate(-1deg) translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--line);
}

.footer__row {
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__logo { font-weight: 800; font-size: 15px; }

.footer__links { display: inline-flex; }

.plink { font-weight: 800; font-size: 13px; border-bottom: 3px solid var(--sky); margin-right: 16px; }

.plink:hover { border-bottom-color: var(--pink); }

.plink--empty { color: var(--dim); cursor: default; border-bottom-color: #d9d4c8; }

.footer__note { font-size: 12px; font-weight: 500; color: var(--dim); }

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal.in { opacity: 1; transform: none; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .outfit.shake { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .samples__grid { grid-template-columns: repeat(2, 1fr); }
  .outfit-grid { grid-template-columns: repeat(3, 1fr); }
  .publish__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  section { padding: 60px 0; }

  .nav { gap: 12px; }
  .nav__links { display: none; }

  .hero { padding-top: 56px; }

  .field-row { flex-direction: column; gap: 24px; }

  .samples__grid { grid-template-columns: 1fr 1fr; gap: 16px; }

  .outfit-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .samples__bar { padding: 18px 20px; }

  .lightbox { gap: 8px; padding: 24px 8px; }

  .done { padding: 26px 20px; }
  .done__summary { grid-template-columns: 1fr; gap: 4px; }
  .done__summary dt { margin-top: 12px; }
}
