/* ==========================================================================
   Admin Management – admin.css
   管理画面用スタイル
   ========================================================================== */

/* --------------------------------------------------------------------------
   Admin color tokens
   -------------------------------------------------------------------------- */
:root {
  --color-admin-accent: #6366f1;
  --color-admin-danger: #dc2626;
  --color-admin-danger-hover: #b91c1c;
}

/* --------------------------------------------------------------------------
   Admin Layout (admin.html.erb)
   -------------------------------------------------------------------------- */
.c-admin-page {
  min-height: 100vh;
  background: #f9fafb;
}

.c-admin-layout {
  display: flex;
  min-height: 100vh;
}

/* --- Admin Dark Sidebar --- */
.c-admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #1f2937;
  color: #d1d5db;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 10;
  overflow-y: auto;
}

.c-admin-sidebar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  border-bottom: 1px solid #374151;
}

.c-admin-sidebar__logo-img {
  height: 24px;
  width: auto;
  filter: brightness(0) invert(1);
}

.c-admin-sidebar__logo-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  background: #4b5563;
  color: #e5e7eb;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.c-admin-sidebar__nav {
  flex: 1;
  padding: 12px 0;
}

.c-admin-sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 500;
  color: #9ca3af;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.c-admin-sidebar__link:hover {
  background: #374151;
  color: #f3f4f6;
}

.c-admin-sidebar__link--active {
  background: #374151;
  color: #fff;
  font-weight: 600;
}

.c-admin-sidebar__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.c-admin-sidebar__footer {
  border-top: 1px solid #374151;
  padding: 16px;
  margin-top: auto;
}

.c-admin-sidebar__email {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Admin Main Content --- */
.c-admin-main {
  flex: 1;
  margin-left: 240px;
  min-width: 0;
}

.c-admin-main-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* --------------------------------------------------------------------------
   Sidebar admin group label
   -------------------------------------------------------------------------- */
.u-text-admin {
  color: var(--color-admin-accent);
}

/* --------------------------------------------------------------------------
   Admin table
   -------------------------------------------------------------------------- */
.c-admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius-sm, 0.52rem);
  overflow: hidden;
  box-shadow: var(--shadow-md, 0 2px 8px -1px #00142812);
}

.c-admin-table th,
.c-admin-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--color-main-150, #ECE9E8);
}

.c-admin-table th {
  background: var(--color-main-50, #F8F7F7);
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

.c-admin-table td {
  color: #4b5563;
}

.c-admin-table tbody tr:last-child td {
  border-bottom: none;
}

.c-admin-table tbody tr:hover {
  background: var(--color-main-25, #FDFCFC);
}

/* --------------------------------------------------------------------------
   Admin form
   -------------------------------------------------------------------------- */
.c-admin-form {
  max-width: 560px;
  margin-top: 24px;
}

.c-admin-form__group {
  margin-bottom: 20px;
}

.c-admin-form__label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.c-admin-form__input {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9rem;
  border: 1px solid var(--color-main-150, #ECE9E8);
  border-radius: var(--radius-sm, 0.52rem);
  background: #fff;
  transition: border-color 0.15s;
}

.c-admin-form__input:focus {
  outline: none;
  border-color: var(--color-admin-accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* --------------------------------------------------------------------------
   Admin actions (button wrapper)
   -------------------------------------------------------------------------- */
.c-admin-actions {
  margin: 16px 0 24px;
}

/* --------------------------------------------------------------------------
   Danger button (delete)
   -------------------------------------------------------------------------- */
.c-admin-btn-danger {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #fff;
  background: var(--color-admin-danger);
  border: none;
  border-radius: var(--radius-sm, 0.52rem);
  cursor: pointer;
  transition: background 0.15s;
}

.c-admin-btn-danger:hover {
  background: var(--color-admin-danger-hover);
}

/* --------------------------------------------------------------------------
   Search bar
   -------------------------------------------------------------------------- */
.c-admin-search {
  margin-bottom: 1.5rem;
}

.c-admin-search__row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.c-admin-search__input {
  flex: 1;
  margin: 0;
}

.c-admin-search__btn {
  margin: 0;
  white-space: nowrap;
}

.c-admin-search__btn--secondary {
  background: var(--color-admin-secondary, #6b7280);
}

/* --------------------------------------------------------------------------
   Pagination wrapper
   -------------------------------------------------------------------------- */
.c-admin-pagination {
  margin-top: 1.5rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Admin Dashboard
   -------------------------------------------------------------------------- */
.c-admin-dashboard {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 0;
}

.c-admin-dashboard__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 0.25rem;
}

.c-admin-dashboard__subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 2rem;
}

/* --- Stat Cards --- */
.c-admin-dashboard__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .c-admin-dashboard__stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.c-admin-dashboard__stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.c-admin-dashboard__stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.c-admin-dashboard__stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #111;
  line-height: 1.2;
}

/* --- Panels (tables) --- */
.c-admin-dashboard__panels {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.c-admin-dashboard__panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}

.c-admin-dashboard__panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111;
  padding: 1rem 1.25rem;
  margin: 0;
  border-bottom: 1px solid #e5e7eb;
}

.c-admin-dashboard__table {
  width: 100%;
  border-collapse: collapse;
}

.c-admin-dashboard__table th,
.c-admin-dashboard__table td {
  padding: 0.75rem 1.25rem;
  text-align: left;
  font-size: 0.82rem;
  border-bottom: 1px solid #f3f4f6;
}

.c-admin-dashboard__table th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

.c-admin-dashboard__table td {
  color: #4b5563;
}

.c-admin-dashboard__table tbody tr:last-child td {
  border-bottom: none;
}

.c-admin-dashboard__table tbody tr:hover {
  background: #f9fafb;
}

.c-admin-dashboard__empty {
  text-align: center;
  color: #9ca3af;
  padding: 1.5rem;
}

.c-admin-dashboard__badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #f3f4f6;
  color: #374151;
}

/* --- Link Cards --- */
.c-admin-dashboard__links {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}

.c-admin-dashboard__links .c-admin-dashboard__panel-title {
  border-bottom: 1px solid #e5e7eb;
}

.c-admin-dashboard__link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1.25rem;
}

.c-admin-dashboard__link-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  text-decoration: none;
  color: #374151;
  font-size: 0.86rem;
  font-weight: 600;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.c-admin-dashboard__link-card:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.c-admin-dashboard__link-card svg {
  color: #6b7280;
  flex-shrink: 0;
}
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
}

:root {
  --color-primary: #ef4846;
  --color-primary-dark: #d93e3c;
  --color-primary-15: rgba(239, 72, 70, 0.15);
  --color-main-bg: #fff;
  --color-main-body-dark: #333;
  --color-main-body: #4d4a4a;
  --color-main-100: #f2f1f0;
  --color-main-200: #e6e7eb;
  --color-main-300: #d9dee5;
  --color-main-400: #c5c5c5;
  --color-main-550: #999;
  --color-main-600: #888;
  --color-main-50: #F8F7F7;
  --color-main-700: #777;
  --color-primary-bg: #fef2f2;
  --color-danger: #e13a43;
  --color-step-1: #ef4846;
  --color-step-2: #ef4846;
  --color-step-3: #ef4846;
  --color-step-4: #ef4846;
  --color-step-1-bg: linear-gradient(135deg, #FBDDDD, #FEEDED);
  --color-step-2-bg: linear-gradient(135deg, #FBDDDD, #FEEDED);
  --color-step-3-bg: linear-gradient(135deg, #FBDDDD, #FEEDED);
  --color-step-4-bg: linear-gradient(135deg, #FBDDDD, #FEEDED);
  --color-dot-pattern: rgb(255 180 180);
  --color-primary-ring: rgba(239, 72, 70, 0.2);
  --radius-icon: 32%;
  --radius-md: 0.65rem;
  --radius-mdlg: 0.75rem;
  --radius-lg: 0.85rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-3xl: 1.5rem;
  --shadow-sm: 0 2px 5px -2px #00142814;
  --font-base: 'Hiragino Sans', 'Noto Sans JP', sans-serif;
}

.ai-images-page-shell {
  min-height: 100vh;
  font-family: var(--font-base);
  color: var(--color-main-body);
  background: linear-gradient(135deg, #ffe8e8, #ffeDE4 50%, #fff5e0);
}

.ai-images-layout {
  display: flex;
  min-height: 100vh;
}

.c-sidebar {
  display: none;
  width: 298px;
  background: #fff;
  border-right: 1px solid var(--color-main-200);
  padding-top: 16px;
  position: sticky;
  top: 0;
  height: 100dvh;
  flex-shrink: 0;
  flex-direction: column;
}

.c-sidebar__logo {
  display: flex;
  align-items: center;
  padding: 0 20px;
  margin-left: 2px;
}

.c-sidebar__logo img {
  height: 28px;
}

.c-sidebar-nav {
  margin-top: 24px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 24px;
}

.c-sidebar-nav__link,
.c-sidebar-nav__logout {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius-xl);
  padding: 10px 12px;
  color: var(--color-main-700);
  font-size: 0.95rem;
  font-weight: 700;
  transition: background-color 200ms ease, color 200ms ease;
}

.c-sidebar-nav__link {
  text-decoration: none;
}

.c-sidebar-nav__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-main-550);
}

.c-sidebar-nav__link--active .c-sidebar-nav__icon {
  color: var(--color-primary);
}

.c-sidebar-subnav {
  padding-left: 36px;
  margin-top: 4px;
}

.c-sidebar-subnav__link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.81rem;
  font-weight: 400;
  padding: 4px 12px;
  color: var(--color-main-700);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background-color 200ms ease, color 200ms ease;
}

.c-sidebar-subnav__group + .c-sidebar-subnav__group {
  margin-top: 0;
}

.c-sidebar-subnav__group-label {
  display: block;
  padding: 12px 12px 2px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.4;
}

.c-sidebar-subnav__group:first-child .c-sidebar-subnav__group-label {
  padding-top: 4px;
}

.c-sidebar-subnav__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.u-text-step-1 { color: var(--color-step-1); }
.u-text-step-2 { color: var(--color-step-2); }
.u-text-step-3 { color: var(--color-step-3); }
.u-text-step-4 { color: var(--color-step-4); }

.c-sidebar-nav__link:hover,
.c-sidebar-nav__logout:hover {
  background: var(--color-main-100);
  color: var(--color-main-body);
}

.c-sidebar-subnav__link:hover {
  background: var(--color-main-100);
  color: var(--color-main-body);
}

.c-sidebar-nav__link--active,
.c-sidebar-subnav__link--active {
  background: var(--color-primary-bg);
  color: var(--color-primary-dark);
}

.c-sidebar-subnav__external {
  margin-left: auto;
  color: var(--color-main-400, #bbb);
  flex-shrink: 0;
}

.c-sidebar-nav__footer {
  border-top: 1px solid var(--color-main-200);
  padding: 12px 0 16px;
  margin-top: auto;
  flex-shrink: 0;
}

/* --- Sidebar Project Card --- */
.c-sidebar-project-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 0 0 8px;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 150ms ease;
}

.c-sidebar-project-card:hover {
  background-color: var(--color-main-100, #f5f0eb);
}

.c-sidebar-project-card--top {
  position: relative;
  margin-bottom: 16px;
}

.c-sidebar-project-card--top::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  border-bottom: 1px solid var(--color-main-100);
  pointer-events: none;
}

.c-sidebar-project-card__thumb {
  width: 56px;
  aspect-ratio: 4 / 3;
  height: auto;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-main-100);
}

.c-sidebar-project-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.c-sidebar-project-card__placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-main-100);
  display: flex;
  align-items: center;
  justify-content: center;
}

.c-sidebar-project-card__empty-state {
  gap: 0.125rem;
  padding: 0.125rem;
  text-align: center;
}

.c-sidebar-project-card__empty-state .c-imgcreator__empty-text {
  font-size: 0.6rem;
  font-weight: 600;
  line-height: 1.2;
}

.c-sidebar-project-card__title {
  flex: 1;
  min-width: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-main-body-dark);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.c-sidebar-nav__user-email {
  display: block;
  padding: 0 12px 8px;
  font-size: 0.75rem;
  color: var(--color-main-550);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-sidebar-nav__logout {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.c-mobile-header {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 0 16px;
}

.c-mobile-header__bar {
  max-width: 24rem;
  margin: 0 auto;
  border-radius: calc(var(--radius-mdlg) + 9.5px);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  padding: 8px 12px;
}

.c-mobile-header__menu-btn {
  border: none;
  background: transparent;
  color: var(--color-main-600);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background-color 150ms ease, color 150ms ease;
}

.c-mobile-header__menu-btn:hover {
  background: var(--color-main-100);
  color: var(--color-main-body);
}

.c-mobile-header__menu-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.c-mobile-header__menu-btn:active {
  background: var(--color-main-150);
}

.c-mobile-header__logo-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
}

.c-mobile-header__spacer {
  width: 32px;
}

.c-mobile-header__logo {
  height: 24px;
}

.c-mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 80;
}

.c-mobile-menu--open {
  opacity: 1;
  pointer-events: auto;
}

.c-mobile-menu__panel {
  width: min(88vw, 320px);
  height: 100%;
  background: #fff;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
}

.c-mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 6px 14px;
}

.c-mobile-menu__logo {
  height: 24px;
}

.c-mobile-menu__close {
  border: none;
  background: none;
  color: var(--color-main-600);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
}

.ai-images-main {
  flex: 1;
  min-width: 0;
  padding: 80px 0 48px;
  position: relative;
}

.ai-images-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(var(--color-dot-pattern) 1.4px, transparent 1.4px);
  background-size: 20px 20px;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.25), rgba(0,0,0,0.34) 40%, rgba(0,0,0,0.55) 82%, rgba(0,0,0,0.15));
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.25), rgba(0,0,0,0.34) 40%, rgba(0,0,0,0.55) 82%, rgba(0,0,0,0.15));
  pointer-events: none;
  z-index: 0;
}

.ai-images-main-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: 0 16px;
}

.ai-images-hero {
  margin-bottom: 18px;
  text-align: center;
}

.c-hero__icon {
  width: 68px;
  height: 68px;
  border-radius: 32%;
  object-fit: cover;
  outline: 6px solid var(--color-primary-ring);
}

.ai-images-title {
  margin: 0;
  font-size: 30px;
  color: var(--color-main-body-dark);
}

.ai-images-subtitle {
  margin: 6px 0 0;
  color: var(--color-main-700);
  font-size: 14px;
}

.c-imgcreator {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.c-imgcreator__panel {
  background-color: var(--color-main-bg, #fff);
  border-radius: calc(var(--radius-3xl) + 6px);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

.c-section-wrap {
  background-color: var(--color-main-bg, #fff);
  border-radius: calc(var(--radius-3xl) + 6px);
}

.c-section-wrap.c-section-wrap--result {
  background-color: var(--color-main-50);
  border: 4px solid #fff;
  padding: 6px;
  box-shadow: none;
}

.c-section-wrap--result-inner {
  padding: 0.75rem 0.875rem;
}

#ai-images-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#ai-images-form fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

/* --- Collapsible Toggle (任意項目用) --- */
.c-imgcreator__toggle {
  border: 1px solid var(--color-main-200);
  border-radius: var(--radius-xl);
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.c-imgcreator__toggle[open] {
  border-color: var(--color-main-300);
  box-shadow: var(--shadow-sm);
}

.c-imgcreator__toggle-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-main-body-dark);
  user-select: none;
  border-radius: var(--radius-xl);
  transition: background-color 150ms ease, border-radius 150ms ease;
}

.c-imgcreator__toggle-summary::-webkit-details-marker {
  display: none;
}

.c-imgcreator__toggle-summary:hover {
  background: var(--color-main-50);
}

.c-imgcreator__toggle-summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.c-imgcreator__toggle-summary::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-main-550);
  border-bottom: 2px solid var(--color-main-550);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 200ms ease;
}

.c-imgcreator__toggle[open] > .c-imgcreator__toggle-summary {
  /* 開いた時は下角を直角にし、ボディとの境界線で繋がる印象に */
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-bottom: 1px solid var(--color-main-150);
}

.c-imgcreator__toggle[open] > .c-imgcreator__toggle-summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

/* fieldset リセット (#ai-images-form fieldset { padding: 0 }) を上書きするため
   ID を含む高 specificity セレクタを使用 */
#ai-images-form fieldset.c-imgcreator__toggle-body {
  padding: 16px;
}

/* トグル内の最終子要素の下マージンを除去して余白の二重化を防ぐ */
.c-imgcreator__toggle-body > :last-child {
  margin-bottom: 0;
}

.c-imgcreator__section-label {
  display: block;
  margin-bottom: 8px;
  color: var(--color-main-body-dark);
  font-size: 14px;
  font-weight: 700;
}

