/* =========================
   Base
========================= */
body {
  margin: 0;
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #fff; /* 全体は白のまま */
  color: #333;
  line-height: 1.7;
}

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

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

/* =========================
   Opening Splash
========================= */
body.preload {
  overflow: hidden;
}

#splash {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.45s ease;
}

/* ロゴ文字（1.1秒） */
#splash-logo {
  font-size: 28px;
  letter-spacing: 0.25em;
  text-indent: 0.25em;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  animation: logoFadeIn 1.1s ease-out forwards;
}

@keyframes logoFadeIn {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  55% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* アイコン（起き上がりこぼし） */
#splash-icon {
  margin-top: 24px;
  width: 120px;
  height: 120px;
  opacity: 0;
  transform: translateY(24px) rotate(0deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

#splash-icon img {
  max-width: 80%;
  max-height: 80%;
  display: block;
}

body.show-icon #splash-icon {
  animation: kokorobi 1.0s ease-out forwards;
}

@keyframes kokorobi {
  0% {
    opacity: 0;
    transform: translateY(24px) rotate(0deg);
  }
  20% {
    opacity: 1;
    transform: translateY(0) rotate(-10deg);
  }
  40% {
    transform: rotate(8deg);
  }
  60% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(2deg);
  }
  90% {
    opacity: 1;
    transform: rotate(-1deg);
  }
  100% {
    opacity: 0;
    transform: rotate(0);
  }
}

/* ロゴ消える */
body.logo-out #splash-logo {
  animation: logoFadeOut 0.45s ease forwards;
}

@keyframes logoFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* サイト本体フェードイン */
#site-wrapper {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

body.loaded #splash {
  opacity: 0;
  pointer-events: none;
}

body.loaded #site-wrapper {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   Fixed Nav (Top-left)
========================= */
.index-nav-fixed {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 16px;
  border-radius: 16px;

  /* ★ 半透明設定を強める部分 ↓ */
  background: rgba(255, 255, 255, 0.65); /* ← 透明度を0.65に変更（お好みで調整可能） */
  backdrop-filter: blur(10px);           /* ← 背景がぼけて綺麗に見える */
  -webkit-backdrop-filter: blur(10px);   /* ← iPhone対策 */

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.index-icon {
  width: 50px;
  height: 50px;
  border-radius: 12%;
  overflow: hidden;
  flex-shrink: 0;
}

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

.index-title-group {
  white-space: nowrap;
  line-height: 1.1;
}

.index-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 3px;
  letter-spacing: 0.12em;
}

.index-sub {
  font-size: 11px;
  color: #777;
  margin: 0;
}

.index-nav-buttons {
  display: flex;
  gap: 8px;
  margin-left: 16px;
  white-space: nowrap;
}

.index-btn {
  padding: 8px 18px;
  font-size: 13px;
  border-radius: 999px;
  border: none;
  background: #f0f0f0;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.index-btn:hover {
  background: #e2e2e2;
  transform: translateY(-1px);
}

.index-btn-primary {
  background: #333;
  color: #fff;
}

.index-btn-primary:hover {
  background: #000;
}

/* Hamburger */
.index-hamburger {
  display: none; /* PCでは非表示。スマホで @media が上書き */
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  padding: 0;

  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.index-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #555;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.index-hamburger span + span {
  margin-top: 4px;
}

.index-nav-fixed.nav-open .index-hamburger span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.index-nav-fixed.nav-open .index-hamburger span:nth-child(2) {
  opacity: 0;
}

.index-nav-fixed.nav-open .index-hamburger span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* =========================
   Content Sections
========================= */
.content-wrapper {
  margin: 0 auto;
  padding: 80px 16px 2px 16px;
  max-width: 1320px;
}

section.content-block {
  min-height: 100vh; /* 画面の高さぶん */
  display: flex;
  flex-direction: column;
  justify-content: center; /* 縦中央寄せ */
  align-items: stretch;
  padding: 80px 24px 60px;
  margin: 32px auto;
  background: #f5f5f7;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  opacity: 0;
  transform: translateY(30px);
}

@media (min-width: 641px) {
  #illust.content-block {
    min-height: auto;
    justify-content: flex-start;
    padding-top: 40px;
    padding-bottom: 40px;
  }
}

/* Fade in */
.fade-in {
  animation: fadeInUp 0.7s ease forwards;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #999;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.content-title {
  font-size: 22px;
  margin: 0 0 10px;
}

