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

/* ══════════════════════════════════════════════
   EDITOR — Light Mode (Warm Ivory)
   カラー変数
══════════════════════════════════════════════ */
.editor-body {
  --editor-page-bg:    #f7f5f1;
  --editor-card-bg:    #ffffff;
  --editor-text:       #0e1e38;
  --editor-text-sub:   rgba(14,30,56,0.58);
  --editor-muted:      rgba(14,30,56,0.35);
  --editor-border:     rgba(14,30,56,0.10);
  --editor-accent:     #0e1e38;
  --editor-danger:     #c0392b;
  --editor-success:    #27632a;
  --editor-bar-bg:     rgba(247,245,241,0.92);

  --r-sm:  8px;
  --r-md:  10px;
  --r-lg:  18px;

  min-height: 100dvh;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
               "Hiragino Kaku Gothic ProN", "Yu Gothic UI", sans-serif;
  background: var(--editor-page-bg);
  color: var(--editor-text);
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════════
   Layout wrapper
══════════════════════════════════════════════ */
.editor {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1.25rem 7rem;
  overflow-x: hidden;
}

/* ══════════════════════════════════════════════
   Header
══════════════════════════════════════════════ */
.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: max(1.25rem, env(safe-area-inset-top)) 0 1rem;
  margin-bottom: 0.75rem;
}
.editor-header--minimal {
  padding-bottom: 0.25rem;
  margin-bottom: 0.25rem;
}

.editor-header h1 {
  flex: 1;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--editor-text);
}

.editor-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--editor-border);
  color: var(--editor-text-sub);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
  background: var(--editor-card-bg);
}
.editor-back-btn:hover {
  border-color: var(--editor-accent);
  color: var(--editor-accent);
}

/* ══════════════════════════════════════════════
   Section カード
══════════════════════════════════════════════ */
.editor-section {
  margin-bottom: 14px;
  background: var(--editor-card-bg);
  border-radius: var(--r-lg);
  border: 1px solid rgba(14,30,56,0.07);
  box-shadow: 0 1px 4px rgba(14,30,56,0.06);
  overflow: hidden;
}

/* ① 重要3項目の優先度 */
.editor-section--primary {
  border: 1.5px solid rgba(14,30,56,0.13);
  box-shadow: 0 2px 8px rgba(14,30,56,0.10);
}
.editor-section--primary .editor-section__title {
  font-weight: 700;
}

/* ③ 詳細設定を通常カードと統一 */
.editor-section--config {
  margin-top: 1.5rem;
  box-shadow: 0 1px 4px rgba(14,30,56,0.07), 0 0 0 1px rgba(14,30,56,0.06);
  border: none;
}

.editor-section__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.125rem 1.25rem;
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  gap: 0.75rem;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.editor-section__toggle:hover {
  background: rgba(14,30,56,0.025);
}

/* ⑤ 展開中のトグル背景 */
.editor-section:not(.editor-section--collapsed) .editor-section__toggle {
  background: rgba(14,30,56,0.02);
}

.editor-section__toggle-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}

.editor-section__num {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--editor-muted);
  line-height: 1.2;
}

.editor-section__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--editor-text);
}

.editor-section__current {
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  color: var(--editor-muted);
  opacity: 0;
  transition: opacity 0.18s;
  margin-top: 0.1rem;
}
.editor-section--collapsed .editor-section__current { opacity: 1; }

.editor-section__chevron {
  width: 16px;
  height: 16px;
  color: var(--editor-muted);
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1);
}
.editor-section--collapsed .editor-section__chevron { transform: rotate(-90deg); }

/* accordion open/close */
.editor-section__body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.28s cubic-bezier(0.16,1,0.3,1);
  overflow: hidden;
}
.editor-section--collapsed .editor-section__body { grid-template-rows: 0fr; }

.editor-section__body-inner {
  min-height: 0;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  padding: 0 1.25rem 1.375rem;
  transition: padding 0.28s cubic-bezier(0.16,1,0.3,1);
}
.editor-section--collapsed .editor-section__body-inner {
  padding-top: 0;
  padding-bottom: 0;
}

/* セパレーター（toggle と body-inner の間） */
.editor-section:not(.editor-section--collapsed) .editor-section__toggle {
  border-bottom: 1px solid var(--editor-border);
}

/* ══════════════════════════════════════════════
   Fields
══════════════════════════════════════════════ */
.editor-field { margin-bottom: 1.125rem; }
.editor-field:last-child { margin-bottom: 0; }

.editor-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--editor-text);
  margin-bottom: 0.3rem;
}