.c-imgcreator__section-hint { color: var(--color-main-550); font-size: 12px; margin: 0 0 8px; }
.c-imgcreator__type-group { display: flex; flex-direction: column; gap: 8px; }
.c-imgcreator__type-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--color-main-200);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 0.7rem 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  cursor: pointer;
  transition: all 200ms ease;
  text-align: left;
}
.c-imgcreator__type-card:hover { border-color: var(--color-main-400); }
.c-imgcreator__type-card--active { border-color: var(--color-primary); background: var(--color-primary-bg); }
.c-imgcreator__type-card--active:hover { border-color: var(--color-primary-dark, var(--color-primary)); }
.c-imgcreator__type-ratio-icon { background: var(--color-main-200); border-radius: 3px; flex-shrink: 0; order: 1; transition: all 200ms ease; }
.c-imgcreator__type-card--active .c-imgcreator__type-ratio-icon { background: var(--color-step-2-bg, var(--color-primary-bg)); }
.c-imgcreator__type-ratio-icon--4x3 { width: 32px; height: 24px; }
.c-imgcreator__type-ratio-icon--16x9 { width: 36px; height: 20px; }
.c-imgcreator__type-ratio-icon--3x2 { width: 36px; height: 24px; }
.c-imgcreator__type-ratio-icon--1x1 { width: 26px; height: 26px; }
.c-imgcreator__type-body { flex: 1; display: flex; flex-direction: column; gap: 0.1rem; }
.c-imgcreator__type-name { font-size: 0.86rem; font-weight: 700; color: var(--color-main-body); transition: color 200ms ease; }
.c-imgcreator__type-ratio-badge { display: inline-block; font-size: 0.65rem; font-weight: 600; color: var(--color-main-600); background: var(--color-main-100); border-radius: 4px; padding: 0.05em 0.4em; margin-left: 0.15em; vertical-align: middle; line-height: 1.4; transition: color 200ms ease, background 200ms ease; }
.c-imgcreator__type-desc { font-size: 0.75rem; color: var(--color-main-600); line-height: 1.4; }
.c-imgcreator__type-card--active .c-imgcreator__type-name { color: var(--color-primary-dark, var(--color-primary)); }
.c-imgcreator__type-card--active .c-imgcreator__type-ratio-badge { color: var(--color-primary-dark, var(--color-primary)); }
.c-imgcreator__type-radio,
.c-imgcreator__style-radio,
.c-imgcreator__hidden-file-input { position: absolute; opacity: 0; width: 0; height: 0; }

.c-imgcreator__style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 640px) {
  .c-imgcreator__style-grid { grid-template-columns: repeat(4, 1fr); }
}
.c-imgcreator__style-card {
  border: 1.5px solid var(--color-main-200);
  border-radius: var(--radius-lg);
  background-color: var(--color-main-bg, #fff);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 0.25rem;
  cursor: pointer;
  transition: all 200ms ease;
}
.c-imgcreator__style-card:hover {
  border-color: var(--color-main-400);
  transform: translateY(-1px);
}
.c-imgcreator__style-card--active { border: 1.5px solid var(--color-primary); background: var(--color-primary-bg); }
.c-imgcreator__style-icon {
  width: 48px;
  height: 48px;
  border-radius: 0;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.c-imgcreator__style-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}
.c-imgcreator__style-label { font-size: 11px; color: var(--color-main-700); font-weight: 700; text-align: center; }
.c-imgcreator__textarea { width: 100%; max-width: 100%; min-height: 92px; border: 1.5px solid var(--color-main-300); border-radius: var(--radius-mdlg); padding: 10px; font: inherit; resize: vertical; box-sizing: border-box; }
.c-imgcreator__textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-15); }
.c-imgcreator__textarea-count { display: block; text-align: right; font-size: 12px; color: var(--color-main-550); margin-top: 4px; }
.c-imgcreator__textarea-count.warning { color: var(--color-danger); font-weight: 700; }

.c-imgcreator__textarea-wrap {
  position: relative;
}

.c-imgcreator__upload {
  border: 2px dashed var(--color-main-300);
  border-radius: var(--radius-xl);
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 6px;
  cursor: pointer;
  padding: 14px;
  background: rgba(77, 74, 74, 0.02);
}
.c-imgcreator__upload:hover,
.c-imgcreator__upload--dragover {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
}
.c-imgcreator__upload-icon { color: var(--color-main-550); }
.c-imgcreator__upload-text { font-size: 13px; color: var(--color-main-700); }
.c-imgcreator__upload-hint { font-size: 11px; color: var(--color-main-550); }
.c-imgcreator__upload-error {
  margin: 10px 0 0;
  border-left: 3px solid var(--color-danger);
  background: #fcf0f0;
  color: var(--color-danger);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 13px;
}
.c-imgcreator__upload-preview-row { display: none; gap: 10px; align-items: center; margin-top: 10px; }
.c-imgcreator__upload-preview { width: 80px; height: 80px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-main-200); }
.c-imgcreator__upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.c-imgcreator__upload-filename { font-size: 12px; color: var(--color-main-body); word-break: break-all; margin: 0; }
.c-imgcreator__upload-remove-btn { border: none; background: none; color: var(--color-main-600); text-decoration: underline; font-size: 12px; cursor: pointer; padding: 0; }

/* design system: atoms/button.css `.cs-btn.cs-btn-primary` 仕様に準拠
   - 旧 `c-cta-btn` クラス名は維持し、CSS 値だけを仕様に揃えている
   - width: 100% は後方互換のため例外的に保持（design system 的には .cs-btn-full 相当の挙動） */
.c-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  border-radius: 9999px;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 20px;
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
}
.c-cta-btn:hover { background: var(--color-primary-dark); text-decoration: none; }
.c-cta-btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.c-cta-btn:active:not(:disabled) { transform: translateY(1px); }
.c-cta-btn:disabled,
.c-cta-btn.is-disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.c-cta-btn[data-turbo-submits-with]:disabled {
  opacity: 1;
  cursor: wait;
}
.c-cta-btn[data-turbo-submits-with]:disabled::before {
  content: '';
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: c-cta-btn-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes c-cta-btn-spin {
  to { transform: rotate(360deg); }
}
.btn-spring {
  transition:
    transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-spring:hover:not(:disabled) { transform: scale(1.02); }
.btn-spring:active:not(:disabled) { transform: scale(0.97); }
.ai-images-reset {
  margin-top: 10px;
  width: 100%;
  border: 1.5px solid var(--color-main-300);
  border-radius: 9999px;
  background: #fff;
  color: var(--color-main-body);
  padding: 10px 12px;
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  transition:
    transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-images-reset:hover:not(:disabled) {
  background: var(--color-main-50);
  border-color: var(--color-main-500);
  transform: scale(1.02);
}

.ai-images-reset:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.ai-images-reset:active:not(:disabled) {
  transform: scale(0.97);
}

.ai-images-reset:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.ai-images-result {
  min-height: 460px;
}

.c-imgcreator__output-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.c-imgcreator__output-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-main-200);
  background: var(--color-main-100);
}
.c-imgcreator__output-item--16x9 { aspect-ratio: 16 / 9; }
.c-imgcreator__output-item--4x3 { aspect-ratio: 4 / 3; }
.c-imgcreator__output-item--3x2 { aspect-ratio: 3 / 2; }
.c-imgcreator__output-item--1x1 { aspect-ratio: 1 / 1; }
.c-imgcreator__output-item img { width: 100%; height: 100%; object-fit: cover; }

.c-imgcreator__empty-state {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-main-550);
  gap: 0.25rem;
}
.c-imgcreator__empty-icon { color: var(--color-main-400); }
.c-imgcreator__empty-text { font-size: 0.7rem; color: var(--color-main-550); }

.c-imgcreator__skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #f1f1f1 25%, #fbfbfb 50%, #f1f1f1 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.c-imgcreator__output-check-label { position: absolute; top: 8px; right: 8px; z-index: 2; width: 20px; height: 20px; }
.c-imgcreator__output-check {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.2);
  margin: 0;
  cursor: pointer;
}
.c-imgcreator__output-check:checked { background: var(--color-primary); border-color: var(--color-primary); }
.c-imgcreator__output-check-icon { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; color: #fff; opacity: 0; pointer-events: none; }
.c-imgcreator__output-check:checked + .c-imgcreator__output-check-icon { opacity: 1; }

.c-imgcreator__download-actions { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.c-imgcreator__download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-mdlg, 8px);
  cursor: pointer;
  transition: all 200ms ease;
  border: none;
}
.c-imgcreator__download-btn--selected { background-color: var(--color-primary); color: #fff; }
.c-imgcreator__download-btn--selected:hover { background-color: var(--color-primary-dark, var(--color-primary)); }
.c-imgcreator__download-btn--selected:disabled { background-color: var(--color-main-300); color: var(--color-main-550); cursor: not-allowed; }
.c-imgcreator__download-btn--all { background-color: var(--color-main-bg, #fff); color: var(--color-main-body); border: 1.5px solid var(--color-main-300); }
.c-imgcreator__download-btn--all:hover { border-color: var(--color-main-400); }

.c-section-wrap--result-inner .c-imgcreator__section-label {
  margin-bottom: 1rem;
}

.ai-images-error {
  border-radius: var(--radius-xl);
  border: 1px solid #f8d4d4;
  background: #fff6f6;
  color: var(--color-danger);
  padding: 14px;
}
.ai-images-error-title { margin: 0 0 8px; font-size: 16px; }
.ai-images-error-list { margin: 0; padding-left: 18px; }
.ai-images-error-list li { margin-bottom: 4px; font-size: 13px; }
.ai-images-error-message { margin: 0; font-size: 13px; line-height: 1.5; }

.c-hint-fab {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 70;
}
.c-hint-fab__btn {
  height: 2.75rem;
  padding: 0 1rem 0 0.5rem;
  gap: 0.35rem;
  border-radius: 9999px;
  border: none;
  background-color: var(--color-primary, #EF4846);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(239, 72, 70, 0.35);
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.c-hint-fab__btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(239, 72, 70, 0.45);
}
.c-hint-fab__btn-avatar { width: 24px; height: 24px; border-radius: 9999px; object-fit: cover; }
.c-hint-fab__modal {
  position: absolute;
  right: 0;
  bottom: 52px;
  width: min(90vw, 360px);
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  display: none;
}
.c-hint-fab__modal--visible { display: block; }
.c-hint-fab__modal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--color-main-200);
  padding: 10px 12px;
}

.c-hint-fab__modal-header-avatar {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
}

.c-hint-fab__modal-body {
  max-height: 320px;
  overflow-y: auto;
}
.c-hint-fab__modal-title {
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.c-hint-fab__close {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--color-main-600);
  display: flex;
  align-items: center;
  padding: 4px;
  flex-shrink: 0;
}
.c-hint-fab__faq-item + .c-hint-fab__faq-item { border-top: 1px solid var(--color-main-100); }
.c-hint-fab__faq-q {
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-main-body);
  cursor: pointer;
}

.c-hint-fab__faq-q-text {
  flex: 1;
}

.c-hint-fab__faq-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: var(--color-main-550);
}

.c-hint-fab__faq-item--open .c-hint-fab__faq-chevron {
  transform: rotate(90deg);
}

.c-hint-fab__faq-a-inner {
  padding: 0 12px 10px 34px;
  font-size: 12px;
  color: var(--color-main-700);
  line-height: 1.5;
}
.c-hint-fab__faq-a { display: none; }
.c-hint-fab__faq-a--open { display: block; }

@media (min-width: 1024px) {
  .c-sidebar { display: flex; }
  .c-mobile-header { display: none; }
  .ai-images-main { padding: 32px 0 48px; }
  .ai-images-main-inner { padding: 0 24px; }
  .c-imgcreator { grid-template-columns: 2fr 3fr; gap: 2rem; }
}
.cs-concept-main {
  flex: 1;
  min-width: 0;
  padding: 80px 0 48px;
  position: relative;
}

.cs-concept-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(var(--color-dot-pattern) 1.4px, transparent 1.4px);
  background-size: 20px 20px;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.25), rgba(0,0,0,0.34) 40%, rgba(0,0,0,0.55) 82%, rgba(0,0,0,0.15));
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.25), rgba(0,0,0,0.34) 40%, rgba(0,0,0,0.55) 82%, rgba(0,0,0,0.15));
  pointer-events: none;
  z-index: 0;
}

.cs-concept-main-inner {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: 0 16px;
}

.cs-concept-hero {
  text-align: center;
  margin-bottom: 24px;
}

.cs-concept-title {
  margin: 8px 0 0;
  font-size: 30px;
  line-height: 1.3;
  color: var(--color-main-body-dark);
}

.cs-concept-subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--color-main-700);
}

.cs-concept-section {
  margin-top: 18px;
  background: #fff;
  border-radius: calc(var(--radius-3xl) + 6px);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.cs-concept-section-title {
  margin: 0 0 12px;
  font-size: 18px;
  color: var(--color-main-body-dark);
}

.cs-concept-mode-grid {
  display: grid;
  gap: 12px;
}

.cs-concept-mode-card {
  border: 1px solid var(--color-main-200);
  border-radius: var(--radius-xl);
  background: #fff;
  text-align: left;
  padding: 16px;
  cursor: pointer;
}

.cs-concept-mode-card.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary-bg-lighter);
}

.cs-concept-mode-title {
  display: block;
  font-weight: 700;
  color: var(--color-main-body-dark);
}

.cs-concept-mode-desc {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--color-main-700);
}

.cs-concept-card-grid {
  display: grid;
  gap: 12px;
}

.cs-concept-card {
  border: 1px solid var(--color-main-200);
  border-radius: var(--radius-xl);
  background: #fff;
  padding: 16px;
}

.cs-concept-card-title {
  margin: 0;
  font-size: 16px;
  color: var(--color-main-body-dark);
}

.cs-concept-card-text {
  margin: 8px 0 0;
  line-height: 1.7;
  color: var(--color-main-body);
}

.cs-concept-chat {
  border: 1px solid var(--color-main-200);
  border-radius: var(--radius-xl);
  background: #fff;
  overflow: hidden;
}

.cs-concept-chat-log {
  padding: 16px;
  display: grid;
  gap: 10px;
  background: var(--color-main-50);
}

.cs-concept-chat-item {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  line-height: 1.6;
  max-width: 90%;
}

.cs-concept-chat-item.is-ai {
  background: #fff;
  border: 1px solid var(--color-main-200);
}

.cs-concept-chat-item.is-user {
  background: var(--color-primary-bg);
  justify-self: end;
}

.cs-concept-chat-form {
  border-top: 1px solid var(--color-main-200);
  padding: 12px;
  display: flex;
  gap: 8px;
}

.cs-concept-chat-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--color-main-300);
  border-radius: 8px;
  padding: 10px 12px;
}

.cs-concept-chat-submit {
  border: none;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 700;
  color: #fff;
  background: var(--color-primary);
}

@media (min-width: 1024px) {
  .cs-concept-main {
    padding: 32px 0 48px;
  }

  .cs-concept-main-inner {
    padding: 0 24px;
  }

  .cs-concept-mode-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cs-concept-card-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
/* ===========================
   Guide Page Styles
   =========================== */

.campfire-studio-guide-main {
  flex: 1;
  min-width: 0;
  padding: 80px 0 48px;
  position: relative;
}

.campfire-studio-guide-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(var(--color-dot-pattern) 1.4px, transparent 1.4px);
  background-size: 20px 20px;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.25), rgba(0,0,0,0.34) 40%, rgba(0,0,0,0.55) 82%, rgba(0,0,0,0.15));
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.25), rgba(0,0,0,0.34) 40%, rgba(0,0,0,0.55) 82%, rgba(0,0,0,0.15));
  pointer-events: none;
  z-index: 0;
}

.campfire-studio-guide-main-inner {
  max-width: 768px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: 0 16px;
}

.campfire-studio-guide-hero {
  text-align: center;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.campfire-studio-guide-hero .c-hero__icon {
  margin-bottom: 8px;
}

.campfire-studio-guide-title {
  margin: 8px 0 0;
  font-size: 30px;
  line-height: 1.3;
  color: var(--color-main-body-dark);
  font-weight: 700;
}

.campfire-studio-guide-subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--color-main-700);
}

.campfire-studio-guide-section {
  margin-top: 24px;
}

/* ================================
   SECTION WRAP
   ================================ */
.c-section-wrap {
  background-color: var(--color-main-bg);
  border-radius: calc(var(--radius-3xl) + 6px);
  padding: 6px;
  box-shadow: var(--shadow-sm);
}

.campfire-studio-guide-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  flex-wrap: wrap;
}

.campfire-studio-guide-step-info {
  flex: 1;
  min-width: 0;
}

.campfire-studio-guide-step-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.campfire-studio-guide-step-percent {
  font-size: 14px;
  font-weight: 700;
}

.campfire-studio-guide-step-content {
  margin-top: 4px;
  padding: 16px;
  border-radius: calc(var(--radius-3xl) - 2px);
  background-color: var(--color-primary-bg);
}