.content-text {
  font-size: 14px;
  color: #555;
  margin-bottom: 14px;
}

.content-btn {
  display: inline-block;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 999px;
  background: #333;
  color: #fff;
  border: 1px solid #333;
}

.content-btn:hover {
  background: #000;
}

/* Mobile nav + sections */
@media (max-width: 640px) {
  .index-nav-fixed {
    flex-direction: row;
    align-items: center;
    max-width: calc(100%);
  }

  .index-hamburger {
    display: inline-flex;
  }

  .index-nav-buttons {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 60px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.14);
    flex-direction: column;
    gap: 8px;
    z-index: 900;
  }

  .index-nav-fixed.nav-open .index-nav-buttons {
    display: flex;
  }

  section.content-block {
    align-items: flex-start;
    padding: 50px 16px 40px;
    margin: 24px auto;
    min-height: auto;
  }
}

/* =========================
   Section Heading
========================= */
.section-heading {
  width: 100%;
  text-align: center;
  margin-bottom: 24px;
}

.section-heading-main {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  letter-spacing: 0.20em;
  text-indent: 0.20em;
  font-weight: 800;
}

.section-heading-sub {
  margin-top: 5px;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  letter-spacing: 0.12em;
  opacity: 0.85;
}

/* =========================
   Profile & Gallery
========================= */
.profile-section {
  max-width: 960px;
  margin: 30px auto 32px;
  padding: 24px 20px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.profile-icon {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  background: #f0f0f3;
}

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

.profile-text h2 {
  margin: 0 0 4px;
  font-size: 1.4rem;
}

.profile-text p {
  margin: 0 0 12px;
  color: #666;
}

.sns-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.sns-links a {
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #d0d0d5;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.sns-links a:hover {
  background: #f3f3f6;
}

.bio h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.bio ul {
  margin: 0;
  padding-left: 20px;
  color: #555;
  font-size: 0.95rem;
}

.gallery-section {
  max-width: 960px;
  margin: 8px auto 8px;
  padding: 0 20px 8px;
}

.gallery-section h2 {
  margin: 0 0 16px;
  font-size: 1.3rem;
  letter-spacing: 0.12em;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gallery-item {
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.gallery-item .caption {
  margin: 8px 10px 10px;
  font-size: 0.9rem;
  color: #555;
}

@media (max-width: 600px) {
  .profile-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 20px 0 32px;
  font-size: 0.75rem;
  color: #999;
  opacity: 0.85;
  letter-spacing: 0.03em;
}

/* =========================
   CSS Variables
========================= */
:root {
  --bg: transparent;
  --text: #222;

  /* Order */
  --ow-bg: #f5f5f7;
  --ow-accent: #555555;
  --ow-accent-soft: #e5e7eb;
  --ow-text-main: #333333;
  --ow-text-muted: #777777;
  --ow-danger: #c75b6b;
}

/* =========================
   Works Gallery (Horizontal)
========================= */
.illust-wrapper {
  width: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.illust-title {
  font-size: 28px;
  margin-bottom: 4px;
}

.illust-subtitle {
  font-size: 14px;
  margin-bottom: 24px;
  color: #666;
}

.char-row {
  position: relative;
  width: 100%;
  max-width: 1600px;
  height: 60vh;
  overflow: hidden;
  cursor: grab;
  user-select: none;
}

.char-row.dragging {
  cursor: grabbing;
}

.char-track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 0;
  will-change: transform;
}

.char-item {
  position: relative;
  flex: 0 0 auto;
  width: 320px;
  aspect-ratio: 2/3;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.char-item.is-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.char-item-inner {
  width: 100%;
  height: 100%;
  animation: floatY 3.2s ease-in-out infinite;
}

@keyframes floatY {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
  100% {
    transform: translateY(0);
  }
}

.char-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* Zoom lens */
.zoom-lens {
  position: absolute;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%);
  transition: opacity 0.12s ease-out;
}

.zoom-lens-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: var(--ox, 5%) var(--oy, 5%);
  transform: scale(5);
}

@media (max-width: 600px) {
  .char-row {
    height: 60vh;
  }

  .char-item {
    width: min(60vw, 360px);
  }

  .zoom-lens {
    display: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
  }

  .gallery-item img {
    width: 100% !important;
    height: 180px !important;
    object-fit: cover;
    display: block;
  }

  .index-icon img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
  }
}

/* =========================
   Live2D
========================= */
.live2d-wrapper {
  min-height: 60vh;
  padding: 40px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.live2d-title {
  font-size: 24px;
  margin-bottom: 12px;
  letter-spacing: 0.06em;
}

.live2d-subtitle {
  font-size: 13px;
  margin-bottom: 24px;
  color: #777;
  text-align: center;
}

.viewer-shell {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.live2d-viewer {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #dddddf;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#live2d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.icon-bar {
  width: 100%;
}

.icon-row {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.model-btn {
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  border-radius: 16px;
  border: 1px solid #dddddf;
  background: #fff;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.15s ease-out,
    border-color 0.15s ease-out,
    box-shadow 0.15s ease-out;
}

.model-btn img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.model-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.model-btn.is-active {
  border-color: #888;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.icon-row::-webkit-scrollbar {
  height: 6px;
}

.icon-row::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
}

@media (max-width: 600px) {
  .live2d-wrapper {
    padding: 2px 2px;
    width: 100%;
  }

  .live2d-viewer {
    border-radius: 16px;
  }

  .model-btn {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 600px) {
  .live2d-viewer {
    aspect-ratio: 9 / 12;
  }
}

/* =========================
   Order (Wizard)
========================= */
/* ORDER 全体のラッパー（※後勝ちしていた値を採用） */
.ow-page {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 2px 2px 2px; /* ← ここは元のCSSの「後ろ」が勝ってた値 */
  box-sizing: border-box;
  overflow-x: hidden;
}

/* レイアウト（統合：gapは 32px を採用） */
.ow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
  gap: 32px;
  max-width: 100%;
}

/* はみ出し対策（子要素） */
.ow-steps,
.ow-summary {
  min-width: 0;
}

/* PC：左右カラムの高さを固定して、中だけスクロール */
@media (min-width: 601px) {
  .ow-layout {
    height: 750px;          /* ←好きな高さに。まずは680推し */
    align-items: stretch;   /* 高さ揃える */
  }

  .ow-steps,
  .ow-summary {
    height: 100%;
    overflow-y: auto;
    padding-right: 6px;     /* スクロールバーで文字が隠れにくく */
  }
}

@media (max-width: 600px) {
  .ow-layout {
    grid-template-columns: 1fr;
  }

  .ow-summary {
    display: none !important;
  }
}

.ow-hero {
  text-align: center;
  margin-bottom: 28px;
}

.ow-hero h1 {
  font-size: clamp(2rem, 3vw + 1rem, 2.6rem);
  margin-bottom: 10px;
  letter-spacing: 0.08em;
}

.ow-hero p {
  font-size: 1rem;
  color: var(--ow-text-muted);
  line-height: 1.8;
  margin: 0;
}

/* === 左側：進行チャート === */
.ow-steps {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.ow-step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.ow-step-title {
  font-size: 1.1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ow-step-number {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--ow-accent);
  color: #fff;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.ow-step-indicator {
  font-size: 0.9rem;
  color: var(--ow-text-muted);
}

.ow-progress {
  height: 8px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
}

.ow-progress-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #555555, #999999);
  transform-origin: left center;
  transform: scaleX(0.25);
  transition: transform 0.2s ease;
}

/* ステップ本体 */
.ow-step {
  display: none;
  animation: owFade 0.2s ease;
}

.ow-step.is-active {
  display: block;
}

@keyframes owFade {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ow-step h2 {
  font-size: 1.3rem;
  margin: 0 0 6px;
}

.ow-step-desc {
  font-size: 1rem;
  color: var(--ow-text-muted);
  margin: 0 0 14px;
}

/* 選択フィールド */
.ow-field-group {
  background: var(--ow-accent-soft);
  border: 1px dashed rgba(140, 140, 140, 0.5);
  padding: 16px 14px;
  border-radius: 14px;
  margin-bottom: 16px;
}

.ow-field-label {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.ow-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ow-pill {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  cursor: pointer;
  user-select: none;
}

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

.ow-pill-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: #fff;
  transition: 0.15s;
}

.ow-pill input:checked + .ow-pill-dot {
  background: #555555;
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(120, 120, 120, 0.35);
}

.ow-pill-label {
  font-weight: 600;
  white-space: nowrap;
}

.ow-tip {
  font-size: 0.9rem;
  color: var(--ow-text-muted);
  margin-top: 6px;
  line-height: 1.6;
}

.ow-warning {
  font-size: 0.95rem;
  color: var(--ow-danger);
  margin-top: 6px;
}

.ow-pill.is-disabled {
  opacity: 0.45;
  background: #f0f0f0;
  cursor: not-allowed;
}

.ow-pill.is-disabled .ow-pill-dot {
  background: #ddd;
  border-color: #ccc;
}

.ow-pill.is-disabled .ow-pill-label {
  color: #999;
}

.ow-pill input:disabled {
  cursor: not-allowed;
}

/* ナビゲーション */
.ow-nav {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  color: var(--ow-text-muted);
}

.ow-nav-buttons {
  display: flex;
  gap: 10px;
}

.ow-btn {
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.08);
  color: #333;
}

.ow-btn-primary {
  background: linear-gradient(135deg, #666666, #333333);
  color: white;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.ow-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* === コミッションガイド規約 === */
.terms-link{
  text-align: center;
  margin: 10px 0 25px;
  font-size: 0.95rem;
  color: #666;
}

.terms-link a{
  color: #4f46e5;
  text-decoration: underline;
}

.terms-link a:hover{
  opacity: 0.7;
}

/* === 右側：サマリー（PC用） === */
.ow-summary {
  background: rgba(255, 255, 255, 0.96);
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ow-summary h2 {
  font-size: 1.25rem;
  margin: 0 0 4px;
}

.ow-summary-block {
  padding: 12px;
  background: #f7f7f8;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
}

.ow-summary-block h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 600;
}

.ow-summary-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.98rem;
}

.ow-summary-list li {
  margin-bottom: 4px;
}

.ow-total {
  padding: 12px 14px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ow-total-label {
  font-size: 0.9rem;
  color: var(--ow-text-muted);
}

.ow-total-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ow-accent);
}

.ow-total-sub {
  font-size: 0.9rem;
  color: var(--ow-text-muted);
}

.ow-summary-note {
  font-size: 0.85rem;
  color: var(--ow-text-muted);
  line-height: 1.7;
}

.ow-summary-textarea label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.ow-summary-textarea textarea {
  width: 100%;
  min-height: 130px;
  font-size: 0.92rem;
  font-family: inherit;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 8px 10px;
  resize: vertical;
  background: #fff;
  box-sizing: border-box;
}

.ow-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.ow-summary-actions a {
  text-decoration: none;
}

.ow-copy-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.ow-summary-footer {
  font-size: 0.85rem;
  color: var(--ow-text-muted);
  line-height: 1.7;
  margin-top: 4px;
}

/* メイン画面ではテキストエリア＆ボタン非表示（ポップアップ用にだけ使う） */
.ow-summary-textarea,
.ow-summary-actions {
  display: none;
}

/* ==== 右上のフローティング合計（金額表示） ==== */
.ow-floating-total {
  position: sticky;
  top: 100px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 13px;
  background: #333;
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  z-index: 50;
}

@media (min-width: 600px) {
  .ow-floating-total {
    display: none !important;
  }

  .ow-floating-total {
    position: fixed;
    top: 72px;
    right: 16px;
    left: auto;
    margin-left: 0;
  }
}

/* ==== ポップアップ ==== */
.ow-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.ow-modal {
  background: #fff;
  max-width: 760px;
  width: 92%;
  max-height: 70vh;
  border-radius: 20px;
  padding: 20px 18px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  overflow: auto;
}

.ow-modal-close {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  position: absolute;
  top: 12px;
  right: 16px;
}

.ow-modal-header {
  position: relative;
  padding-right: 4px;
  margin-bottom: 12px;
}

.ow-modal-header h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
}

.ow-modal-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ow-text-muted);
}