.editor-field--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.875rem;
}
.editor-field--row > label {
  margin-bottom: 0;
}

.editor-field__hint {
  display: block;
  font-size: 12px;
  line-height: 1.6;
  color: var(--editor-muted);
  margin-bottom: 0.5rem;
}

.editor-field__required {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.5625rem;
  font-weight: 700;
  color: var(--editor-danger);
  opacity: 0.85;
}

/* inputs */
.editor-field input[type="text"],
.editor-field input[type="tel"],
.editor-field input[type="url"],
.editor-field input[type="password"],
.editor-field input[type="number"],
.editor-field textarea,
.editor-field select {
  box-sizing: border-box;
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid rgba(14,30,56,0.12);
  border-radius: 10px;
  background: var(--editor-card-bg);
  color: var(--editor-text);
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.editor-field input::placeholder,
.editor-field textarea::placeholder { color: var(--editor-muted); }

.editor-field input:focus,
.editor-field textarea:focus,
.editor-field select:focus {
  outline: none;
  border-color: var(--editor-accent);
  box-shadow: 0 0 0 3px rgba(14,30,56,0.08);
}

.editor-field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.65;
}

.editor-field__name-textarea {
  min-height: unset;
  height: auto;
  resize: none;
  line-height: 1.5;
  font-family: inherit;
  letter-spacing: 0.05em;
}

/* ══════════════════════════════════════════════
   Buttons
══════════════════════════════════════════════ */
.editor-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.875rem;
  border: 1.5px solid var(--editor-border);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--editor-text-sub);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.editor-btn-ghost:hover {
  border-color: var(--editor-accent);
  color: var(--editor-accent);
  background: rgba(14,30,56,0.04);
}

.editor-btn-ghost--sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.editor-btn-danger {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--editor-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.editor-btn-danger:hover {
  border-color: var(--editor-danger);
  color: var(--editor-danger);
}

/* ══════════════════════════════════════════════
   Background image preview
══════════════════════════════════════════════ */
.editor-bg-preview {
  position: relative;
  width: auto;
  height: 260px;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1.5px dashed var(--editor-border);
  background: rgba(14,30,56,0.03);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s;
}

.editor-bg-preview--landscape {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: none;
}

.editor-bg-preview:hover,
.editor-bg-preview:focus {
  border-color: var(--editor-accent);
  outline: none;
}
.editor-bg-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.editor-bg-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--editor-muted);
  font-size: 0.6875rem;
  pointer-events: none;
}

.editor-bg-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.625rem;
}

/* ── コンパクト3枚横並び（トップ画像スライド） ── */
.editor-bgslide-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
}

.editor-bgslide {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
}

.editor-bgslide__label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--editor-muted);
}

.editor-bg-preview--compact {
  width: auto;
  height: 128px;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
}

.editor-bg-preview--compact.editor-bg-preview--landscape {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.editor-bg-preview--compact .editor-bg-placeholder {
  font-size: 0.5625rem;
  gap: 0.25rem;
}

.editor-bg-actions--compact {
  gap: 0.375rem;
  margin-top: 0.375rem;
}

.editor-bg-actions--compact .editor-btn-ghost--sm,
.editor-bg-actions--compact .editor-btn-danger {
  font-size: 0.625rem;
  padding: 0.25rem 0.5rem;
}

/* ══════════════════════════════════════════════
   CTA rows
══════════════════════════════════════════════ */
.editor-cta-list { display: flex; flex-direction: column; gap: 0.5rem; }

.editor-cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.875rem;
  border: 1.5px solid var(--editor-border);
  border-radius: 12px;
  background: var(--editor-page-bg);
}
.editor-cta-row.is-off { opacity: 0.45; }

.editor-cta-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.editor-cta-row__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--editor-text);
}

.editor-cta-row input[type="text"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid rgba(14,30,56,0.12);
  border-radius: var(--r-sm);
  background: var(--editor-card-bg);
  color: var(--editor-text);
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  box-sizing: border-box;
}
.editor-cta-row input[type="text"]:focus {
  outline: none;
  border-color: var(--editor-accent);
}
.editor-cta-row input[type="text"]::placeholder { color: var(--editor-muted); }
.editor-cta-row input[type="text"]:disabled { opacity: 0.3; }

/* ══════════════════════════════════════════════
   SNS social list
══════════════════════════════════════════════ */
.editor-social-list { display: flex; flex-direction: column; gap: 0.5rem; }

.editor-social-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border: 1.5px solid var(--editor-border);
  border-radius: 12px;
  background: var(--editor-page-bg);
}
.editor-social-item.is-off { opacity: 0.38; }