@media (min-width: 640px) {
  .campfire-studio-guide-step-header {
    flex-wrap: nowrap;
  }
  
  .campfire-studio-guide-step-progress {
    width: auto;
  }
}

/* ================================
   STEP CARD
   ================================ */
.c-step-card__number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  border-radius: var(--radius-mdlg);
  flex-shrink: 0;
}

.c-step-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-main-body-dark);
  margin: 0;
}

.c-step-card__desc {
  font-size: 12px;
  color: var(--color-main-700);
  margin: 2px 0 0;
}

/* ================================
   PROGRESS BAR
   ================================ */
.c-progress {
  width: 80px;
  height: 8px;
  background-color: var(--color-main-200);
  border-radius: 9999px;
  overflow: hidden;
}

.c-progress__fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 500ms ease;
}

/* ================================
   TOOL GROUP
   ================================ */
.c-tool-group {
  margin-top: 16px;
}

.c-tool-group:first-child {
  margin-top: 0;
}

.c-tool-group__label {
  display: inline-block;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.c-tool-group__label--required {
  color: var(--color-primary-dark);
}

.c-tool-group__label--optional {
  color: var(--color-main-550);
}

.campfire-studio-guide-tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 8px;
}

@media (min-width: 640px) {
  .campfire-studio-guide-tool-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ================================
   TOOL CARD
   ================================ */
.c-tool-card {
  background-color: #ffffff;
  border: none;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease;
  text-decoration: none;
  display: block;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.c-tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.c-tool-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.c-tool-card__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-icon);
  flex-shrink: 0;
}

.c-tool-card__icon svg {
  width: 20px;
  height: 20px;
}

.c-tool-card__title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-main-body-dark);
  margin: 0;
}

.c-tool-card__desc {
  font-size: 12px;
  color: var(--color-main-700);
  line-height: 1.6;
  margin: 0;
}

.c-tool-card__arrow {
  width: 16px;
  height: 16px;
  color: var(--color-main-400);
  transition: color 200ms ease, transform 200ms ease;
  flex-shrink: 0;
}

.c-tool-card:hover .c-tool-card__arrow {
  color: var(--color-main-600);
  transform: translateX(3px);
}

/* ================================
   STEP COLOR UTILITIES
   ================================ */
.u-text-step-1 {
  color: var(--color-step-1);
}

.u-text-step-2 {
  color: var(--color-step-2);
}

.u-text-step-3 {
  color: var(--color-step-3);
}

.u-text-step-4 {
  color: var(--color-step-4);
}

.u-bg-step-1 {
  background-color: var(--color-step-1);
}

.u-bg-step-2 {
  background-color: var(--color-step-2);
}

.u-bg-step-3 {
  background-color: var(--color-step-3);
}

.u-bg-step-4 {
  background-color: var(--color-step-4);
}

.u-bg-step-1-bg {
  background: var(--color-step-1-bg);
}

.u-bg-step-2-bg {
  background: var(--color-step-2-bg);
}

.u-bg-step-3-bg {
  background: var(--color-step-3-bg);
}

.u-bg-step-4-bg {
  background: var(--color-step-4-bg);
}

.u-text-primary-dark {
  color: var(--color-primary-dark);
}

.u-bg-primary-bg {
  background-color: var(--color-primary-bg);
}

/* ================================
   RESPONSIVE
   ================================ */
@media (min-width: 1024px) {
  .campfire-studio-guide-main {
    padding: 32px 0 48px;
  }

  .campfire-studio-guide-main-inner {
    padding: 0 24px;
  }
}
.campfire-studio-page {
  min-height: 100vh;
  font-family: var(--font-base);
  color: var(--color-main-body);
  background: linear-gradient(135deg, #ffe8e8, #ffede4 50%, #fff5e0);
}

.campfire-studio-layout {
  display: flex;
  min-height: 100vh;
}

.campfire-studio-main {
  flex: 1;
  min-width: 0;
  padding: 80px 0 48px;
  position: relative;
}

.campfire-studio-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(var(--color-dot-pattern) 1.4px, transparent 1.4px);
  background-size: 20px 20px;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.25), rgba(0,0,0,0.34) 40%, rgba(0,0,0,0.55) 82%, rgba(0,0,0,0.15));
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.25), rgba(0,0,0,0.34) 40%, rgba(0,0,0,0.55) 82%, rgba(0,0,0,0.15));
  pointer-events: none;
  z-index: 0;
}

.campfire-studio-main-inner {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: 0 16px;
}

.campfire-studio-hero {
  text-align: center;
  margin-bottom: 24px;
}

.campfire-studio-title {
  margin: 8px 0 0;
  font-size: 30px;
  line-height: 1.3;
  color: var(--color-main-body-dark);
}

.campfire-studio-subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--color-main-700);
}

.campfire-studio-section {
  margin-top: 18px;
  background: #fff;
  border-radius: calc(var(--radius-3xl) + 6px);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.campfire-studio-overview {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.campfire-studio-thumbnail {
  width: 128px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-main-100);
}

.campfire-studio-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.campfire-studio-summary-card {
  flex: 1;
  min-width: 0;
  border-radius: var(--radius-2xl);
  background: var(--color-primary-bg);
  padding: 14px 16px;
}

.campfire-studio-project-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--color-main-body-dark);
  font-weight: 700;
}

.campfire-studio-project-summary {
  margin: 8px 0 0;
  color: var(--color-main-700);
  font-size: 12px;
  line-height: 1.6;
}

.campfire-studio-ai-message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--color-main-200);
  border-radius: var(--radius-2xl);
  padding: 16px;
}

.campfire-studio-ai-avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  overflow: hidden;
  flex-shrink: 0;
}

.campfire-studio-ai-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.campfire-studio-ai-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  color: var(--color-main-body-dark);
}

.campfire-studio-ai-badge {
  display: inline-block;
  border-radius: 9999px;
  background: linear-gradient(120deg, #EF4846, #FAC75A);
  color: #fff;
  font-size: 10px;
  padding: 2px 7px;
  line-height: 1.1;
}

.campfire-studio-ai-text {
  margin: 8px 0 0;
  color: var(--color-main-body);
  font-size: 14px;
  line-height: 1.7;
}

.campfire-studio-progress-wrap {
  margin-top: 12px;
  border-radius: var(--radius-2xl);
  background: var(--color-primary-bg);
  padding: 16px;
}

.campfire-studio-progress-title {
  margin: 0 0 12px;
  font-size: 18px;
  color: var(--color-main-body-dark);
}

.campfire-studio-progress-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.campfire-studio-step-card {
  position: relative;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--color-main-200);
  background: #fff;
  padding: 14px;
}

.campfire-studio-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.campfire-studio-step-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-main-body-dark);
  font-size: 14px;
  font-weight: 700;
}

.campfire-studio-step-badge {
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  background: var(--color-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.campfire-studio-step-percent {
  color: var(--color-main-body-dark);
  font-size: 14px;
  font-weight: 700;
}

.campfire-studio-progress-bar {
  margin-top: 10px;
  width: 100%;
  height: 8px;
  border-radius: 9999px;
  overflow: hidden;
  background: var(--color-main-200);
}

.campfire-studio-progress-fill {
  height: 100%;
  background: var(--color-primary);
}

/* スマホ幅ではサムネイル(固定128px)とテキストの横並びだと
   テキスト領域が狭くなりすぎるため、縦積みに切り替える。 */
@media (max-width: 639px) {
  .campfire-studio-overview {
    flex-direction: column;
  }

  .campfire-studio-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}

@media (min-width: 640px) {
  .campfire-studio-progress-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .campfire-studio-main {
    padding: 32px 0 48px;
  }

  .campfire-studio-main-inner {
    padding: 0 24px;
  }
}
.cs-review-main {
  flex: 1;
  min-width: 0;
  padding: 80px 0 48px;
  position: relative;
}

.cs-review-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(var(--color-dot-pattern) 1.4px, transparent 1.4px);
  background-size: 20px 20px;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.25), rgba(0,0,0,0.34) 40%, rgba(0,0,0,0.55) 82%, rgba(0,0,0,0.15));
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.25), rgba(0,0,0,0.34) 40%, rgba(0,0,0,0.55) 82%, rgba(0,0,0,0.15));
  pointer-events: none;
  z-index: 0;
}

.cs-review-main-inner {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: 0 16px;
}

.cs-review-hero {
  text-align: center;
  margin-bottom: 24px;
}

.cs-review-title {
  margin: 8px 0 0;
  font-size: 30px;
  line-height: 1.3;
  color: var(--color-main-body-dark);
}

.cs-review-subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--color-main-700);
}

.cs-review-section {
  margin-top: 18px;
  background: #fff;
  border-radius: calc(var(--radius-3xl) + 6px);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.cs-review-score {
  display: grid;
  gap: 10px;
}

.cs-review-score-badge {
  display: inline-block;
  background: var(--color-primary-bg);
  color: var(--color-primary-dark);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
}

.cs-review-score-text {
  margin: 0;
  line-height: 1.7;
}

.cs-review-section-title {
  margin: 0 0 12px;
  font-size: 18px;
  color: var(--color-main-body-dark);
}

.cs-review-grid {
  display: grid;
  gap: 10px;
}

.cs-review-card {
  border: 1px solid var(--color-main-200);
  border-radius: 12px;
  padding: 14px;
}

.cs-review-card h3 {
  margin: 0;
  font-size: 15px;
  color: var(--color-main-body-dark);
}

.cs-review-card p {
  margin: 8px 0 0;
  color: var(--color-main-700);
}

.cs-review-advice {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  line-height: 1.7;
}

@media (min-width: 1024px) {
  .cs-review-main {
    padding: 32px 0 48px;
  }

  .cs-review-main-inner {
    padding: 0 24px;
  }

  .cs-review-grid {
    grid-template-columns: 1fr 1fr;
  }
}
/* ==========================================================================
   Reward Planning Tool – reward.css
   Comprehensive styles for the reward planning (リターンアイデア出し) tool.
   ========================================================================== */

/* Design-token fallbacks (not defined in ai_images.css) */
:root {
  --color-main-25: #FDFCFC;
  --color-main-50: #F8F7F7;
  --color-main-75: #F5F4F3;
  --color-main-150: #ECE9E8;
  --color-main-500: #ABABAB;
  --radius-sm: 0.52rem;
  --shadow-md: 0 2px 8px -1px #00142812;

  /* Reward-specific tokens */
  --color-reward-ai-bg: #FFFBF0;
  --color-reward-target-bg-start: #FFF7ED;
  --color-reward-target-bg-mid: #FFEDD5;
  --color-reward-target-bg-end: #FEF3C7;
  --color-reward-target-text: #9A3412;
  --color-reward-target-icon: #EA580C;
  --color-reward-target-badge-text: #92400E;

  /* Option plans selection step (reward_option_plans#index) */
  --color-reward-option-plans-surface: #ffffff;
  --color-reward-option-plans-axis-border: var(--color-main-150);
  /* Card resting border (non-selected); slightly neutral vs wrapper axis border */
  --color-reward-option-plans-card-border: #e5e5e5;
  --shadow-reward-option-plans-wrapper: 0 4px 28px -6px rgba(0, 20, 40, 0.09), 0 2px 10px -4px rgba(0, 20, 40, 0.05);
  --shadow-reward-option-plans-card: 0 1px 2px rgba(0, 20, 40, 0.045);
  --shadow-reward-option-plans-card-hover: 0 4px 18px rgba(0, 20, 40, 0.07);
  --color-reward-badge-source-ai-text: #1d4ed8;
  --color-reward-badge-source-ai-bg: #eff6ff;
  --color-reward-badge-source-ai-border: rgba(59, 130, 246, 0.38);
  --color-reward-badge-source-manual-text: #b91c1c;
  --color-reward-badge-source-manual-bg: #fef2f2;
  --color-reward-badge-source-manual-border: rgba(239, 72, 70, 0.32);
}

/* --------------------------------------------------------------------------
   Part A: Page-level layout
   -------------------------------------------------------------------------- */

.cs-reward-main {
  flex: 1;
  min-width: 0;
  padding: 80px 0 48px;
  position: relative;
}

.cs-reward-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(var(--color-dot-pattern) 1.4px, transparent 1.4px);
  background-size: 20px 20px;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.25), rgba(0,0,0,0.34) 40%, rgba(0,0,0,0.55) 82%, rgba(0,0,0,0.15));
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.25), rgba(0,0,0,0.34) 40%, rgba(0,0,0,0.55) 82%, rgba(0,0,0,0.15));
  pointer-events: none;
  z-index: 0;
}

.cs-reward-main-inner {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: 0 16px;
}

.cs-reward-hero {
  text-align: center;
  margin-bottom: 24px;
}

.cs-reward-title {
  margin: 8px 0 0;
  font-size: 30px;
  line-height: 1.3;
  color: var(--color-main-body-dark);
}

.cs-reward-subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--color-main-700);
}


/* --------------------------------------------------------------------------
   Part A2: Shared component classes (ported from prototype)
   -------------------------------------------------------------------------- */

/* Screen toggling: hidden screens (doubled selector for specificity) */
.c-concept-screen--hidden.c-concept-screen--hidden {
  display: none;
}

/* Content card wrapper */
.c-concept-mode-wrapper {
  background-color: var(--color-main-bg);
  border-radius: calc(var(--radius-3xl) + 8px);
  padding: 3rem 1.25rem;
  box-shadow: var(--shadow-md);
}

/* Option plans selection — wrapper scoped to reward_option_plans#index only */
.c-concept-mode-wrapper--option-plans {
  background: linear-gradient(180deg, var(--color-main-bg) 0%, var(--color-main-25) 100%);
  border: 1px solid var(--color-reward-option-plans-axis-border);
  box-shadow: var(--shadow-reward-option-plans-wrapper);
  padding: 2.5rem 1.5rem 2.25rem;
}

@media (min-width: 640px) {
  .c-concept-mode-wrapper--option-plans {
    padding: 2.75rem 2rem 2.5rem;
  }
}

.c-concept-mode-wrapper--option-plans .c-reward-section-title {
  /* font-size / font-weight / letter-spacing / line-height はブレスト画面と統一するため
     base `.c-reward-section-title` (font-size: 1.125rem, font-weight: 700) に委ねる */
  margin-bottom: 1rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.c-concept-mode-wrapper--option-plans .c-reward-ai-message {
  max-width: 42rem;
  margin-bottom: 1.75rem;
  gap: 0.875rem;
}

.c-concept-mode-wrapper--option-plans .c-reward-ai-message__avatar {
  width: 2.875rem;
  height: 2.875rem;
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.c-concept-mode-wrapper--option-plans .c-reward-ai-message__text {
  background: var(--color-reward-ai-bg);
  border-color: #f0e0bc;
  box-shadow: 0 1px 3px rgba(0, 20, 40, 0.05);
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.65;
}

.c-concept-mode-wrapper--option-plans .c-reward-ai-message__text::before {
  border-right-color: #f0e0bc;
}

.c-concept-mode-wrapper--option-plans .c-reward-ai-message__text::after {
  border-right-color: var(--color-reward-ai-bg);
}

.c-concept-mode-wrapper--option-plans .c-reward-cta-wrap {
  margin-top: 2rem;
  padding-top: 0.25rem;
}

/* Back navigation button */
.c-concept-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-main-700);
  background-color: var(--color-main-bg);
  border: 1.5px solid var(--color-main-200);
  border-radius: 9999px;
  cursor: pointer;
  font-family: inherit;
  transition: all 200ms ease;
  text-decoration: none;
}

.c-concept-back-btn:hover {
  color: var(--color-main-body);
  border-color: var(--color-main-400);
  background-color: var(--color-main-75);
}

.c-concept-back-btn svg {
  width: 16px;
  height: 16px;
}

/* Hint FAB – full prototype override (scoped to --primary variant) */

.c-hint-fab--primary .c-hint-fab__btn-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
}

.c-hint-fab--primary .c-hint-fab__btn {
  height: 2.75rem;
  padding: 0 1rem 0 0.5rem;
  gap: 0.35rem;
  border-radius: 9999px;
  border: none;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-base);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(239, 72, 70, 0.35);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.c-hint-fab--primary .c-hint-fab__btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(239, 72, 70, 0.45);
}

/* Modal */
.c-hint-fab--primary .c-hint-fab__modal {
  position: absolute;
  bottom: calc(100% + 0.75rem);
  right: 0;
  width: 320px;
  background: var(--color-main-bg);
  border-radius: var(--radius-lg, 1rem);
  border: 1px solid var(--color-main-200);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  padding: 1.25rem;
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms ease;
  pointer-events: none;
}

.c-hint-fab--primary .c-hint-fab__modal--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Arrow pointing down to the FAB */
.c-hint-fab--primary .c-hint-fab__modal::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 1.1rem;
  width: 12px;
  height: 12px;
  background: var(--color-main-bg);
  border-right: 1px solid var(--color-main-200);
  border-bottom: 1px solid var(--color-main-200);
  transform: rotate(45deg);
}