.ow-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.ow-modal-textarea textarea {
  width: 100%;
  min-height: 160px;
  font-size: 0.92rem;
  font-family: inherit;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 8px 10px;
  resize: vertical;
  background: #fff;
  box-sizing: border-box;
}

.ow-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.ow-modal-actions a {
  text-decoration: none;
}

@media (max-width: 600px) {
  .ow-modal {
    padding: 20px 20px 20px;
  }
}

/* =========================
   ライトボックス
========================= */

/* ===== Gallery: 画像の見え方 ===== */
.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center;
  display: block;

  /* ちょっとだけ見え方を整える（環境による） */
  image-rendering: auto;
  transform: translateZ(0);
}

/* ===== Lightbox ===== */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 99999;
}

.lb-overlay.is-open {
  display: flex;
}

.lb-inner {
  position: relative;
  max-width: min(980px, 96vw);
  max-height: 92vh;
}

.lb-img {
  width: 100%;
  height: auto;
  max-height: 92vh;
  display: block;
  border-radius: 16px;
  background: #fff;
}

.lb-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: rgba(255,255,255,0.92);
  font-size: 22px;
  line-height: 1;
}

/* ===== 用途欄（textarea）を必ず縦に大きくする：強制 ===== */
#owModalSummaryText{
  display:block;
  width:100%;
  min-height:260px !important; /* ←縦に延ばす */
  height:260px;                /* ← min-height が効かない環境用の保険 */
  font-size:1rem;
  padding:12px 14px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,0.15);
  background:#fff;
  box-sizing:border-box;
  font-family:inherit;
  line-height:1.6;
  resize:vertical;
}