.editor-social-item__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: rgba(14,30,56,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--editor-text-sub);
}
.editor-social-item__icon svg { width: 17px; height: 17px; }

.editor-social-item__body { display: flex; flex-direction: column; gap: 0.375rem; min-width: 0; }

.editor-social-item__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--editor-text);
}

.editor-social-item__row { display: flex; gap: 0.5rem; align-items: center; }

.editor-social-item__row input[type="url"] {
  flex: 1;
  min-width: 0;
  padding: 0.4375rem 0.625rem;
  border: 1.5px solid rgba(14,30,56,0.12);
  border-radius: var(--r-sm);
  background: var(--editor-card-bg);
  color: var(--editor-text);
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.editor-social-item__row input[type="url"]:focus {
  outline: none;
  border-color: var(--editor-accent);
}
.editor-social-item__row input[type="url"]::placeholder { color: var(--editor-muted); }

/* ══════════════════════════════════════════════
   Toggle switch
══════════════════════════════════════════════ */
.editor-toggle {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 28px;
  cursor: pointer;
}
.editor-toggle input { opacity: 0; width: 0; height: 0; }

.editor-toggle__slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(14,30,56,0.18);
  transition: background 0.2s;
  cursor: pointer;
}
.editor-toggle__slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 4px;
  top: 4px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.22s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 1px 4px rgba(14,30,56,0.18), 0 1px 2px rgba(14,30,56,0.1);
}
.editor-toggle input:checked + .editor-toggle__slider { background: var(--editor-accent); }
.editor-toggle input:checked + .editor-toggle__slider::before { transform: translateX(20px); }

/* ══════════════════════════════════════════════
   Theme picker
══════════════════════════════════════════════ */
.editor-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 0.375rem;
}

.editor-theme-btn {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  width: 100%;
  padding: 0.875rem;
  border: 1.5px solid var(--editor-border);
  border-radius: 12px;
  background: var(--editor-page-bg);
  color: var(--editor-text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.editor-theme-btn:hover { border-color: rgba(14,30,56,0.25); }
.editor-theme-btn.is-active {
  border-color: var(--editor-accent);
  background: rgba(14,30,56,0.05);
  box-shadow: 0 0 0 1px var(--editor-accent);
}

.editor-theme-btn__swatch {
  flex-shrink: 0;
  width: 100%;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.08);
}
.editor-theme-btn__swatch--ivory     { background: #f4f0e6; }
.editor-theme-btn__swatch--black     { background: #080808; }

.editor-theme-btn__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--editor-text);
}
.editor-theme-btn__desc {
  font-size: 0.625rem;
  color: var(--editor-muted);
  line-height: 1.45;
}

/* ══════════════════════════════════════════════
   Text / Accent color picker
══════════════════════════════════════════════ */
.editor-text-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.25rem;
}

.editor-tc-btn {
  display: flex;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--editor-border);
  background: var(--editor-page-bg);
  color: var(--editor-text-sub);
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.editor-tc-btn:hover { border-color: rgba(14,30,56,0.25); color: var(--editor-text); }
.editor-tc-btn.is-active {
  border-color: var(--editor-accent);
  color: var(--editor-accent);
  background: rgba(14,30,56,0.05);
  box-shadow: 0 0 0 1px var(--editor-accent);
}

.editor-tc-swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  border: 1px solid rgba(14,30,56,0.12);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   Gallery grids
══════════════════════════════════════════════ */
.editor-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
}

.editor-gallery-slot {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.editor-gallery-slot__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-sm);
  border: 1.5px dashed var(--editor-border);
  background: rgba(14,30,56,0.03);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s;
}
.editor-gallery-slot__thumb:hover,
.editor-gallery-slot__thumb:focus { border-color: var(--editor-accent); outline: none; }
.editor-gallery-slot.has-image .editor-gallery-slot__thumb {
  border-style: solid;
  border-color: var(--editor-border);
}
.editor-gallery-slot__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.editor-gallery-slot__fields {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
/* 3クラス連結でベースの .editor-field input[type="text"] より詳細度を上げて確実に上書きする */
.editor-gallery-grid .editor-gallery-slot__fields .editor-gallery-title-input {
  font-size: 12px;
  line-height: 1.3;
  padding: 4px 6px;
  height: auto;
}
.editor-gallery-grid .editor-gallery-slot__fields .editor-gallery-desc-textarea {
  font-size: 10px;
  line-height: 1.4;
  padding: 6px;
  height: 85px;
  min-height: 85px;
  resize: none;
  overflow-x: hidden;
  overflow-y: auto;
  white-space: normal;
  word-break: break-word;
}

.editor-gallery-slot__add {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--editor-muted);
  font-size: 0.5rem;
  pointer-events: none;
}