/* Modal header */
.c-hint-fab--primary .c-hint-fab__modal-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  border-bottom: none;
  padding: 0;
}

.c-hint-fab--primary .c-hint-fab__close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--color-main-500);
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  transition: color 150ms ease, background 150ms ease;
}

.c-hint-fab--primary .c-hint-fab__close:hover {
  color: var(--color-main-body);
  background: var(--color-main-100);
}

.c-hint-fab--primary .c-hint-fab__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
}

.c-hint-fab--primary .c-hint-fab__modal-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-main-body-dark);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.c-hint-fab--primary .c-hint-fab__modal-title svg {
  color: var(--color-primary);
}

/* Modal body */
.c-hint-fab--primary .c-hint-fab__modal-body {
  max-height: 60vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* FAQ */
.c-hint-fab--primary .c-hint-fab__faq {
  display: flex;
  flex-direction: column;
}

.c-hint-fab--primary .c-hint-fab__faq-item {
  border-bottom: 1px solid var(--color-main-150, #f0ebe6);
}

.c-hint-fab--primary .c-hint-fab__faq-item + .c-hint-fab__faq-item {
  border-top: none;
}

.c-hint-fab--primary .c-hint-fab__faq-item:last-child {
  border-bottom: none;
}

.c-hint-fab--primary .c-hint-fab__faq-q {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-base);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-main-body-dark);
  text-align: left;
  justify-content: flex-start;
  transition: color 150ms ease;
}

.c-hint-fab--primary .c-hint-fab__faq-q:hover {
  color: var(--color-primary);
}

.c-hint-fab--primary .c-hint-fab__faq-q[aria-expanded="true"] {
  color: var(--color-primary);
}

.c-hint-fab--primary .c-hint-fab__faq-chevron {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  color: var(--color-main-400);
  transition: transform 200ms ease, color 200ms ease;
}

.c-hint-fab--primary .c-hint-fab__faq-q[aria-expanded="true"] .c-hint-fab__faq-chevron {
  transform: rotate(90deg);
  color: var(--color-primary);
}

.c-hint-fab--primary .c-hint-fab__faq-q-text {
  flex: 1;
}

.c-hint-fab--primary .c-hint-fab__faq-a {
  display: block;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0;
  transition: max-height 200ms ease, opacity 200ms ease;
}

.c-hint-fab--primary .c-hint-fab__faq-a--open {
  max-height: 12rem;
  opacity: 1;
}

.c-hint-fab--primary .c-hint-fab__faq-a-inner {
  padding: 0 0 0.7rem 1.5rem;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--color-main-body);
}

@media (prefers-reduced-motion: reduce) {
  .c-hint-fab--primary .c-hint-fab__faq-chevron,
  .c-hint-fab--primary .c-hint-fab__faq-a {
    transition: none;
  }
}

@media (max-width: 480px) {
  .c-hint-fab--primary .c-hint-fab__modal {
    width: 280px;
    right: -0.25rem;
  }
}

/* --------------------------------------------------------------------------
   Part B: Page header & section titles (replacing Tailwind utilities)
   -------------------------------------------------------------------------- */

.c-reward-page-header {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.c-reward-page-title {
  font-weight: 700;
  font-size: 1.875rem;
  color: var(--color-main-body-dark);
}

.c-reward-page-subtitle {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: var(--color-main-700);
}

.c-reward-section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-main-body-dark);
  text-align: center;
  margin-bottom: 0.5rem;
}

.c-reward-section-desc {
  font-size: 0.875rem;
  color: var(--color-main-500);
  text-align: center;
  margin-bottom: 2rem;
}


/* --------------------------------------------------------------------------
   Part C: Intro screen – Step items
   -------------------------------------------------------------------------- */

.c-reward-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* CSS Grid 構成:
   row 1 = ナンバー●(列1) + タイトル(列2) — どちらも align-self:center で水平中央線が一致
   row 2 = 説明文(列2のみ) — タイトルと同じ x 位置から始まる
   `.c-reward-step-content` は `display:contents` で透過し、子(title/desc)が直接 grid item になる */
.c-reward-step-item {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-mdlg);
  border: 1px solid var(--color-main-100);
  transition: all 0.2s;
}

.c-reward-step-item:hover {
  background: rgba(255,255,255,0.9);
  border-color: var(--color-main-200);
}

.c-reward-step-num {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}

.c-reward-step-content {
  display: contents;
}

.c-reward-step-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-main-body-dark);
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}

.c-reward-step-desc {
  font-size: 0.86rem;
  color: var(--color-main-body);
  margin-top: 0.25rem;
  line-height: 1.5;
  grid-column: 2;
  grid-row: 2;
}


/* --------------------------------------------------------------------------
   Part D: Axis Input Sections (Brainstorm)
   -------------------------------------------------------------------------- */

.c-reward-axis-group {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}

.c-reward-axis-group--option-plans {
  max-width: min(100%, 60rem);
  gap: 1.5rem;
}

.c-reward-axis-card {
  background-color: var(--color-main-50);
  border-radius: var(--radius-2xl);
  padding: 1.5rem;
}

.c-reward-axis-group--option-plans .c-reward-axis-card--option-plan {
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.c-reward-option-axis-section {
  display: grid;
  gap: 0.75rem;
}

.c-reward-option-axis-section__title {
  margin-bottom: 0;
}

.c-reward-option-axis-section__title .c-reward-axis-label {
  font-size: 1rem;
}

.c-reward-option-axis-section__title .c-reward-axis-sublabel {
  margin-left: 0.125rem;
}

.c-reward-option-axis-section__content {
  border: 1px solid var(--color-main-100);
  border-radius: var(--radius-mdlg);
  background: rgba(255, 255, 255, 0.72);
  padding: 0.875rem;
}

.c-reward-axis-group--option-plans .c-reward-option-axis-section__content {
  border: none;
  background: transparent;
  padding: 0;
}

.c-reward-axis-group--option-plans .c-reward-option-axis-section__title .c-reward-axis-label {
  font-size: 1.0625rem;
}

.c-reward-axis-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1rem;
}

.c-reward-axis-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-mdlg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Axis icon color modifiers */
.c-reward-axis-icon--koto {
  background: rgba(99,102,241,0.1);
}

.c-reward-axis-icon--koto svg {
  color: #6366F1;
}

.c-reward-axis-icon--mono {
  background: rgba(245,158,11,0.1);
}

.c-reward-axis-icon--mono svg {
  color: #F59E0B;
}

.c-reward-axis-icon--omoi {
  background: rgba(239,72,70,0.1);
}

.c-reward-axis-icon--omoi svg {
  color: var(--color-primary);
}

.c-reward-axis-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-main-body-dark);
}

.c-reward-axis-sublabel {
  font-size: 0.81rem;
  color: var(--color-main-600);
  margin-left: 0.5rem;
  font-weight: 400;
}

.c-reward-axis-header__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
}

.c-reward-axis-header__body .c-reward-axis-label,
.c-reward-axis-header__body .c-reward-axis-sublabel {
  display: block;
  margin-left: 0;
}

.c-reward-axis-error {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.3rem;
  margin: 0 0 0.5rem;
  color: var(--color-danger, var(--color-primary));
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
}

.c-reward-axis-card--has-error {
  outline: 1.5px solid rgba(239, 72, 70, 0.35);
  outline-offset: -1.5px;
}

.c-reward-axis-textarea {
  width: 100%;
  min-height: 80px;
  border: 1.5px solid var(--color-main-200);
  border-radius: var(--radius-mdlg);
  padding: 0.75rem 1rem;
  font-size: 0.91rem;
  line-height: 1.6;
  color: var(--color-main-body-dark);
  background: #fff;
  resize: vertical;
  font-family: inherit;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.c-reward-axis-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(239,72,70,0.1);
}

.c-reward-axis-textarea::placeholder {
  color: var(--color-main-400);
}

.c-reward-axis-textarea--error {
  border-color: var(--color-primary);
  background: rgba(239, 72, 70, 0.03);
}

.c-reward-axis-textarea--error:focus {
  box-shadow: 0 0 0 3px rgba(239, 72, 70, 0.2);
}

/* --------------------------------------------------------------------------
   Part E: Target Audience Block
   -------------------------------------------------------------------------- */

.c-reward-target-audience {
  background: linear-gradient(135deg, var(--color-reward-target-bg-start) 0%, var(--color-reward-target-bg-mid) 50%, var(--color-reward-target-bg-end) 100%);
  border-radius: var(--radius-2xl);
  padding: 1rem 1.25rem;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.c-reward-target-audience__header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
}

.c-reward-target-audience__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-mdlg);
  background: rgba(234,88,12,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.c-reward-target-audience__icon svg {
  color: var(--color-reward-target-icon);
}

.c-reward-target-audience__title {
  font-weight: 700;
  font-size: 0.91rem;
  color: var(--color-main-body-dark);
}

.c-reward-target-audience__subtitle {
  font-size: 0.81rem;
  color: var(--color-reward-target-text);
}

.c-reward-target-audience__list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.c-reward-target-card {
  background: rgba(255,255,255,0.85);
  border-radius: var(--radius-mdlg);
  padding: 0.75rem 1rem;
}

.c-reward-target-card__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
}

.c-reward-target-card__emoji {
  font-size: 1.05rem;
}

.c-reward-target-card__name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-main-body-dark);
  letter-spacing: 0.02em;
}

.c-reward-target-card__desc {
  font-size: 0.86rem;
  color: var(--color-main-body);
  line-height: 1.7;
  letter-spacing: 0.02em;
  margin: 0;
}

.c-reward-target-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  font-size: 0.75rem;
  color: var(--color-reward-target-text);
  line-height: 1.5;
}

.c-reward-target-tip__avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
}

.c-reward-target-tip__bubble {
  position: relative;
  flex: 1;
  min-width: 0;
  background: var(--color-reward-ai-bg);
  border: 1px solid #f0e0bc;
  border-radius: var(--radius-mdlg);
  padding: 0.625rem 0.875rem;
}

/* 吹き出しのしっぽ (avatar 側を指す) */
.c-reward-target-tip__bubble::before {
  content: '';
  position: absolute;
  top: 10px;
  left: -8px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 8px solid #f0e0bc;
}

.c-reward-target-tip__bubble::after {
  content: '';
  position: absolute;
  top: 11px;
  left: -6px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 6px solid var(--color-reward-ai-bg);
}

.c-reward-target-tip__label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-main-body-dark);
}

.c-reward-target-tip__badge {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #EF4846, #FAC75A);
  color: #fff;
  padding: 1px 6px;
  border-radius: 9999px;
}

.c-reward-target-tip__text {
  margin: 0;
  font-size: 0.86rem;
  color: var(--color-main-body);
  line-height: 1.7;
  letter-spacing: 0.02em;
}


/* --------------------------------------------------------------------------
   Part F: Idea Cards (Selection screen)
   -------------------------------------------------------------------------- */

.c-reward-idea-section {
  margin-bottom: 2rem;
}

.c-reward-idea-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-main-body-dark);
  margin-bottom: 0.75rem;
}

.c-reward-idea-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 0.75rem;
}

.c-reward-add-idea-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  border: 2px dashed var(--color-main-200);
  border-radius: var(--radius-mdlg);
  background: transparent;
  color: var(--color-main-400);
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.c-reward-add-idea-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.c-reward-idea-card {
  position: relative;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-mdlg);
  border: 1.5px solid var(--color-main-100);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.c-reward-idea-card:hover {
  border-color: var(--color-main-200);
  background: rgba(255,255,255,0.95);
}

.c-reward-idea-card.is-selected {
  border-color: var(--color-primary);
  background: rgba(239,72,70,0.04);
}

.c-reward-idea-card__checkbox {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-main-200);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.c-reward-idea-card.is-selected .c-reward-idea-card__checkbox {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.c-reward-idea-card__name {
  font-weight: 700;
  font-size: 0.91rem;
  color: var(--color-main-body-dark);
  padding-right: 1.5rem;
}

.c-reward-idea-card__desc {
  font-size: 0.81rem;
  color: var(--color-main-500);
  margin-top: 0.375rem;
  line-height: 1.5;
}

.c-reward-idea-card__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  margin-top: 0.5rem;
}

.c-reward-idea-card__badge--user {
  background: var(--color-main-50);
  color: var(--color-main-500);
}

.c-reward-idea-card__badge--ai {
  background: rgba(239,72,70,0.08);
  color: var(--color-primary);
}

.c-reward-idea-card__badge--target {
  background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(245,158,11,0.15));
  color: var(--color-reward-target-badge-text);
  margin-left: 0.25rem;
}

/* New idea card inline input styles */
.c-reward-idea-card__name-input {
  width: 100%;
  border: none;
  border-bottom: 1px dashed var(--color-main-200);
  background: transparent;
  font-family: inherit;
  font-size: 0.91rem;
  font-weight: 600;
  color: var(--color-main-body-dark);
  padding: 0.25rem 0;
  outline: none;
}

.c-reward-idea-card__desc-input {
  width: 100%;
  border: none;
  border-bottom: 1px dashed transparent;
  background: transparent;
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--color-main-500);
  padding: 0.25rem 0;
  margin-top: 0.375rem;
  outline: none;
}

.c-reward-idea-card__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.c-reward-idea-save-btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-family: inherit;
  color: #fff;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.c-reward-idea-cancel-btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-family: inherit;
  color: var(--color-main-500);
  background: transparent;
  border: 1px solid var(--color-main-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
}


/* Idea card check SVG – hidden by default, visible when selected */
.c-reward-idea-card__check-svg {
  display: none;
}

.c-reward-idea-card.is-selected .c-reward-idea-card__check-svg {
  display: block;
  color: #fff;
}

/* Idea section title dot */
.c-reward-idea-section-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Part G: Pricing Table
   -------------------------------------------------------------------------- */

.c-reward-pricing-wrap {
  max-width: 800px;
  margin: 0 auto;
  overflow-x: auto;
}

/* Confirm screen: toggleable card list */
.c-reward-confirm-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 1.5rem;
  max-width: 800px;
  display: grid;
  gap: 0.75rem;
}

.c-reward-confirm-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--color-main-100);
  border-radius: var(--radius-mdlg);
  box-shadow: var(--shadow-reward-option-plans-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.c-reward-confirm-card__details {
  margin: 0;
}

.c-reward-confirm-card__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  user-select: none;
  border-radius: inherit;
}

.c-reward-confirm-card__summary::-webkit-details-marker {
  display: none;
}

.c-reward-confirm-card__summary:hover {
  background: var(--color-main-50);
}

.c-reward-confirm-card__summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.c-reward-confirm-card__title-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex: 1;
  min-width: 0;
}

.c-reward-confirm-card__title {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--color-main-body-dark);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-reward-confirm-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.c-reward-confirm-card__price {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.c-reward-confirm-card .c-reward-category-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
  line-height: 1.4;
}

.c-reward-confirm-card__chevron {
  color: var(--color-main-500);
  transition: transform 180ms ease;
  flex-shrink: 0;
}

.c-reward-confirm-card__details[open] .c-reward-confirm-card__chevron {
  transform: rotate(180deg);
}

.c-reward-confirm-card__details[open] .c-reward-confirm-card__summary {
  border-bottom: 1px solid var(--color-main-100);
}

.c-reward-confirm-card__body {
  padding: 0.875rem 1.125rem 1rem;
  display: grid;
  gap: 0.625rem;
}

.c-reward-confirm-card__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--color-main-600);
  white-space: pre-wrap;
}

.c-reward-confirm-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.c-reward-confirm-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.c-reward-confirm-card__copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 0.875rem;
  border: 1.5px solid var(--color-main-300, #ccc);
  border-radius: 9999px;
  background-color: transparent;
  color: var(--color-main-body, #333);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.c-reward-confirm-card__copy-btn:hover {
  background-color: var(--color-main-100, #f5f5f5);
  border-color: var(--color-main-400, #999);
}

.c-reward-confirm-card__copy-btn:active {
  transform: scale(0.97);
}

.c-reward-confirm-card__copy-btn--copied {
  border-color: #43a047;
  color: #43a047;
}

.c-reward-confirm-card__copy-btn--error {
  border-color: #e53935;
  color: #e53935;
}

.c-reward-confirm-card__copy-icon {
  width: 0.95rem;
  height: 0.95rem;
}

.c-reward-confirm-card__register-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 0.875rem;
  border: 1.5px solid var(--color-primary);
  border-radius: 9999px;
  background-color: var(--color-primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease, border-color 200ms ease, opacity 200ms ease;
}

.c-reward-confirm-card__register-btn:hover {
  opacity: 0.9;
}

.c-reward-confirm-card__register-btn:active {
  transform: scale(0.97);
}

.c-reward-confirm-card__register-icon {
  width: 0.95rem;
  height: 0.95rem;
}

@media (max-width: 640px) {
  .c-reward-confirm-card__title {
    white-space: normal;
  }
}

.c-reward-pricing-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-mdlg);
  border: 1px solid var(--color-main-100);
  overflow: hidden;
}

.c-reward-pricing-table thead th {
  background: var(--color-main-25);
  padding: 0.75rem 1rem;
  font-size: 0.81rem;
  font-weight: 700;
  color: var(--color-main-body-dark);
  text-align: left;
  border-bottom: 1px solid var(--color-main-100);
  white-space: nowrap;
}

.c-reward-pricing-table tbody td {
  padding: 0.75rem 1rem;
  font-size: 0.86rem;
  color: var(--color-main-body-dark);
  border-bottom: 1px solid var(--color-main-50);
  vertical-align: middle;
}

.c-reward-pricing-table tbody tr:last-child td {
  border-bottom: none;
}

.c-reward-pricing-table .c-reward-category-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.c-reward-pricing-input {
  width: 100%;
  max-width: 120px;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--color-main-100);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-family: inherit;
  color: var(--color-main-body-dark);
  background: #fff;
  text-align: right;
  transition: border-color 0.2s;
}