/* ===== 送信成功ボタン ===== */

.ow-send-success{
  background:#22c55e !important;
  color:white !important;
  border:none !important;
  transform:scale(1.05);
  box-shadow:0 6px 18px rgba(34,197,94,0.4);
  transition:0.3s;
}

.ow-send-success::before{
  content:"✓ ";
  font-weight:900;
}

/* YouTube モーダル */
#videoModal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: none;           /* JSでblockにする */
  z-index: 100000;         /* lightboxより上 */
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* 中身のサイズ */
#videoFrame{
  width: min(960px, 92vw);
  height: calc(min(960px, 92vw) * 9 / 16);
  max-height: 80vh;
  border: 0;
  border-radius: 16px;
  background: #000;
}

/* 閉じるボタン */
#closeVideo{
  position: fixed;
  top: 16px;
  right: 20px;
  font-size: 34px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  user-select: none;
}

/* ===== 送信ボタンを派手に ===== */
#owSendBtn{
  width:100%;
  padding:16px 18px;
  border:none;
  border-radius:16px;
  font-size:1.1rem;
  font-weight:800;
  letter-spacing:0.02em;

  color:#fff;
  background:linear-gradient(135deg,#ff3b7a,#ff7a18);
  box-shadow:0 14px 30px rgba(255,72,64,0.28);
  cursor:pointer;

  transition:transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

#owSendBtn:hover{
  transform:translateY(-1px);
  filter:saturate(1.05);
  box-shadow:0 18px 40px rgba(255,72,64,0.34);
}