.editor-gallery-slot__remove {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.15s;
}
.editor-gallery-slot__remove:hover { background: var(--editor-danger); }

.editor-menu-tabs-nav {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.editor-menu-tab-btn {
  flex: 1;
  padding: 0.5rem 0.5rem;
  border: 1.5px solid var(--editor-border);
  border-radius: var(--r-sm);
  background: var(--editor-card-bg);
  color: var(--editor-text-sub);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.editor-menu-tab-btn.is-active {
  border-color: var(--editor-accent);
  background: rgba(14,30,56,0.08);
  color: var(--editor-accent);
}
.editor-menu-tab-btn:hover:not(.is-active) {
  border-color: rgba(14,30,56,0.25);
}

.editor-menu-tab-panel {
  padding-top: 0.75rem;
}

/* ══════════════════════════════════════════════
   Panel editor rows
══════════════════════════════════════════════ */
.editor-panel-rows {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.editor-panel-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.875rem;
  background: var(--editor-page-bg);
  border: 1.5px solid var(--editor-border);
  border-radius: 12px;
}

.editor-panel-row__num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(14,30,56,0.08);
  color: var(--editor-muted);
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.25rem;
}

.editor-panel-row__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.editor-panel-name {
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: var(--editor-card-bg);
  border: 1.5px solid rgba(14,30,56,0.12);
  border-radius: var(--r-sm);
  color: var(--editor-text);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  box-sizing: border-box;
}
.editor-panel-name:focus { border-color: var(--editor-accent); }
.editor-panel-name::placeholder { color: var(--editor-muted); }

.editor-panel-price,
.editor-panel-desc {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--editor-card-bg);
  border: 1.5px solid rgba(14,30,56,0.12);
  border-radius: var(--r-sm);
  color: var(--editor-text-sub);
  font-family: inherit;
  font-size: 0.8125rem;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  box-sizing: border-box;
}
.editor-panel-price:focus,
.editor-panel-desc:focus { border-color: var(--editor-accent); }
.editor-panel-price::placeholder,
.editor-panel-desc::placeholder { color: var(--editor-muted); }

/* ══════════════════════════════════════════════
   Panel image upload
══════════════════════════════════════════════ */
.editor-panel-img-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.125rem;
}

.editor-panel-img-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px dashed var(--editor-border);
  background-color: var(--editor-card-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.editor-panel-img-thumb:hover {
  border-color: var(--editor-accent);
}

.editor-panel-img-thumb.has-img {
  border-style: solid;
}

.editor-panel-img-thumb__label {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--editor-muted);
  letter-spacing: 0.04em;
  text-align: center;
  pointer-events: none;
  user-select: none;
  line-height: 1.4;
}

.editor-panel-img-remove {
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(192,57,43,0.30);
  background: transparent;
  color: var(--editor-danger);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}

.editor-panel-img-remove:hover {
  background: rgba(192,57,43,0.08);
}

/* ══════════════════════════════════════════════
   Save bar
══════════════════════════════════════════════ */
.editor-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0.875rem 1.25rem;
  padding-bottom: max(0.875rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--editor-border);
  background: var(--editor-bar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.editor-bar__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 600px;
  margin: 0 auto;
}