.c-reward-pricing-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(239,72,70,0.1);
}

.c-reward-pricing-input::placeholder {
  color: var(--color-main-300);
}

.c-reward-pricing-price-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.c-reward-suggest-price-btn {
  white-space: nowrap;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-family: inherit;
  color: var(--color-primary);
  background: var(--color-main-bg);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.c-reward-suggest-price-btn:hover {
  background: var(--color-primary);
  color: #fff;
}

/* スマホ幅では4カラムのテーブルが収まらず横スクロールが必要になるため、
   行ごとのカード型(縦積み)レイアウトに切り替える。
   参考価格・価格設定のセルは td の data-label 属性から見出しを表示する
   (カテゴリバッジとリターン名称のセルは見出しなしでそのまま表示)。 */
@media (max-width: 640px) {
  .c-reward-pricing-wrap {
    overflow-x: visible;
  }

  .c-reward-pricing-table,
  .c-reward-pricing-table tbody {
    display: block;
  }

  .c-reward-pricing-table {
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    overflow: visible;
  }

  /* 列見出しは視覚的には隠すが、スクリーンリーダー向けに
     アクセシビリティツリーへ残す(.c-reward-visually-hidden と同等の指定)。
     display:none にすると支援技術から見出しが消えてしまうため使わない。 */
  .c-reward-pricing-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .c-reward-pricing-table tbody {
    display: grid;
    gap: 0.75rem;
  }

  /* backdrop-filter は行数分ブラーが重なり低スペック端末で
     スクロールが重くなるため使わず、不透明度高めの背景色のみで表現する
     (.c-reward-confirm-card と同じ表現)。 */
  .c-reward-pricing-table tbody tr {
    display: block;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--color-main-100);
    border-radius: var(--radius-mdlg);
    padding: 0.875rem 1rem;
  }

  .c-reward-pricing-table tbody td {
    display: block;
    padding: 0;
    border-bottom: none;
  }

  .c-reward-pricing-table tbody td + td {
    margin-top: 0.625rem;
  }

  .c-reward-pricing-table tbody tr:last-child td {
    border-bottom: none;
  }

  /* リターン名称のセル(2列目)は見出しなしで強調表示 */
  .c-reward-pricing-table tbody td:nth-child(2) {
    font-weight: 700;
  }

  .c-reward-pricing-table tbody td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-main-500);
  }

  /* 入力欄は固定上限(120px)を外し、ボタンとの残り幅いっぱいまで使う */
  .c-reward-pricing-input {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }
}


/* --------------------------------------------------------------------------
   Part H: Package Cards
   -------------------------------------------------------------------------- */

.c-reward-package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
}

.c-reward-axis-group--option-plans .c-reward-package-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  max-width: none;
  margin: 0;
}

@media (min-width: 640px) {
  .c-reward-axis-group--option-plans .c-reward-package-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.c-reward-axis-group--option-plans .c-reward-package-card--composer {
  grid-column: 1 / -1;
}

.c-reward-axis-group--option-plans .c-reward-package-card {
  padding: 1.125rem 1.25rem 1.25rem;
  border-radius: var(--radius-lg, 0.75rem);
  border-color: var(--color-reward-option-plans-card-border);
  background: var(--color-reward-option-plans-surface);
  box-shadow: var(--shadow-reward-option-plans-card);
}

.c-reward-axis-group--option-plans .c-reward-package-card__details {
  margin: 0;
}

.c-reward-axis-group--option-plans .c-reward-package-card__summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  padding-left: 2rem;
  user-select: none;
}

.c-reward-axis-group--option-plans .c-reward-package-card__summary::-webkit-details-marker {
  display: none;
}

.c-reward-axis-group--option-plans .c-reward-package-card__summary .c-reward-package-card__title {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.c-reward-axis-group--option-plans .c-reward-package-card__chevron {
  color: var(--color-main-500);
  flex-shrink: 0;
  transition: transform 180ms ease;
}

.c-reward-axis-group--option-plans .c-reward-package-card__details[open] .c-reward-package-card__chevron {
  transform: rotate(180deg);
}

.c-reward-axis-group--option-plans .c-reward-package-card__summary:hover .c-reward-package-card__chevron,
.c-reward-axis-group--option-plans .c-reward-package-card__summary:focus-visible .c-reward-package-card__chevron {
  color: var(--color-main-body-dark);
}

.c-reward-axis-group--option-plans .c-reward-package-card__summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.c-reward-axis-group--option-plans .c-reward-package-card__body {
  margin-top: 0.625rem;
  padding-left: 2rem;
  display: grid;
  gap: 0.5rem;
}

.c-reward-axis-group--option-plans .c-reward-package-card > .c-reward-package-card__tags {
  margin-top: 0.625rem;
  padding-left: 2rem;
}

.c-reward-axis-group--option-plans .c-reward-package-card:hover {
  border-color: var(--color-main-200);
  box-shadow: var(--shadow-reward-option-plans-card-hover);
}

.c-reward-axis-group--option-plans .c-reward-package-card:not(.is-selected) .c-reward-package-card__checkbox {
  border-color: var(--color-reward-option-plans-card-border);
}

.c-reward-axis-group--option-plans .c-reward-package-card__title {
  font-size: 1.0625rem;
  line-height: 1.4;
  font-weight: 700;
}

/* チェックボックスの縦中心をタイトル1行目の中央に揃える
   (card padding-top 1.125rem + title line-height 半分 ≒ 1.25rem)
   ベース定義では .__checkbox 自体が `position: absolute` で二重ポジショニングされていたため、
   ここで static に戻し label の位置だけで制御する。 */
.c-reward-axis-group--option-plans .c-reward-package-card__checkbox {
  position: static;
}

.c-reward-axis-group--option-plans .c-reward-package-card__checkbox-label {
  top: 1.25rem;
  left: 1.25rem;
  right: auto;
  z-index: 1;
}

.c-reward-axis-group--option-plans .c-reward-package-card__text {
  font-size: 0.875rem;
  color: var(--color-main-600);
  line-height: 1.65;
}

.c-reward-axis-group--option-plans .c-reward-package-card__tag {
  padding: 0.28rem 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.015em;
}

.c-reward-axis-group--option-plans .c-reward-package-card__tag--source-ai {
  color: var(--color-reward-badge-source-ai-text);
  background: var(--color-reward-badge-source-ai-bg);
  border: 1px solid var(--color-reward-badge-source-ai-border);
}

.c-reward-axis-group--option-plans .c-reward-package-card__tag--source-manual {
  color: var(--color-reward-badge-source-manual-text);
  background: var(--color-reward-badge-source-manual-bg);
  border: 1px solid var(--color-reward-badge-source-manual-border);
}

.c-reward-axis-group--option-plans .c-reward-package-card__tag--target {
  color: var(--color-reward-target-text);
  background: linear-gradient(180deg, var(--color-reward-target-bg-start) 0%, var(--color-reward-target-bg-mid) 100%);
  border: 1px solid rgba(234, 88, 12, 0.22);
}

.c-reward-package-grid__empty-lane {
  grid-column: 1 / -1;
}

.c-reward-axis-group--option-plans .c-reward-package-card--composer {
  display: flex;
  flex-direction: column;
  min-height: 5.5rem;
  padding: 0;
  border: 1.5px dashed var(--color-main-200);
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.c-reward-axis-group--option-plans .c-reward-package-card--composer:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
  box-shadow: none;
}

.c-reward-axis-group--option-plans .c-reward-package-card--composer:has(.c-reward-inline-form.is-open) {
  border-style: solid;
  border-color: var(--color-reward-option-plans-card-border);
  background: var(--color-reward-option-plans-surface);
  box-shadow: var(--shadow-reward-option-plans-card);
  padding: 1.125rem 1.25rem 1.25rem;
}

.c-reward-axis-group--option-plans .c-reward-package-card--composer-no-ideas {
  min-height: auto;
}

.c-reward-package-card-composer {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 4.75rem;
}

.c-reward-package-card-composer__idle {
  flex: 1;
  display: flex;
  align-items: stretch;
}

.c-reward-axis-group--option-plans .c-reward-package-card-composer__open.c-reward-package-card__add-button {
  width: 100%;
  min-height: 5rem;
  margin-top: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--color-main-500);
  font-weight: 600;
}

.c-reward-axis-group--option-plans .c-reward-package-card-composer__open.c-reward-package-card__add-button:hover {
  background: transparent;
}

.c-reward-axis-group--option-plans .c-reward-package-card-composer__open.c-reward-package-card__add-button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -4px;
}

/* Package plans screen: 2-column grid + dashed add card + manual form */
.c-concept-mode-wrapper--package-plans .c-reward-package-grid {
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
  max-width: min(100%, 60rem);
  margin: 0 auto;
}

@media (min-width: 640px) {
  .c-concept-mode-wrapper--package-plans .c-reward-package-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.c-concept-mode-wrapper--package-plans .c-reward-package-card--package-plan-composer {
  display: flex;
  flex-direction: column;
  min-height: 6.5rem;
  padding: 0;
  overflow: hidden;
}

.c-concept-mode-wrapper--package-plans .c-reward-package-card--package-plan-composer:not(:has(.c-reward-inline-form.is-open)) {
  border-style: dashed;
  border-color: var(--color-main-200);
  background: rgba(255, 255, 255, 0.45);
  box-shadow: none;
}

.c-concept-mode-wrapper--package-plans .c-reward-package-card--package-plan-composer:not(:has(.c-reward-inline-form.is-open)):hover {
  border-color: var(--color-main-300);
  background: rgba(255, 255, 255, 0.72);
}

.c-concept-mode-wrapper--package-plans .c-reward-package-card--package-plan-composer .c-reward-package-card-composer {
  min-height: 6.5rem;
}

.c-concept-mode-wrapper--package-plans .c-reward-package-card--package-plan-composer .c-reward-package-card-composer__idle {
  flex: 1;
  padding: 0;
}

.c-reward-package-card__add-placeholder {
  width: 100%;
  min-height: 6.5rem;
  margin: 0;
  padding: 1.25rem 1.5rem;
  border: none;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-main-500);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.c-concept-mode-wrapper--package-plans .c-reward-package-card__add-placeholder:hover,
.c-concept-mode-wrapper--package-plans .c-reward-package-card__add-placeholder:focus-visible {
  color: var(--color-main-600);
  background: rgba(255, 255, 255, 0.35);
  outline: none;
}

.c-concept-mode-wrapper--package-plans .c-reward-package-card--package-plan-composer .c-reward-inline-form {
  display: none;
  margin: 0;
  padding: 1.25rem 1.5rem 1.5rem;
  border: none;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.92);
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}

.c-concept-mode-wrapper--package-plans .c-reward-package-card--package-plan-composer .c-reward-inline-form.is-open {
  display: block;
}

.c-reward-package-card-manual__title-row {
  margin-bottom: 0.25rem;
}

.c-reward-package-card-manual__title-label {
  font-weight: 700;
  font-size: 1.04rem;
  color: var(--color-main-body-dark);
}

.c-reward-package-card-manual__divider {
  height: 0;
  border: 0;
  border-top: 1px dashed var(--color-main-200);
  margin: 0.65rem 0;
}

.c-reward-package-card-manual__field {
  margin: 0;
}

.c-reward-package-card-manual__title-input {
  width: 100%;
  max-width: none;
  margin-bottom: 0;
}

.c-reward-package-card-manual__textarea {
  width: 100%;
  min-height: 4.5rem;
  border: 1px solid var(--color-main-200);
  border-radius: var(--radius-mdlg);
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--color-main-body-dark);
  background: #fff;
  resize: vertical;
  box-sizing: border-box;
}

.c-reward-package-card-manual__textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(239, 72, 70, 0.1);
}

.c-reward-package-card-manual__textarea::placeholder {
  color: var(--color-main-400);
}

.c-reward-package-card-manual-form {
  width: 100%;
  box-sizing: border-box;
}

.c-reward-package-card-manual__candidates-heading {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--color-main-body-dark);
  margin-bottom: 0.5rem;
}

.c-reward-package-card-manual__candidates {
  margin: 0;
}

.c-reward-package-card-manual__option-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.c-reward-package-card-manual__option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-mdlg);
  border: 1px solid var(--color-main-100);
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  font-size: 0.86rem;
  line-height: 1.45;
}

.c-reward-package-card-manual__option:has(.c-reward-package-card-manual__option-input:checked) {
  border-color: var(--color-primary);
  background: rgba(239, 72, 70, 0.06);
}

.c-reward-package-card-manual__option-input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.c-reward-package-card-manual__option-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  min-width: 0;
}

.c-reward-package-card-manual__option-title {
  font-weight: 600;
  color: var(--color-main-body-dark);
}

.c-reward-package-card-manual__option-price {
  font-size: 0.82rem;
  color: var(--color-main-600);
}

.c-reward-package-card-manual__option-price--muted {
  color: var(--color-main-400);
}

.c-reward-package-card-manual__total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--color-main-200);
  font-size: 0.92rem;
}

.c-reward-package-card-manual__total-label {
  font-weight: 700;
  color: var(--color-main-body-dark);
}

.c-reward-package-card-manual__total-amount {
  font-weight: 700;
  color: var(--color-main-body-dark);
  font-variant-numeric: tabular-nums;
}

.c-reward-package-card-manual__empty {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.c-reward-package-card-manual__actions {
  margin-top: 1rem;
}

.c-concept-mode-wrapper--package-plans .c-reward-package-card-manual__actions.c-reward-inline-form__actions--row {
  flex-wrap: wrap;
}

.c-reward-package-card {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-mdlg);
  border: 1px solid var(--color-main-100);
  padding: 1.25rem 1.5rem;
  transition: all 0.2s;
  position: relative;
}

.c-reward-package-card:hover {
  border-color: var(--color-main-200);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.c-reward-package-card.is-selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(239,72,70,0.15);
}

.c-reward-package-card__checkbox {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-main-200);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.c-reward-package-card.is-selected .c-reward-package-card__checkbox {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.c-reward-package-card__name-input {
  font-weight: 700;
  font-size: 1.04rem;
  color: var(--color-main-body-dark);
  margin-bottom: 0.5rem;
  width: calc(100% - 2rem);
  border: none;
  border-bottom: 1px dashed var(--color-main-200);
  background: transparent;
  font-family: inherit;
  padding: 0.125rem 0;
}

.c-reward-package-card__name-input:focus {
  outline: none;
  border-bottom-color: var(--color-primary);
}

.c-reward-package-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.c-reward-package-card__price-input {
  font-weight: 700;
  font-size: 1.26rem;
  color: var(--color-primary);
  width: 100px;
  border: none;
  border-bottom: 1px dashed var(--color-main-200);
  background: transparent;
  font-family: inherit;
  text-align: right;
  padding: 0.125rem 0;
}

.c-reward-package-card__price-input:focus {
  outline: none;
  border-bottom-color: var(--color-primary);
}

.c-reward-package-card__price-unit {
  font-size: 0.81rem;
  font-weight: 400;
  color: var(--color-main-500);
}

.c-reward-package-card__items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.c-reward-package-card__items li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  color: var(--color-main-body);
  line-height: 1.5;
}

.c-reward-package-card__items li svg {
  flex-shrink: 0;
  color: var(--color-primary);
}

.c-reward-package-card__item-input {
  flex: 1;
  border: none;
  border-bottom: 1px dashed transparent;
  background: transparent;
  font-family: inherit;
  font-size: 0.86rem;
  color: var(--color-main-body);
  padding: 0.125rem 0;
}

.c-reward-package-card__item-input:focus {
  outline: none;
  border-bottom-color: var(--color-main-200);
}