#owSendBtn:active{
  transform:translateY(0px) scale(0.99);
  box-shadow:0 10px 22px rgba(255,72,64,0.26);
}

#owSendBtn:disabled{
  opacity:.65;
  cursor:not-allowed;
  filter:grayscale(.2);
  box-shadow:none;
}

.agree-wrap{
  text-align:center;
  margin:20px 0;
  font-size:0.95rem;
  color:#555;
}

.agree-wrap a{
  color:#4f46e5;
  text-decoration:underline;
}

#orderBtn{
  display:block;
  margin:15px auto;
  padding:12px 26px;
  font-size:1rem;
  border:none;
  border-radius:8px;
  background:#4f46e5;
  color:white;
  cursor:pointer;
  opacity:.5;
  transition:.2s;
}

#orderBtn.enabled{
  opacity:1;
  cursor:pointer;
}

/* 同意チェック周りの余白を小さく */
.agree-wrap{
  margin: 10px 0 12px;   /* ←ここで空白が減る */
  text-align: center;
}

.agree-label{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: #555;
}

/* 既存送信ボタンの見た目（任意） */
#orderSubmit{
  opacity: .5;
  transition: .2s;
}

#orderSubmit.enabled{
  opacity: 1;
}


/* 成功表示（JSで緑にしてるので、それにも馴染む） */
#owSendBtn.ow-send-success{
  background:linear-gradient(135deg,#22c55e,#16a34a) !important;
  box-shadow:0 14px 30px rgba(34,197,94,0.28) !important;
}

.ow-send-note{
  margin:10px 0 12px;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(0,0,0,0.04);
  border:1px dashed rgba(0,0,0,0.18);
  font-size:0.92rem;
  line-height:1.6;
  color:rgba(0,0,0,0.7);
}
.ow-send-note strong{
  color:rgba(0,0,0,0.85);
}