.editor-btn-save {
  flex: 1;
  height: 48px;
  padding: 0 1.25rem;
  border: none;
  border-radius: 12px;
  background: var(--editor-accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.12s cubic-bezier(0.16,1,0.3,1);
}
.editor-btn-save:active { transform: scale(0.98); opacity: 0.92; }
@media (hover: hover) {
  .editor-btn-save:hover {
    opacity: 0.88;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(14,30,56,0.24);
  }
}
.editor-btn-save.is-dirty {
  box-shadow: 0 4px 18px rgba(14,30,56,0.32);
}

.editor-btn-save--sm {
  flex: none;
  height: auto;
  padding: 0.625rem 1.125rem;
  font-size: 0.875rem;
}

.editor-btn-reset {
  flex-shrink: 0;
  padding: 0.875rem 0.75rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--editor-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
}
.editor-btn-reset:hover { color: var(--editor-danger); }

/* ══════════════════════════════════════════════
   Toast
══════════════════════════════════════════════ */
.editor-toast {
  position: fixed;
  top: -4rem;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  z-index: 100;
  padding: 0.625rem 1.25rem;
  border: 1.5px solid var(--editor-border);
  border-radius: 16px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #0e1e38; /* 背景は常に白固定のため、テーマに関わらず読める濃色に固定する */
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 4px 24px rgba(14,30,56,0.12);
}
.editor-toast.is-visible  { transform: translateX(-50%) translateY(calc(4rem + 12px)); }
.editor-toast.is-success  { border-color: var(--editor-success); color: var(--editor-success); }
.editor-toast.is-error    { border-color: var(--editor-danger);  color: var(--editor-danger); }

/* ══════════════════════════════════════════════
   Password config section
══════════════════════════════════════════════ */
.editor-config-pw { display: flex; flex-direction: column; gap: 0.5rem; }

.editor-config-pw input[type="password"] {
  width: 100%;
  padding: 11px 13px;
  background: var(--editor-card-bg);
  border: 1.5px solid rgba(14,30,56,0.12);
  border-radius: 10px;
  color: var(--editor-text);
  font-family: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  box-sizing: border-box;
}
.editor-config-pw input:focus { border-color: var(--editor-accent); }
.editor-config-pw input::placeholder { color: var(--editor-muted); }

.editor-config-pw__msg { font-size: 0.75rem; margin: 0; min-height: 1em; color: var(--editor-muted); }
.editor-config-pw__msg.is-error { color: var(--editor-danger); }
.editor-config-pw__msg.is-ok    { color: var(--editor-success); }

/* ══════════════════════════════════════════════
   Password gate
══════════════════════════════════════════════ */
.editor-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--editor-page-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease;
}
.editor-gate.is-hidden { opacity: 0; pointer-events: none; display: none; }

.editor-gate__back {
  position: absolute;
  top: max(1.5rem, env(safe-area-inset-top));
  left: 1.5rem;
}

.editor-gate__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 280px;
  padding: 2rem 1.5rem;
  background: var(--editor-card-bg);
  border-radius: var(--r-lg);
  box-shadow: 0 2px 20px rgba(14,30,56,0.08), 0 0 0 1px rgba(14,30,56,0.06);
}

.editor-gate__icon {
  color: var(--editor-muted);
}

.editor-gate__title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--editor-text);
  text-transform: uppercase;
}

.editor-gate__input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--editor-page-bg);
  border: 1.5px solid rgba(14,30,56,0.12);
  border-radius: 10px;
  color: var(--editor-text);
  font-family: inherit;
  font-size: 1.5rem;
  text-align: center;
  letter-spacing: 0.2em;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  box-sizing: border-box;
}
.editor-gate__input:focus { border-color: var(--editor-accent); box-shadow: 0 0 0 3px rgba(14,30,56,0.08); }

.editor-gate__btn {
  width: 100%;
  padding: 0.875rem;
  background: var(--editor-accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.editor-gate__btn:hover { opacity: 0.88; }

.editor-gate__error {
  font-size: 0.75rem;
  color: var(--editor-danger);
  margin: 0;
  min-height: 1em;
  text-align: center;
}

/* ══════════════════════════════════════════════
   Confirm overlay (reset dialog)
══════════════════════════════════════════════ */
.editor-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(14,30,56,0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.editor-confirm-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.editor-confirm-box {
  width: 100%;
  max-width: 320px;
  background: var(--editor-card-bg);
  border: 1.5px solid var(--editor-border);
  border-radius: var(--r-lg);
  padding: 1.75rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 20px 60px rgba(14,30,56,0.18);
}
.editor-confirm-overlay.is-open .editor-confirm-box {
  transform: translateY(0) scale(1);
}

.editor-confirm-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--editor-text);
  text-align: center;
}

.editor-confirm-body {
  font-size: 0.8125rem;
  color: var(--editor-text-sub);
  text-align: center;
  line-height: 1.6;
}

.editor-confirm-actions {
  display: flex;
  gap: 0.625rem;
  margin-top: 0.25rem;
}

.editor-confirm-cancel {
  flex: 1;
  padding: 0.75rem;
  border: 1.5px solid var(--editor-border);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--editor-text-sub);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.editor-confirm-cancel:hover {
  border-color: rgba(14,30,56,0.3);
  color: var(--editor-text);
}

.editor-confirm-ok {
  flex: 1;
  padding: 0.75rem;
  border: none;
  border-radius: var(--r-md);
  background: var(--editor-danger);
  color: #fff;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.editor-confirm-ok:hover { opacity: 1; }

/* ══════════════════════════════════════════════
   fillForm 完了前のチラつき防止
══════════════════════════════════════════════ */
.editor-body:not(.editor-ready) .editor { visibility: hidden; }

/* ══════════════════════════════════════════════
   Image Theme Preview Strip  — 2-col grid
══════════════════════════════════════════════ */
.editor-it-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
  margin-bottom: 1rem;
}

.editor-it-strip__empty {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  color: var(--editor-muted);
  padding: 1.5rem 0 0.5rem;
  text-align: center;
}

.editor-it-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(14,30,56,0.08);
  background: rgba(14,30,56,0.05);
  cursor: pointer;
  isolation: isolate;
  padding: 0;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s cubic-bezier(0.16,1,0.3,1);
  -webkit-tap-highlight-color: transparent;
}
.editor-it-preview:hover { border-color: rgba(14,30,56,0.28); }
.editor-it-preview:active { transform: scale(0.97); }
.editor-it-preview.is-active {
  border-color: var(--editor-accent);
  box-shadow: 0 0 0 2px var(--editor-accent);
}
.editor-it-preview.is-active::before {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--editor-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 22px;
  z-index: 20;
}