.c-reward-axis-header-simple {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.c-reward-axis-bullet {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: var(--color-main-200);
  flex-shrink: 0;
}

.c-reward-axis-bullet--experience {
  background: #6366f1;
}

.c-reward-axis-bullet--product {
  background: #f59e0b;
}

.c-reward-axis-bullet--thought {
  background: #ef4846;
}

.c-reward-axis-header-simple .c-reward-axis-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-main-body-dark);
}

.c-reward-axis-header-simple .c-reward-axis-sublabel {
  margin-left: 0.125rem;
}

.c-reward-package-card__checkbox-label {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
}

.c-reward-package-card__checkbox-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.c-reward-package-card__checkbox {
  border-radius: 9999px;
}

.c-reward-package-card:has(.c-reward-package-card__checkbox-input:checked) {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(239,72,70,0.15);
}

/* Option plans: one selected style (wins over generic :has above); pairs with reward-option-plan-selection */
.c-reward-axis-group--option-plans .c-reward-package-card:is(.is-selected, :has(.c-reward-package-card__checkbox-input:checked)) {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(239, 72, 70, 0.22), 0 6px 22px rgba(239, 72, 70, 0.1);
}

.c-reward-package-card__checkbox-input:checked + .c-reward-package-card__checkbox {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.c-reward-package-card__check-svg {
  color: #fff;
  display: none;
}

.c-reward-package-card__checkbox-input:checked + .c-reward-package-card__checkbox .c-reward-package-card__check-svg {
  display: block;
}

.c-reward-package-card__title {
  font-size: 1.0625rem;
  line-height: 1.4;
  font-weight: 700;
  color: var(--color-main-body-dark);
  margin: 0 2rem 0.5rem 0;
  word-break: break-word;
}

.c-reward-package-card__text {
  font-size: 0.95rem;
  color: var(--color-main-500);
  line-height: 1.7;
  margin: 0 0 0.75rem;
}

.c-reward-package-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.c-reward-package-card__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
}

.c-reward-package-card__tag--source {
  color: #d74a2a;
  background: #fdf1eb;
}

.c-reward-package-card__tag--target {
  color: #7a4a17;
  background: #f9ebd7;
}

.c-reward-package-card--add {
  padding: 0;
  border: 1px dashed var(--color-main-200);
  background: rgba(255, 255, 255, 0.5);
}

.c-reward-package-card__add-link {
  width: 100%;
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--color-main-400);
  font-weight: 700;
}

.c-reward-package-card__add-button {
  margin-top: 1rem;
  min-height: 56px;
  border: 1px dashed var(--color-main-200);
  border-radius: var(--radius-mdlg);
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
}

.c-reward-package-card__add-link:hover {
  color: var(--color-primary);
}

.c-reward-inline-form {
  display: none;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--color-main-100);
  border-radius: var(--radius-mdlg);
  background: #fff;
}

.c-reward-inline-form.is-open {
  display: block;
}

.c-reward-axis-group--option-plans .c-reward-package-card--composer .c-reward-inline-form {
  display: none;
  margin-top: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  flex: 1;
  width: 100%;
}

.c-reward-axis-group--option-plans .c-reward-package-card--composer .c-reward-inline-form.is-open {
  display: block;
}

.c-reward-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.c-reward-inline-form-card {
  width: 100%;
}

.c-reward-axis-group--option-plans .c-reward-inline-form-card .c-reward-inline-form__field {
  position: relative;
}

.c-reward-axis-group--option-plans .c-reward-inline-form__input-title {
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-bottom: 1px dashed var(--color-main-200);
  background: transparent;
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-main-body-dark);
  padding: 0.125rem 0 0.5rem;
  margin: 0 0 0.125rem;
}

.c-reward-axis-group--option-plans .c-reward-inline-form__input-title::placeholder {
  color: var(--color-main-400);
  font-weight: 500;
}

.c-reward-axis-group--option-plans .c-reward-inline-form__input-title:focus {
  outline: none;
  border-bottom-color: var(--color-primary);
}

.c-reward-axis-group--option-plans .c-reward-inline-form__input-desc {
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-bottom: 1px dashed var(--color-main-200);
  background: transparent;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--color-main-body-dark);
  min-height: 4.5rem;
  padding: 0.25rem 0 0.5rem;
  resize: vertical;
}

.c-reward-axis-group--option-plans .c-reward-inline-form__input-desc::placeholder {
  color: var(--color-main-400);
}

.c-reward-axis-group--option-plans .c-reward-inline-form__input-desc:focus {
  outline: none;
  border-bottom-color: var(--color-primary);
}

.c-reward-inline-form__label--compact {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-main-600);
}

.c-reward-inline-form__select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.65rem;
  font-size: 0.86rem;
  font-family: inherit;
  color: var(--color-main-body-dark);
  border: 1px solid var(--color-main-200);
  border-radius: var(--radius-sm);
  background: #fff;
}

.c-reward-inline-form__targets-details {
  margin-top: 0.25rem;
  border: 1px solid var(--color-main-200);
  border-radius: var(--radius-mdlg);
  background: #fff;
}

.c-reward-inline-form__targets-summary {
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--color-main-body-dark);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  border-radius: inherit;
  user-select: none;
}

.c-reward-inline-form__targets-summary::-webkit-details-marker {
  display: none;
}

.c-reward-inline-form__targets-summary-label {
  flex: 1;
  min-width: 0;
}

.c-reward-inline-form__targets-chevron {
  color: var(--color-main-500);
  flex-shrink: 0;
  transition: transform 180ms ease;
}

.c-reward-inline-form__targets-summary:hover {
  background: var(--color-main-50);
}

.c-reward-inline-form__targets-summary:hover .c-reward-inline-form__targets-chevron {
  color: var(--color-main-body-dark);
}

.c-reward-inline-form__targets-summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.c-reward-inline-form__targets-details[open] .c-reward-inline-form__targets-summary {
  border-bottom: 1px solid var(--color-main-100);
  border-radius: var(--radius-mdlg) var(--radius-mdlg) 0 0;
}

.c-reward-inline-form__targets-details[open] .c-reward-inline-form__targets-chevron {
  transform: rotate(180deg);
}

.c-reward-inline-form__footer-tags {
  margin-top: 0.625rem;
  margin-bottom: 0;
}

.c-reward-inline-form__actions--row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
  justify-content: center;
  align-items: center;
}

.c-reward-inline-form__actions--row .c-reward-inline-form__submit {
  flex: 0 0 auto;
  width: auto;
  min-width: 6rem;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
}

.c-reward-inline-form__actions--row .c-reward-inline-form__cancel.c-reward-cta {
  flex: 0 0 auto;
  width: auto;
  min-width: 5.5rem;
  padding: 0.55rem 1.25rem;
  font-size: 0.88rem;
}

.c-reward-cta.c-reward-cta--outline {
  background: #fff;
  color: var(--color-main-body);
  border: 1.5px solid var(--color-main-300);
  box-shadow: none;
  font-family: var(--font-base);
  font-weight: 700;
  line-height: 1.4;
  transition:
    transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.c-reward-cta.c-reward-cta--outline:hover {
  background: var(--color-main-50);
  color: var(--color-main-body);
  border-color: var(--color-main-500);
  box-shadow: none;
  transform: scale(1.02);
}

.c-reward-cta.c-reward-cta--outline:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.c-reward-cta.c-reward-cta--outline:active:not(:disabled) {
  transform: scale(0.97);
  box-shadow: none;
}

.c-reward-inline-form__empty {
  font-size: 0.86rem;
  color: var(--color-main-500);
  line-height: 1.6;
}

.c-reward-inline-form__body {
  display: grid;
  gap: 0.875rem;
}

.c-reward-inline-form__field {
  display: grid;
  gap: 0.375rem;
}

.c-reward-inline-form__label {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--color-main-body-dark);
}

.c-reward-inline-form__single-idea {
  margin: 0;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-main-100);
  background: var(--color-main-50);
  color: var(--color-main-body);
  font-size: 0.9rem;
}

.c-reward-inline-form__targets {
  display: grid;
  gap: 0.4rem;
  padding: 0.625rem 0.875rem 0.75rem;
}

.c-reward-inline-form__target {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.86rem;
  color: var(--color-main-body);
}

.c-reward-inline-form__actions {
  margin-top: 0.25rem;
}

.c-reward-inline-form__submit {
  width: 100%;
}

.c-reward-axis-empty {
  background: rgba(243, 244, 246, 0.9);
  border-radius: var(--radius-mdlg);
  padding: 1.25rem;
  text-align: center;
}

.c-reward-axis-group--option-plans .c-reward-axis-empty {
  margin: 0;
  background: rgba(243, 244, 246, 0.75);
}

.c-reward-axis-empty__title {
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--color-main-body-dark);
  margin-bottom: 0.5rem;
}

.c-reward-axis-empty__text {
  font-size: 0.85rem;
  color: var(--color-main-400);
  margin: 0;
}

.c-reward-package-card__add-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--color-main-400);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0.25rem 0;
}

.c-reward-package-card__add-item:hover {
  color: var(--color-primary);
}

.c-reward-package-card__desc {
  font-size: 0.81rem;
  color: var(--color-main-500);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-main-50);
  line-height: 1.5;
}

.c-reward-package-card__edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-family: inherit;
  color: var(--color-main-500);
  background: transparent;
  border: 1px solid var(--color-main-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.c-reward-package-card__edit-btn:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Read-only mode: hide inputs, show text (--package-plan-composer の手動追加フォームは除外) */
.c-reward-package-card:not(.is-editing):not(.c-reward-package-card--package-plan-composer) .c-reward-package-card__name-input,
.c-reward-package-card:not(.is-editing) .c-reward-package-card__price-input,
.c-reward-package-card:not(.is-editing) .c-reward-package-card__item-input,
.c-reward-package-card:not(.is-editing) .c-reward-package-card__add-item {
  display: none;
}

.c-reward-package-card.is-editing .c-reward-package-card__name-display,
.c-reward-package-card.is-editing .c-reward-package-card__price-display,
.c-reward-package-card.is-editing .c-reward-package-card__item-display {
  display: none;
}

.c-reward-package-card.is-editing .c-reward-package-card__edit-btn {
  display: none;
}

.c-reward-package-card:not(.is-editing) .c-reward-package-card__confirm-btn {
  display: none;
}

.c-reward-package-card__confirm-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-family: inherit;
  color: #fff;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.2s;
}

.c-reward-package-card__confirm-btn:hover {
  opacity: 0.85;
}

.c-reward-package-card__error {
  font-size: 0.75rem;
  color: var(--color-primary);
  margin-top: 0.375rem;
}

.c-reward-package-card__name-display {
  font-weight: 700;
  font-size: 1.04rem;
  color: var(--color-main-body-dark);
  margin-bottom: 0.5rem;
  padding-right: 2rem;
}

.c-reward-package-card__price-display {
  font-weight: 700;
  font-size: 1.26rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.c-reward-package-card__item-display {
  font-size: 0.86rem;
  color: var(--color-main-body);
}

.c-reward-package-card__item-price {
  font-size: 0.81rem;
  color: var(--color-main-500);
  font-weight: 400;
}

.c-reward-package-card__item-display--placeholder {
  color: var(--color-main-500);
}

.c-reward-package-card__compose-hint {
  font-size: 0.75rem;
  color: var(--color-main-500);
  margin: 0.5rem 0 0;
  line-height: 1.5;
}

.c-reward-add-package-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 120px;
  border: 2px dashed var(--color-main-200);
  border-radius: var(--radius-mdlg);
  background: transparent;
  color: var(--color-main-400);
  font-size: 0.91rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.c-reward-add-package-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}


/* --------------------------------------------------------------------------
   Part I: Confirmation screen
   -------------------------------------------------------------------------- */

.c-reward-confirm-section {
  margin-bottom: 1.5rem;
}

.c-reward-confirm-section__title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-main-body-dark);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-main-100);
}

.c-reward-confirm-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--color-main-50);
  font-size: 0.88rem;
}

.c-reward-confirm-item__name {
  color: var(--color-main-body);
}

.c-reward-confirm-item__price {
  font-weight: 600;
  color: var(--color-primary);
}

.c-reward-confirm-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  margin-right: 0.5rem;
}

.c-reward-confirm-badge--experience {
  color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
}

.c-reward-confirm-badge--product {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

.c-reward-confirm-badge--thought {
  color: #ef4846;
  background: rgba(239, 72, 70, 0.08);
}

.c-reward-confirm-subitem {
  padding: 0.25rem 0 0.25rem 1.5rem;
  font-size: 0.81rem;
  color: var(--color-main-500);
}

.c-reward-confirm-item__sub-item {
  padding: 0.25rem 0 0.25rem 1.5rem;
  font-size: 0.81rem;
  color: var(--color-main-500);
}


/* --------------------------------------------------------------------------
   Part J: Saved view
   -------------------------------------------------------------------------- */

.c-reward-saved-view {
  text-align: center;
}

/* --- Rewards index: subsection titles & saved-history cards --- */
.c-reward-subsection-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-main-body-dark);
  margin: 2rem 0 0.75rem;
}

.c-reward-subsection-title:first-of-type {
  margin-top: 1.25rem;
}

.c-reward-history-grid {
  grid-template-columns: minmax(0, 1fr);
}

.c-reward-history-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  min-height: 0;
}

.c-reward-history-card__heading {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}

.c-reward-history-card__meta-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  line-height: 1;
}

.c-reward-history-card .c-reward-history-card__title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-main-body-dark);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
  margin: 0;
}

.c-reward-history-card__version {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-main-600);
  white-space: nowrap;
  line-height: 1;
  margin: 0;
}

.c-reward-history-card__meta {
  font-size: 0.78rem;
  color: var(--color-main-600);
  white-space: nowrap;
  line-height: 1;
}

.c-reward-package-card.c-reward-history-card .c-reward-cta-wrap {
  margin-top: 0;
  padding-top: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  align-self: center;
}

.c-reward-history-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.45rem 1.1rem;
  border: 1.5px solid var(--color-main-300);
  border-radius: 9999px;
  background: #fff;
  color: var(--color-main-body);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition:
    background-color 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.c-reward-history-link:hover {
  background: var(--color-main-50);
  border-color: var(--color-main-500);
  transform: scale(1.02);
}

.c-reward-history-link:active {
  transform: scale(0.97);
}

@media (max-width: 560px) {
  .c-reward-history-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .c-reward-history-card .c-reward-package-card__title {
    white-space: normal;
  }
}

/* --- Tutorial: secondary link to existing rewards list --- */
/* 画像生成のリセットボタン(.ai-images-reset)と雰囲気を揃えたアウトラインのピルボタン。
   幅は同じ wrap 内の主 CTA(.c-cta-btn)に合わせる。 */
.c-reward-tutorial-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: min(320px, 100%);
  margin-top: 0.875rem;
  border: 1.5px solid var(--color-main-300);
  border-radius: 9999px;
  background: #fff;
  color: var(--color-main-body);
  padding: 10px 12px;
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.c-reward-tutorial-secondary-link:hover {
  background: var(--color-main-50);
  border-color: var(--color-main-500);
  color: var(--color-main-body);
  text-decoration: none;
  transform: scale(1.02);
}

.c-reward-tutorial-secondary-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.c-reward-tutorial-secondary-link:active {
  transform: scale(0.97);
}

/* --- Saved view: history list link --- */
.c-reward-saved-history-link-wrap {
  margin-top: 1rem;
  text-align: center;
}

/* 「リターンを作り直す」(.c-reward-redo-btn)と同じアウトラインボタン風に揃える。 */
.c-reward-saved-history-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--color-main-500);
  background: transparent;
  border: 1px solid var(--color-main-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.c-reward-saved-history-link:hover {
  color: var(--color-main-body);
  border-color: var(--color-main-400);
  text-decoration: none;
}

.c-reward-saved-view__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background-color: rgba(57, 194, 136, 0.12);
  color: #39C288;
  margin-bottom: 0.75rem;
}

.c-reward-saved-view__icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.c-reward-saved-view__title {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-main-body-dark);
  margin-bottom: 0.5rem;
}

.c-reward-saved-view__desc {
  font-size: 0.88rem;
  color: var(--color-main-500);
  margin-bottom: 1.5rem;
}

.c-reward-saved-view__saved-meta {
  margin-bottom: 1.5rem;
}

.c-reward-saved-view__saved-meta .c-reward-saved-view__desc {
  margin-bottom: 0.35rem;
}

.c-reward-saved-view__version {
  font-size: 0.75rem;
  color: var(--color-main-500);
  margin: 0;
}

.c-reward-saved-content {
  text-align: left;
  margin-bottom: 1.5rem;
}

.c-reward-saved-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.c-reward-csv-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--color-main-body);
  background: var(--color-main-bg);
  border: 1px solid var(--color-main-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.c-reward-csv-btn:hover {
  border-color: var(--color-main-400);
}

.c-reward-csv-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.c-reward-csv-btn:disabled:hover {
  border-color: var(--color-main-200);
}

.c-reward-redo-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--color-main-500);
  background: transparent;
  border: 1px solid var(--color-main-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.c-reward-redo-btn:hover {
  color: var(--color-main-body);
  border-color: var(--color-main-400);
}


/* --------------------------------------------------------------------------
   Part K: AI Message Box
   -------------------------------------------------------------------------- */

.c-reward-ai-message {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.c-reward-ai-message__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  overflow: hidden;
  flex-shrink: 0;
}

.c-reward-ai-message__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.c-reward-ai-message__text {
  flex: 1;
  min-width: 0;
  font-size: 0.91rem;
  color: var(--color-main-body);
  line-height: 1.6;
  background: var(--color-reward-ai-bg);
  border: 1px solid var(--color-main-200);
  border-radius: var(--radius-mdlg);
  padding: 0.75rem 1rem;
  position: relative;
  margin-top: 0.5rem;
}

.c-reward-ai-message__text::before {
  content: '';
  position: absolute;
  top: 12px;
  left: -9px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 9px solid var(--color-main-200);
}

.c-reward-ai-message__text::after {
  content: '';
  position: absolute;
  top: 13px;
  left: -7px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 7px solid var(--color-reward-ai-bg);
}


/* --------------------------------------------------------------------------
   Part L: CTA Button
   -------------------------------------------------------------------------- */

.c-reward-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-mdlg);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(239,72,70,0.2);
}

.c-reward-cta__arrow {
  font-size: 1.1rem;
  line-height: 1;
  margin-left: 0.1rem;
}

.c-reward-cta:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(239,72,70,0.3);
  transform: translateY(-1px);
}

.c-reward-cta:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.c-reward-cta:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(239,72,70,0.2);
}

.c-reward-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.c-reward-cta-wrap {
  text-align: center;
  margin-top: 2rem;
}

/* `c-reward-cta-wrap` 内の `.c-cta-btn` は、共通の `width:100%` ではなく
   コンテンツに必要な幅だけにする。text-align:center により水平中央に配置される。
   ただし min-width で最低限の存在感を確保し、短いテキスト(例: 「次に進む」)でも
   ボタンが小さく見えすぎないようにする。
   Android 等の狭いビューポート(約360px)では親要素の幅が 320px を下回るため、
   min() で親幅を上限にしてカードからのはみ出しを防ぐ。 */
.c-reward-cta-wrap .c-cta-btn {
  width: auto;
  min-width: min(320px, 100%);
}

/* リターン候補カード内では CTA をカード幅に合わせる（min-width で溢れないように） */
.c-reward-package-card .c-reward-cta-wrap {
  margin-top: 1rem;
}

.c-reward-package-card .c-reward-cta-wrap .c-cta-btn {
  width: 100%;
  min-width: 0;
}


/* --------------------------------------------------------------------------
   Part M: Error boxes
   -------------------------------------------------------------------------- */

.c-reward-error-box {
  display: none;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(239,72,70,0.08);
  border: 1px solid rgba(239,72,70,0.3);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  font-size: 0.84rem;
  white-space: pre-line;
}

.c-reward-error-box--visible {
  display: block;
}

/* design system: molecules/error-box.css `.cs-error-box` 仕様に準拠
   APIエラー・バリデーションエラーの表示用 */
.c-reward-errors {
  padding: 14px;
  border-radius: var(--radius-xl);
  border: 1px solid #f3c4c7;
  background: #fceff0;
  color: var(--color-danger);
  margin-bottom: 1rem;
}

.c-reward-errors__message {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.c-reward-errors__message + .c-reward-errors__message {
  margin-top: 4px;
}

.c-reward-errors--axis-width {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.c-reward-errors--pricing-width {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* 新規作成 CTA に隣接して表示するエラー */
.c-reward-errors--create-cta {
  max-width: 900px;
  margin: 1.25rem auto 0;
}

.c-reward-errors__heading {
  margin: 0 0 0.25rem;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}


/* --------------------------------------------------------------------------
   Part N: Screen wrapper & animation
   -------------------------------------------------------------------------- */

.c-reward-screen {
  animation: rewardFadeIn 0.3s ease;
}

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


/* --------------------------------------------------------------------------
   Part O: Step progress bar
   -------------------------------------------------------------------------- */

.c-reward-progress {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  padding: 1rem 1.25rem 0.75rem;
  border-radius: var(--radius-mdlg);
  border: 1px solid var(--color-main-100);
}

.c-reward-progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  flex-shrink: 0;
}

.c-reward-progress__dot {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.3s;
  border: 2px solid var(--color-main-200);
  background: #fff;
  color: var(--color-main-300);
}

.c-reward-progress__dot.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

.c-reward-progress__dot.is-done {
  border-color: var(--color-primary);
  background: rgba(239,72,70,0.08);
  color: var(--color-primary);
}

.c-reward-progress__label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-main-300);
  white-space: nowrap;
  line-height: 1.2;
}

.c-reward-progress__step.is-active .c-reward-progress__label {
  color: var(--color-primary);
}

.c-reward-progress__step.is-done .c-reward-progress__label {
  color: var(--color-main-body);
}

.c-reward-progress__line {
  flex: 1;
  height: 2px;
  background: var(--color-main-100);
  max-width: 3rem;
  margin-top: 1rem; /* align with dot center */
  transition: background 0.3s;
}

.c-reward-progress__line.is-done {
  background: var(--color-primary);
}


/* --------------------------------------------------------------------------
   Part P: Category badge dot (used inline in JS-rendered content)
   -------------------------------------------------------------------------- */

.c-reward-category-dot {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}


/* --------------------------------------------------------------------------
   Part Q: Responsive – Desktop overrides
   -------------------------------------------------------------------------- */

@media (min-width: 1024px) {
  .cs-reward-main {
    padding: 32px 0 48px;
  }

  .cs-reward-main-inner {
    padding: 0 24px;
  }
}
/* ============================================================
   Story Making Tool — story.css
   ============================================================ */

/* --- Main Layout (reuse base pattern) --- */
.cs-story-main {
  flex: 1;
  min-width: 0;
  padding: 80px 0 48px;
  position: relative;
}

.cs-story-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(var(--color-dot-pattern) 1.4px, transparent 1.4px);
  background-size: 20px 20px;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.25), rgba(0,0,0,0.34) 40%, rgba(0,0,0,0.55) 82%, rgba(0,0,0,0.15));
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.25), rgba(0,0,0,0.34) 40%, rgba(0,0,0,0.55) 82%, rgba(0,0,0,0.15));
  pointer-events: none;
  z-index: 0;
}

.cs-story-main-inner {
  max-width: 1152px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: 0 16px;
}

/* --- Hero --- */
.cs-story-hero {
  text-align: center;
  margin-bottom: 24px;
}

.cs-story-title {
  margin: 8px 0 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-main-body-dark);
}

.cs-story-subtitle {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--color-main-700);
}

/* --- Screen Toggle --- */
.c-concept-screen--hidden {
  display: none;
}

/* --- Story Input Card --- */
.c-story-input {
  background-color: var(--color-main-bg);
  border-radius: calc(var(--radius-3xl) + 8px);
  padding: 2.5rem 1.5rem;
  box-shadow: var(--shadow-md);
}

.c-story-input__title {
  font-size: 1.11rem;
  font-weight: 700;
  color: var(--color-main-body-dark);
  text-align: center;
  margin: 0 0 0.5rem;
}

.c-story-input__section-title {
  text-align: center;
}

.c-story-input__subtitle {
  font-size: 0.86rem;
  color: var(--color-main-700);
  text-align: center;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.c-story-input__prompts {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  padding: 0 0.5rem;
}

.c-story-input__prompt-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.86rem;
  color: var(--color-main-body);
  line-height: 1.6;
}

.c-story-input__prompt-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  color: var(--color-primary);
}

.c-story-input__textarea {
  width: 100%;
  min-height: 10rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--color-main-300);
  border-radius: 12px;
  background-color: var(--color-main-bg);
  color: var(--color-main-body);
  font-family: inherit;
  font-size: 0.91rem;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  box-sizing: border-box;
}

.c-story-input__textarea::placeholder {
  color: var(--color-main-550, #999);
}

.c-story-input__textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(239, 72, 70, 0.15);
}

.c-story-input__action {
  margin-top: 1.5rem;
  text-align: center;
}

/* --- CTA Button --- */
.c-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.25rem;
  border: none;
  border-radius: 9999px;
  background-color: var(--color-primary-dark, #D93E3C);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  outline: 5px solid rgba(239, 72, 70, 0.2);
}

.c-cta-btn:disabled {
  background-color: var(--color-main-300);
  outline-color: transparent;
  cursor: not-allowed;
  transform: none;
}

.btn-spring {
  transition: all 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-spring:hover:not(:disabled) {
  transform: scale(1.05);
}

.btn-spring:active:not(:disabled) {
  transform: scale(0.95);
}

/* --- Loading State --- */
.c-concept-mode-wrapper {
  background-color: var(--color-main-bg);
  border-radius: calc(var(--radius-3xl) + 8px);
  padding: 3rem 1.25rem;
  box-shadow: var(--shadow-md);
}

.c-concept-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1rem;
}

.c-concept-loading__spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid var(--color-main-200);
  border-top-color: var(--color-primary);
  border-radius: 9999px;
  animation: concept-spin 0.8s linear infinite;
}

@keyframes concept-spin {
  to { transform: rotate(360deg); }
}

.c-concept-loading__text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-main-body-dark);
  margin: 0;
}

.c-concept-loading__sub {
  font-size: 0.82rem;
  color: var(--color-main-550, #999);
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .c-concept-loading__spinner {
    animation: none;
  }
}

/* --- Back Button --- */
.c-concept-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-main-700);
  background-color: var(--color-main-bg);
  border: 1.5px solid var(--color-main-200);
  border-radius: 9999px;
  cursor: pointer;
  font-family: inherit;
  transition: all 200ms ease;
}

.c-concept-back-btn:hover {
  color: var(--color-main-body);
  border-color: var(--color-main-400, #bbb);
  background-color: var(--color-main-75, #faf9f8);
}

.c-concept-back-btn__icon {
  width: 1rem;
  height: 1rem;
}

/* --- Split Layout (Phone + Chat) --- */
.c-story-split {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.c-story-split__phone-wrap {
  display: flex;
  justify-content: center;
}

.c-story-split--editor .c-story-split__phone-wrap {
  width: fit-content;
  margin: 0 auto;
}

/* --- Phone Mockup --- */
.c-story-phone {
  width: 375px;
  max-width: 100%;
  margin: 0 auto;
  border: 3px solid #2D2D2D;
  border-radius: 36px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  position: relative;
}

.c-story-phone__notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 26px;
  background: #2D2D2D;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}

.c-story-phone__viewport {
  overflow-y: auto;
  max-height: 620px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.c-story-phone__notch-bg {
  height: 28px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}

.c-story-phone__viewport::-webkit-scrollbar {
  width: 3px;
}

.c-story-phone__viewport::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.c-story-phone__home-bar {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.c-story-phone__home-bar::after {
  content: '';
  width: 100px;
  height: 4px;
  background: #2D2D2D;
  border-radius: 4px;
}

/* --- CAMPFIRE SP Mockup Content --- */
.c-cf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid #F0F0F0;
  position: sticky;
  top: 28px;
  z-index: 1;
}

.c-cf-header__back,
.c-cf-header__menu {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #222;
}

.c-cf-header__back svg,
.c-cf-header__menu svg {
  width: 20px;
  height: 20px;
}

.c-cf-header__logo {
  font-size: 13px;
  font-weight: 800;
  color: #222;
  letter-spacing: 2px;
}

.c-cf-image-wrap {
  position: relative;
  width: 100%;
  background: #f0f0f0;
}

.c-cf-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.c-cf-image-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}

.c-cf-image-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.c-cf-image-dot--active {
  background: #fff;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.25);
}

.c-cf-title {
  font-size: 16px;
  font-weight: 700;
  color: #222;
  line-height: 1.5;
  padding: 16px 20px 0;
  text-align: center;
}

.c-cf-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px 0;
  flex-wrap: wrap;
}

.c-cf-meta__item,
.c-cf-meta__category {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: #555;
}

.c-cf-meta__item svg,
.c-cf-meta__category svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: #AAA;
}

.c-cf-progress-card {
  margin: 14px 16px 0;
  padding: 16px 16px 14px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
}

.c-cf-progress-label {
  font-size: 12px;
  color: #888;
  text-align: center;
  margin-bottom: 4px;
}

.c-cf-amount-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  margin-bottom: 4px;
}

.c-cf-amount {
  font-size: 28px;
  font-weight: 800;
  color: #222;
  line-height: 1.2;
}

.c-cf-amount__yen {
  font-size: 16px;
  font-weight: 700;
  margin-left: 1px;
}

.c-cf-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.c-cf-percent {
  font-size: 13px;
  font-weight: 600;
  color: #666;
}

.c-cf-remaining {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
}

.c-cf-remaining svg {
  width: 14px;
  height: 14px;
  color: #999;
}

.c-cf-bar {
  height: 6px;
  background: #F0F0F0;
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0;
}

.c-cf-bar__fill {
  height: 100%;
  width: var(--bar-width, 0%);
  background: linear-gradient(120deg, #EF4846, #FAC75A);
  border-radius: 3px;
  transition: width 800ms ease;
}

.c-cf-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

.c-cf-fav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: calc(100% - 32px);
  margin: 12px 16px 0;
  height: 44px;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  background: #fff;
  color: #555;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.c-cf-fav svg {
  width: 16px;
  height: 16px;
  color: #CCC;
}

.c-cf-fav__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--color-step-1, #4A90D9);
  border-radius: 9px;
  line-height: 1;
}

.c-cf-share {
  display: flex;
  gap: 6px;
  padding: 10px 16px 0;
}

.c-cf-share__btn {
  flex: 1;
  height: 38px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
}

.c-cf-share__btn svg {
  width: 14px;
  height: 14px;
}

.c-cf-share__btn--x { background: #222; }
.c-cf-share__btn--fb { background: #1877F2; }
.c-cf-share__btn--line { background: #06C755; }

.c-cf-summary {
  font-size: 13px;
  color: #555;
  line-height: 1.8;
  padding: 14px 16px;
  border-bottom: 1px solid #F0F0F0;
}

.c-cf-trust {
  padding: 16px;
  background: #FAFAFA;
  border-bottom: 1px solid #F0F0F0;
}

.c-cf-trust__title {
  font-size: 13px;
  font-weight: 700;
  color: #222;
  margin-bottom: 10px;
  text-align: center;
}

.c-cf-trust__items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c-cf-trust__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #666;
  line-height: 1.4;
}

.c-cf-trust__item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #06C755;
}

.c-cf-tabs {
  display: flex;
  border-bottom: 1px solid #F0F0F0;
  background: #fff;
}

.c-cf-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 11px;
  color: #999;
  position: relative;
  font-weight: 500;
  white-space: nowrap;
}

.c-cf-tab--active {
  color: #FF5046;
  font-weight: 700;
}

.c-cf-tab--active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 10%;
  width: 80%;
  height: 3px;
  background: #FF5046;
  border-radius: 3px 3px 0 0;
}

.c-cf-tab__count {
  font-size: 9px;
  color: #999;
  margin-left: 1px;
}

.c-cf-story-body {
  padding: 16px;
  padding-bottom: 72px;
}

.c-cf-section {
  padding: 16px 0;
  border-bottom: 1px solid #F0F0F0;
}

.c-cf-section:first-child {
  padding-top: 0;
}

.c-cf-section:last-child {
  border-bottom: none;
}

.c-cf-section__heading {
  font-size: 15px;
  font-weight: 700;
  color: #222;
  margin-bottom: 10px;
  line-height: 1.5;
}

.c-cf-section__text {
  font-size: 13px;
  color: #555;
  line-height: 1.8;
  white-space: pre-line;
}

.c-cf-fixed-footer {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  padding: 8px 16px;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

.c-cf-fixed-footer__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 4px;
  background: #e65c65;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* --- Chat Interface --- */
.c-concept-chat {
  background-color: var(--color-main-bg);
  border-radius: calc(var(--radius-3xl) + 6px);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  max-height: 400px;
}

.c-concept-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overscroll-behavior: contain;
}