.editor-it-preview .img-theme-root {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.editor-it-preview__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 0.5rem 0.625rem;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.72));
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.03em;
  line-height: 1.3;
  z-index: 10;
  pointer-events: none;
}

/* ══════════════════════════════════════════════
   テーマ別 カラー上書き
   サイトのテーマに合わせてエディター＆ゲート背景を変える
══════════════════════════════════════════════ */

/* DARK テーマ */
.editor-body[data-theme="black"] {
  --editor-page-bg:    #0d0d0d;
  --editor-card-bg:    #1a1a1a;
  --editor-text:       #f0ece4;
  --editor-text-sub:   rgba(240,236,228,0.60);
  --editor-muted:      rgba(240,236,228,0.38);
  --editor-border:     rgba(255,255,255,0.09);
  --editor-accent:     #c8b99a;
  --editor-danger:     #e05c4b;
  --editor-success:    #5abf6a;
  --editor-bar-bg:     rgba(13,13,13,0.94);
}

/* STONE テーマ */
.editor-body[data-theme="ivory"] {
  --editor-page-bg:    #f4f0e6;
  --editor-card-bg:    #fdfaf4;
  --editor-text:       #1c1510;
  --editor-text-sub:   rgba(28,21,16,0.58);
  --editor-muted:      rgba(28,21,16,0.36);
  --editor-border:     rgba(28,21,16,0.10);
  --editor-accent:     #2c2218;
  --editor-danger:     #c0392b;
  --editor-success:    #27632a;
  --editor-bar-bg:     rgba(244,240,230,0.94);
}

/* DARK テーマ：ゲートボックスの影を強調 */
.editor-body[data-theme="black"] .editor-gate__box {
  box-shadow: 0 4px 32px rgba(0,0,0,0.60), 0 0 0 1px rgba(255,255,255,0.07);
}

/* DARK テーマ：入力フォーカスリング */
.editor-body[data-theme="black"] .editor-gate__input:focus {
  border-color: rgba(200,185,154,0.50);
  box-shadow: 0 0 0 3px rgba(200,185,154,0.15);
}

/* ══════════════════════════════════════════════
   PREMIUM REFINEMENTS — Editor Quality Polish
   Identity preserved — craft elevated.
══════════════════════════════════════════════ */

/* ── Section cards: tighter rhythm ─────────── */
.editor-section {
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(14,30,56,0.05), 0 1px 8px rgba(14,30,56,0.04);
}

/* ── Section number: 非表示 ─────────────── */
.editor-section__num {
  display: none;
}

/* ── Section title: crisper ─────────────────── */
.editor-section__title {
  font-size: 14.5px;
  letter-spacing: -0.015em;
}

/* ── Section current label: more readable ──── */
.editor-section__current {
  font-size: 0.6875rem;
  letter-spacing: 0.015em;
}

/* ── Field label: tighter margin ────────────── */
.editor-field label {
  margin-bottom: 0.35rem;
  letter-spacing: -0.005em;
}

/* ── Field hint: better line rhythm ─────────── */
.editor-field__hint {
  line-height: 1.65;
  margin-bottom: 0.5625rem;
}

/* ── Inputs: subtle line-height refinement ─── */
.editor-field textarea {
  min-height: 100px;
  line-height: 1.72;
}

/* ── Panel rows: more generous proportions ─── */
#panel-editor-rows {
  gap: 0.75rem;
}

.editor-panel-row {
  padding: 1rem;
  border-radius: 14px;
  gap: 0.875rem;
}