.c-concept-chat__input-area {
  padding: 0.75rem 1.25rem 1.25rem;
  border-top: 1px solid var(--color-main-150, #f0ebe6);
}

.c-concept-chat__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.c-concept-chat__input-wrap {
  background-color: var(--color-main-50, #faf9f7);
  border: 1.5px solid var(--color-main-300);
  border-radius: var(--radius-xl, 1rem);
  padding: 0.75rem 1rem;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.c-concept-chat__input-wrap:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(239, 72, 70, 0.15);
}

.c-concept-chat__input {
  display: block;
  width: 100%;
  min-height: 5.5rem;
  border: none;
  background: transparent;
  color: var(--color-main-body);
  font-family: inherit;
  font-size: 0.91rem;
  line-height: 1.5;
  resize: none;
  outline: none;
  box-sizing: border-box;
}

.c-concept-chat__input::placeholder {
  color: var(--color-main-550, #999);
}

.c-concept-chat__actions {
  display: flex;
  justify-content: flex-end;
}

.c-concept-chat__send-btn {
  min-height: 2.75rem;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  border: none;
  background-color: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition: all 200ms ease;
}

.c-concept-chat__send-btn:disabled {
  background-color: var(--color-main-300);
  cursor: not-allowed;
}

.c-concept-chat__send-btn:not(:disabled):hover {
  background-color: var(--color-primary-dark, #D93E3C);
  transform: scale(1.08);
}

.c-concept-chat__send-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.c-ai-message__save-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.c-ai-message__save-form {
  display: inline-flex;
}

.c-ai-message__save-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  width: fit-content;
  padding: 0.4rem 0.85rem;
  border: 1px solid #bbb;
  border-radius: 9999px;
  background-color: transparent;
  color: #777;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.c-ai-message__save-btn:hover {
  background-color: #f0f0f0;
  border-color: #999;
  color: #555;
}

.c-ai-message__save-link {
  text-decoration: none;
}

.c-ai-message__save-btn:active {
  transform: scale(0.97);
}

.c-concept-chat__user-msg {
  align-self: flex-end;
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-xl, 1rem);
  border-bottom-right-radius: var(--radius-xs, 0.25rem);
  background-color: var(--color-primary);
  color: #fff;
  font-size: 0.91rem;
  line-height: 1.6;
  word-break: break-word;
}

.c-concept-chat__typing {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.75rem 1rem;
  align-self: flex-start;
}

.c-concept-chat__typing-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  background-color: var(--color-main-400, #bbb);
  animation: concept-typing 1.2s ease-in-out infinite;
}

.c-concept-chat__typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.c-concept-chat__typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes concept-typing {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .c-concept-chat__typing-dot {
    animation: none;
    opacity: 0.6;
  }
}

/* --- AI Message --- */
.c-ai-message {
  padding: 0.75rem 0;
}

.c-ai-message__wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.c-ai-message__avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  flex-shrink: 0;
  overflow: hidden;
}

.c-ai-message__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  object-fit: cover;
}

.c-ai-message__body {
  flex: 1;
  min-width: 0;
}

.c-ai-message__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.c-ai-message__name {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-main-body-dark);
}

.c-ai-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 10px;
  background: linear-gradient(120deg, #EF4846, #FAC75A);
  font-size: 10px;
  line-height: 1;
}

.c-ai-badge__inner {
  display: inline-flex;
  align-items: center;
  background-color: var(--color-main-bg, #fff);
  border-radius: 8px;
}

.c-ai-badge__text {
  padding: 1px 6px;
  font-weight: 700;
  background: linear-gradient(120deg, #EF4846, #FAC75A);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.c-ai-message__text {
  margin: 0.375rem 0 0;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--color-main-body);
  white-space: pre-line;
}

/* --- Hint FAB --- */
.c-hint-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
}

.c-hint-fab__btn {
  height: 2.75rem;
  padding: 0 1rem 0 0.5rem;
  gap: 0.35rem;
  border-radius: 9999px;
  border: none;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(239, 72, 70, 0.35);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.c-hint-fab__btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(239, 72, 70, 0.45);
}

.c-hint-fab__btn-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
}

.c-hint-fab__modal {
  position: absolute;
  bottom: calc(100% + 0.75rem);
  right: 0;
  width: 320px;
  background: var(--color-main-bg);
  border-radius: 1rem;
  border: 1px solid var(--color-main-200);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms ease;
  pointer-events: none;
}

.c-hint-fab__modal--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.c-hint-fab__modal::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 1.1rem;
  width: 12px;
  height: 12px;
  background: var(--color-main-bg);
  border-right: 1px solid var(--color-main-200);
  border-bottom: 1px solid var(--color-main-200);
  transform: rotate(45deg);
}

.c-hint-fab__modal-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.c-hint-fab__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
}

.c-hint-fab__modal-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-main-body-dark);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.c-hint-fab__modal-title-icon {
  width: 1rem;
  height: 1rem;
  color: var(--color-primary);
}

.c-hint-fab__close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--color-main-500, #888);
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  transition: color 150ms ease, background 150ms ease;
}

.c-hint-fab__close:hover {
  color: var(--color-main-body);
  background: var(--color-main-100);
}

.c-hint-fab__close-icon {
  width: 1rem;
  height: 1rem;
}

.c-hint-fab__modal-body {
  max-height: 60vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.c-hint-fab__faq {
  display: flex;
  flex-direction: column;
}

.c-hint-fab__faq-item {
  border-bottom: 1px solid var(--color-main-150, #f0ebe6);
}

.c-hint-fab__faq-item:last-child {
  border-bottom: none;
}

.c-hint-fab__faq-q {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-main-body-dark);
  text-align: left;
  transition: color 150ms ease;
}

.c-hint-fab__faq-q:hover {
  color: var(--color-primary);
}

.c-hint-fab__faq-q[aria-expanded="true"] {
  color: var(--color-primary);
}

.c-hint-fab__faq-chevron {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  color: var(--color-main-400, #bbb);
  transition: transform 200ms ease, color 200ms ease;
}

.c-hint-fab__faq-q[aria-expanded="true"] .c-hint-fab__faq-chevron {
  transform: rotate(90deg);
  color: var(--color-primary);
}

.c-hint-fab__faq-q-text {
  flex: 1;
}

.c-hint-fab__faq-a {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 200ms ease, opacity 200ms ease;
}

.c-hint-fab__faq-a--open {
  max-height: 12rem;
  opacity: 1;
}

.c-hint-fab__faq-a-inner {
  padding: 0 0 0.7rem 1.5rem;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--color-main-body);
}

@media (max-width: 480px) {
  .c-hint-fab__modal {
    width: 280px;
    right: -0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c-hint-fab__faq-chevron,
  .c-hint-fab__faq-a {
    transition: none;
  }
}

/* --- Saved Confirmation Screen (Screen 3) --- */
.c-story-saved-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.c-story-saved-header__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background-color: #e8f5e9;
  color: #43a047;
  margin-bottom: 0.75rem;
}

.c-story-saved-header__icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.c-story-saved-header__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-main-heading, #1a1a1a);
  margin: 0 0 0.35rem;
}

.c-story-saved-header__sub {
  font-size: 0.875rem;
  color: var(--color-main-body-sub, #666);
  margin: 0;
}

.c-story-saved {
  background: var(--color-main-bg, #fff);
  border: 1px solid var(--color-main-200, #e5e5e5);
  border-radius: var(--radius-xl, 1rem);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
  padding: 1.5rem;
}

.c-story-saved__section {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-main-200, #e5e5e5);
}

.c-story-saved__section:first-child {
  padding-top: 0;
}

.c-story-saved__section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.c-story-saved__heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-main-heading, #1a1a1a);
  margin: 0 0 0.5rem;
}

.c-story-saved__text {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--color-main-body, #333);
  white-space: pre-line;
  margin: 0;
}

.c-story-saved__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.c-story-saved__copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border: 1.5px solid var(--color-main-300, #ccc);
  border-radius: 9999px;
  background-color: transparent;
  color: var(--color-main-body, #333);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 200ms ease, border-color 200ms ease;
}

.c-story-saved__copy-btn:hover {
  background-color: var(--color-main-100, #f5f5f5);
  border-color: var(--color-main-400, #999);
}

.c-story-saved__copy-btn:active {
  transform: scale(0.97);
}

.c-story-saved__copy-btn--copied {
  border-color: #43a047;
  color: #43a047;
}

.c-story-saved__copy-icon {
  width: 1rem;
  height: 1rem;
}

.c-story-saved__back-btn {
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: 9999px;
  background-color: var(--color-primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 200ms ease;
}

.c-story-saved__back-btn:hover {
  opacity: 0.85;
}

.c-story-saved__back-btn:active {
  transform: scale(0.97);
}

/* --- Desktop Layout --- */
@media (min-width: 1024px) {
  .cs-story-main {
    padding: 32px 0 48px;
  }

  .cs-story-main-inner {
    padding: 0 24px;
  }

  .c-story-split {
    flex-direction: row;
    gap: 1.5rem;
    align-items: flex-start;
  }

  .c-story-split__phone-wrap {
    flex: 0 0 395px;
    position: sticky;
    top: 2rem;
  }

  .c-story-split--editor .c-story-split__phone-wrap {
    flex-basis: 375px;
    justify-content: flex-start;
  }

  .c-story-split__chat-wrap {
    flex: 1;
    min-width: 0;
  }

  .c-concept-chat {
    max-height: 70vh;
  }
}

/* ============================================================
   Story History List Screens
   ============================================================ */

/* --- List Container --- */
.c-story-list {
  background-color: var(--color-main-bg);
  border-radius: calc(var(--radius-3xl) + 8px);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-md);
}

.c-story-list + .c-story-list {
  margin-top: 2rem;
}

.c-story-list__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.c-story-list__title {
  font-size: 1.11rem;
  font-weight: 700;
  color: var(--color-main-body-dark);
  margin: 0;
}

/* --- Project ID Search (admin) --- */
.cs-project-search {
  margin-bottom: 1.5rem;
}

.cs-project-search__form {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 12px;
}

.cs-project-search__input {
  flex: 1;
  min-width: 0;
}

.cs-input {
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1.5px solid var(--color-main-300);
  border-radius: var(--radius-mdlg);
  background: var(--color-main-bg);
  color: var(--color-main-body-dark);
  font-family: var(--font-base);
  font-size: 14px;
  line-height: 1.7;
}

.cs-input::placeholder {
  color: var(--color-main-550);
}

.cs-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-15);
}

.cs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-mdlg);
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.cs-btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.cs-btn-primary:hover {
  background: var(--color-primary-dark);
}

.cs-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.c-story-list__new-btn {
  font-size: 0.86rem;
  padding: 0.6rem 1.1rem;
}

.c-story-list__new-icon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.25rem;
}

.c-story-list__actions {
  margin-top: 1.25rem;
  text-align: center;
}

/* --- Card Grid --- */
.c-story-list__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .c-story-list__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .c-story-list__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Card --- */
.c-story-list__card {
  display: flex;
  flex-direction: column;
  background: var(--color-main-bg);
  border: 1.5px solid var(--color-main-200);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  padding: 0;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.c-story-list__card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 12px rgba(239, 72, 70, 0.1);
  transform: translateY(-2px);
}

.c-story-list__card--horizontal {
  flex-direction: row;
  grid-column: 1 / -1;
}

.c-story-list__card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--color-main-100);
  overflow: hidden;
}

.c-story-list__card--horizontal .c-story-list__card-image {
  width: 100px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

.c-story-list__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.c-story-list__card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-main-100), var(--color-main-200));
}

.c-story-list__card-body {
  padding: 0.75rem 1rem;
  flex: 1;
  min-width: 0;
}

.c-story-list__card-title {
  font-size: 0.91rem;
  font-weight: 600;
  color: var(--color-main-body-dark);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.c-story-list__card-meta {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--color-main-550, #999);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.c-story-list__card-sub {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--color-main-700);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Status Badge --- */
.c-story-list__badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
}

.c-story-list__badge--completed {
  background: #E8F5E9;
  color: #2E7D32;
}

.c-story-list__badge--saved {
  background: #E3F2FD;
  color: #1565C0;
}

.c-story-list__badge--draft {
  background: var(--color-main-100);
  color: var(--color-main-700);
}

.c-story-list__badge--generating {
  background: #FFF3E0;
  color: #E65100;
}

.c-story-list__badge--failed {
  background: #FFEBEE;
  color: #C62828;
}

/* --- Empty State --- */
.c-story-list__empty {
  text-align: center;
  color: var(--color-main-550, #999);
  font-size: 0.91rem;
  padding: 2rem 1rem;
  margin: 0;
}

.c-story-list__load-more {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}

/* --- Preview Wrap --- */
.c-story-preview-wrap {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

/* --- Project Confirm Detail --- */
.c-project-confirm {
  text-align: left;
  max-width: 900px;
  margin: 0 auto;
}

.c-project-confirm__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-main-body-dark);
  line-height: 1.5;
  margin: 0 0 0.75rem;
  text-align: center;
}

.c-project-confirm__meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.c-project-confirm__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--color-main-700);
}

.c-project-confirm__meta-item svg {
  color: var(--color-main-550, #999);
  flex-shrink: 0;
}

/* --- Image + Stats 2-column --- */
.c-project-confirm__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.c-project-confirm__image-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--color-main-100);
  overflow: hidden;
  border-radius: 0.5rem;
}

.c-project-confirm__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.c-project-confirm__image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-main-100), var(--color-main-200));
}

/* --- Stats Panel --- */
.c-project-confirm__stats-panel {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-main-200);
  border-radius: 0.5rem;
  overflow: hidden;
}

.c-project-confirm__stat-block {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-main-150, #f0ebe6);
}

.c-project-confirm__stat-block:last-child {
  border-bottom: none;
}

.c-project-confirm__stat-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-main-700);
  margin-bottom: 0.25rem;
}

.c-project-confirm__stat-label svg {
  color: var(--color-main-550, #999);
  flex-shrink: 0;
}

.c-project-confirm__stat-amount {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-main-body-dark);
  line-height: 1.3;
}

.c-project-confirm__stat-unit {
  font-size: 1rem;
  font-weight: 700;
  margin-left: 2px;
}

.c-project-confirm__stat-sub {
  display: block;
  font-size: 0.82rem;
  color: var(--color-main-700);
  margin-top: 0.25rem;
}

.c-project-confirm__stat-ended {
  color: var(--color-main-550, #999);
}

/* --- Progress Bar --- */
.c-project-confirm__progress {
  height: 22px;
  background: #F0F0F0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
  position: relative;
}

.c-project-confirm__progress-bar {
  height: 100%;
  min-width: 0;
  background: linear-gradient(120deg, #EF4846, #FAC75A);
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding-left: 8px;
  transition: width 600ms ease;
}

.c-project-confirm__progress-text {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

/* --- Blurb below image --- */
.c-project-confirm__blurb {
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--color-main-body);
  margin: 1rem 0 0;
}

/* --- Desktop: side-by-side --- */
@media (min-width: 768px) {
  .c-project-confirm__body {
    flex-direction: row;
    gap: 1.25rem;
  }

  .c-project-confirm__image-wrap {
    flex: 1;
    min-width: 0;
    aspect-ratio: 4 / 3;
  }

  .c-project-confirm__stats-panel {
    flex: 0 0 320px;
  }
}

/* --- Story Index Actions --- */
.c-story-index-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  padding: 0 16px 16px;
}

.c-story-index-actions__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

/* --- Outline Button --- */
.c-outline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: 2px solid var(--color-main-500);
  border-radius: var(--radius-xl);
  background: transparent;
  color: var(--color-main-700);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}

.c-outline-btn:hover {
  background: var(--color-main-100);
  color: var(--color-main-body);
}
/* ===========================
   Tools Page Styles
   =========================== */

.campfire-studio-tools-main {
  flex: 1;
  min-width: 0;
  padding: 80px 0 48px;
  position: relative;
}

.campfire-studio-tools-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(var(--color-dot-pattern) 1.4px, transparent 1.4px);
  background-size: 20px 20px;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.25), rgba(0,0,0,0.34) 40%, rgba(0,0,0,0.55) 82%, rgba(0,0,0,0.15));
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.25), rgba(0,0,0,0.34) 40%, rgba(0,0,0,0.55) 82%, rgba(0,0,0,0.15));
  pointer-events: none;
  z-index: 0;
}

.campfire-studio-tools-main-inner {
  max-width: 896px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: 0 16px;
}

.campfire-studio-tools-hero {
  text-align: center;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.campfire-studio-tools-hero .c-hero__icon {
  margin-bottom: 8px;
}

.campfire-studio-tools-title {
  margin: 8px 0 0;
  font-size: 30px;
  line-height: 1.3;
  color: var(--color-main-body-dark);
  font-weight: 700;
}

.campfire-studio-tools-subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--color-main-700);
}

/* ================================
   STEP BADGE
   ================================ */
.c-step-badge {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.81rem;
  font-weight: 700;
  color: #fff;
  border-radius: var(--radius-mdlg);
}

.campfire-studio-tools-section {
  margin-top: 48px;
}

.campfire-studio-tools-section:first-of-type {
  margin-top: 32px;
}

.campfire-studio-tools-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.campfire-studio-tools-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-main-body-dark);
  margin: 0;
}

.campfire-studio-tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .campfire-studio-tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .campfire-studio-tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .campfire-studio-tools-main {
    padding: 32px 0 48px;
  }

  .campfire-studio-tools-main-inner {
    padding: 0 24px;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