/* ── Panel number badge: refined ────────────── */
.editor-panel-row__num {
  width: 24px;
  height: 24px;
  font-size: 0.625rem;
  background: rgba(14,30,56,0.06);
  border: 1px solid rgba(14,30,56,0.08);
  border-radius: 50%;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ── Panel input hierarchy ──────────────────── */
.editor-panel-name {
  padding: 0.6875rem 0.875rem;
  border-radius: 9px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.editor-panel-price,
.editor-panel-desc {
  padding: 0.5625rem 0.875rem;
  border-radius: 9px;
  font-size: 0.8125rem;
}

/* ── Theme picker: more breathing ───────────── */
.editor-theme-btn {
  padding: 1rem;
  gap: 0.75rem;
  border-radius: 14px;
}

.editor-theme-btn__swatch {
  height: 36px;
  border-radius: 7px;
}

.editor-theme-btn__label {
  font-size: 0.8125rem;
  letter-spacing: -0.005em;
}

/* ── CTA rows: more padding ──────────────────── */
.editor-cta-row {
  padding: 1rem;
  border-radius: 14px;
  gap: 0.625rem;
}

/* ── Social items: more generous ────────────── */
.editor-social-item {
  padding: 0.875rem;
  border-radius: 14px;
}

/* ── Save bar button: rounder, more confident */
.editor-btn-save {
  height: 50px;
  border-radius: 13px;
  letter-spacing: 0.015em;
}

/* ── Gate box: more generous, more premium ─── */
.editor-gate__box {
  max-width: 300px;
  padding: 2.25rem 1.75rem;
  gap: 1.25rem;
  border-radius: 20px;
}

/* ── Gate password input: more intentional ─── */
.editor-gate__input {
  padding: 0.9375rem 1rem;
  border-radius: 12px;
  letter-spacing: 0.25em;
  font-size: 1.375rem;
}

/* ── Gate button: match input radius ────────── */
.editor-gate__btn {
  padding: 0.9375rem;
  border-radius: 12px;
  letter-spacing: 0.01em;
}

/* ── Confirm dialog: more generous ──────────── */
.editor-confirm-box {
  padding: 2rem 1.75rem 1.5rem;
  gap: 1.125rem;
  border-radius: 20px;
}

.editor-confirm-body {
  line-height: 1.68;
}

/* ── Toast: slightly more refined ───────────── */
.editor-toast {
  padding: 0.6875rem 1.375rem;
  border-radius: 18px;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

/* ── Back button: slightly larger target ────── */
.editor-back-btn {
  width: 36px;
  height: 36px;
}

/* ── Header title: crisper ───────────────────── */
.editor-header h1 {
  font-size: 0.875rem;
  letter-spacing: 0.01em;
}

/* ── Image theme preview: crisper active ring */
.editor-it-preview.is-active {
  box-shadow: 0 0 0 2.5px var(--editor-accent);
}


/* ── CTA mode picker: segmented control ───────── */
.editor-btn-group {
  display: inline-flex;
  background: var(--editor-surface, #f3f4f6);
  border: 1.5px solid var(--editor-border, #e5e7eb);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  width: 100%;
  box-sizing: border-box;
}
.editor-btn-group__btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 7px;
  background: transparent;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--editor-text-muted, #9ca3af);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  text-align: center;
}
.editor-btn-group__btn.is-active {
  background: #111;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

/* ── 入力欄視認性改善（ライト・ダーク両対応） ── */

/* 対象: editor-field / cta / social すべての入力欄 */
.editor-field input[type="text"],
.editor-field input[type="tel"],
.editor-field input[type="url"],
.editor-field input[type="password"],
.editor-field input[type="number"],
.editor-field textarea,
.editor-field select,
.editor-cta-row input[type="text"],
.editor-social-item__row input[type="url"] {
  border-color: rgba(14, 30, 56, 0.20);
  background-color: rgba(0, 0, 0, 0.03);
}

/* フォーカス: 全テーマ共通でベージュゴールド */
.editor-field input:focus,
.editor-field input:focus-visible,
.editor-field textarea:focus,
.editor-field textarea:focus-visible,
.editor-field select:focus,
.editor-cta-row input[type="text"]:focus,
.editor-social-item__row input[type="url"]:focus {
  border-color: #B8924E !important;
  box-shadow: 0 0 0 3px rgba(184, 146, 78, 0.18) !important;
  outline: none;
}

/* プレースホルダー（ライト） */
.editor-field input::placeholder,
.editor-field textarea::placeholder,
.editor-cta-row input[type="text"]::placeholder,
.editor-social-item__row input[type="url"]::placeholder {
  color: rgba(14, 30, 56, 0.35);
}

/* ダークテーマ: 白系枠線・薄明るい背景に上書き */
.editor-body[data-theme="black"] .editor-field input[type="text"],
.editor-body[data-theme="black"] .editor-field input[type="tel"],
.editor-body[data-theme="black"] .editor-field input[type="url"],
.editor-body[data-theme="black"] .editor-field input[type="password"],
.editor-body[data-theme="black"] .editor-field input[type="number"],
.editor-body[data-theme="black"] .editor-field textarea,
.editor-body[data-theme="black"] .editor-field select,
.editor-body[data-theme="black"] .editor-cta-row input[type="text"],
.editor-body[data-theme="black"] .editor-social-item__row input[type="url"] {
  border-color: rgba(255, 255, 255, 0.22);
  background-color: rgba(255, 255, 255, 0.05);
}

/* プレースホルダー（ダーク） */
.editor-body[data-theme="black"] .editor-field input::placeholder,
.editor-body[data-theme="black"] .editor-field textarea::placeholder,
.editor-body[data-theme="black"] .editor-cta-row input[type="text"]::placeholder,
.editor-body[data-theme="black"] .editor-social-item__row input[type="url"]::placeholder {
  color: rgba(240, 236, 228, 0.35);
}

/* お支払い方法チェックボックス */
.payment-check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem 1rem; margin-bottom: 0.75rem; }
.payment-check-item { display: flex; align-items: center; gap: 0.5rem; font-size: 13px; color: var(--editor-text); cursor: pointer; user-select: none; }
.payment-check-item input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--editor-accent); cursor: pointer; }
.payment-others { display: flex; flex-direction: column; gap: 0.5rem; }
.payment-others input[type="text"] { box-sizing: border-box; width: 100%; padding: 9px 12px; border: 1.5px solid rgba(14,30,56,0.12); border-radius: 10px; background: var(--editor-card-bg); color: var(--editor-text); font-family: inherit; font-size: 16px; transition: border-color 0.15s, box-shadow 0.15s; -webkit-appearance: none; }
.payment-others input[type="text"]::placeholder { color: var(--editor-muted); }
.payment-others input[type="text"]:focus { outline: none; border-color: var(--editor-accent); box-shadow: 0 0 0 3px rgba(14,30,56,0.08); }
.editor-body[data-theme="black"] .payment-others input[type="text"] { border-color: rgba(255,255,255,0.22); background-color: rgba(255,255,255,0.05); }
.editor-body[data-theme="black"] .payment-others input[type="text"]::placeholder { color: rgba(240,236,228,0.35); }

/* ── ivory テーマ: アクセントをウォームブラウンに ─────────────────── */
.editor-body[data-theme="ivory"] {
  --editor-page-bg:  #f7f5f1;
  --editor-card-bg:  #ffffff;
  --editor-text:     #1c1510;
  --editor-text-sub: rgba(28,21,16,0.58);
  --editor-muted:    rgba(28,21,16,0.35);
  --editor-border:   rgba(60,50,35,0.12);
  --editor-accent:   #2c2218;
  --editor-bar-bg:   rgba(247,245,241,0.92);
}

/* ── white テーマ: アクセントをピュアブラックに ─────────────────── */
.editor-body[data-theme="white"] {
  --editor-page-bg:  #f2f2f2;
  --editor-card-bg:  #ffffff;
  --editor-text:     #0d0d0d;
  --editor-text-sub: rgba(13,13,13,0.55);
  --editor-muted:    rgba(13,13,13,0.35);
  --editor-border:   rgba(0,0,0,0.10);
  --editor-accent:   #111111;
  --editor-bar-bg:   rgba(242,242,242,0.92);
}

/* ── 入力欄クリアボタン（全テキスト入力・テキストエリア共通） ── */
.editor-clearable {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}
.editor-clearable input[type="text"],
.editor-clearable input[type="url"],
.editor-clearable textarea {
  width: 100%;
  padding-right: 2rem;
  box-sizing: border-box;
}
.editor-clear-btn {
  display: none;
  position: absolute;
  right: 0.4rem;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--editor-border);
  color: var(--editor-text-sub);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.editor-clear-btn:hover { background: var(--editor-danger); color: #fff; }
.editor-clearable.is-input .editor-clear-btn {
  top: 50%;
  transform: translateY(-50%);
}
.editor-clearable.is-textarea .editor-clear-btn {
  top: 0.5rem;
}
.editor-clearable input[type="text"]:not(:placeholder-shown) ~ .editor-clear-btn,
.editor-clearable input[type="url"]:not(:placeholder-shown) ~ .editor-clear-btn,
.editor-clearable textarea:not(:placeholder-shown) ~ .editor-clear-btn {
  display: flex;
}
