/* ========================================
   Base
======================================== */

:root {
  --bg: #f7f4ef;
  --surface: #fffdf9;
  --text: #2f2924;
  --muted: #756b63;
  --line: rgba(47, 41, 36, 0.12);
  --accent: #2f2924;
  --soft: #ece5dd;
  --danger: #9f2f2f;
  --shadow: 0 18px 50px rgba(47, 41, 36, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans",
    "Yu Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}


/* ========================================
   Top bar
======================================== */

.editor-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 239, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.editor-topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.editor-eyebrow,
.section-label,
.modal-label {
  margin: 0 0 4px;
  color: #9a8c80;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.editor-topbar h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.editor-help {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  gap: 8px;
}

.secondary-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}


/* ========================================
   Editor page
======================================== */

.editor-page {
  width: min(100% - 28px, 900px);
  margin: 20px auto 80px;
}

.editor-status {
  margin-bottom: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.76);
}

.editor-status div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-status p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #4d8f62;
  box-shadow: 0 0 0 4px rgba(77, 143, 98, 0.12);
}

.visual-section {
  margin-bottom: 56px;
}


/* ========================================
   Hero
======================================== */

.visual-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 22px;
  background:
    linear-gradient(rgba(31, 24, 19, 0.40), rgba(31, 24, 19, 0.40)),
    linear-gradient(135deg, #86776b, #3c342e);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.image-edit-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;

  width: 42px;
  height: 42px;
  padding: 0;

  display: grid;
  place-items: center;

  border: 1px solid rgba(47, 41, 36, 0.12);
  border-radius: 50%;

  background: rgba(255, 253, 249, 0.96);
  color: #2f2924;

  box-shadow: 0 4px 14px rgba(47, 41, 36, 0.08);

  font-size: 0;
}

.image-edit-button::after {
  content: "✏️";
  font-size: 16px;
}

.hero-overlay {
  width: min(82%, 590px);
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border-radius: 16px;
  background: rgba(20, 14, 10, 0.30);
  backdrop-filter: blur(2px);
}

.inline-edit-button {
  border: 0;
  background: transparent;
  color: white;
  text-align: center;
}

.hero-title-button {
  font-size: clamp(30px, 6vw, 54px);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-address-button {
  font-size: 14px;
  opacity: 0.92;
}

.pencil {
  width: 30px;
  height: 30px;
  margin-left: 10px;

  display: inline-grid;
  place-items: center;

  border: 1px solid rgba(47, 41, 36, 0.12);
  border-radius: 50%;

  background: rgba(255, 253, 249, 0.96);

  font-size: 13px;
  line-height: 1;
}


/* ========================================
   Content sections
======================================== */

.content-section {
  padding: 4px 4px 0;
}

.section-heading {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0.02em;
}

.section-guide {
  margin: -8px 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.round-edit-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.add-button {
  min-height: 42px;
  padding: 0 16px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  border: 1px solid rgba(47, 41, 36, 0.18);
  border-radius: 999px;

  background: rgba(255, 253, 249, 0.96);
  color: #2f2924;

  box-shadow: 0 4px 14px rgba(47, 41, 36, 0.06);

  font-size: 14px;
  font-weight: 700;
}

.add-button:hover {
  background: #2f2924;
  color: white;
}

.editable-block {
  width: 100%;
  padding: 20px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: #5b5149;
  text-align: left;
  font-size: 16px;
  line-height: 2;
}


/* ========================================
   Menu
======================================== */

.visual-menu-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 30px;
}

.editor-menu-card {
  position: relative;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.editor-menu-card::after,
.editor-news-card::after {
  content: "✏️";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(47, 41, 36, 0.12);
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.96);
  color: #2f2924;
  box-shadow: 0 4px 14px rgba(47, 41, 36, 0.08);
  font-size: 16px;
}

.editor-menu-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  border-radius: 16px;
  background: #e8e1da;
}

.editor-menu-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #e8e1da;
  color: var(--muted);
  font-size: 13px;
}

.editor-menu-meta {
  margin-top: 12px;
}

.editor-menu-category {
  margin: 0 0 6px;
  color: #9a8c80;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.editor-menu-card h3 {
  margin: 0 0 7px;
  font-size: 20px;
  line-height: 1.45;
}

.editor-menu-description {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.editor-menu-price {
  margin: 10px 0 0;
  font-size: 17px;
  font-weight: 700;
}

.badge-row {
  position: absolute;

  top: 14px;
  left: 14px;

  z-index: 2;

  display: flex;

  gap: 6px;

  flex-wrap: wrap;

  margin: 0;

  max-width:
    calc(100% - 82px);
}

.mini-badge {
  padding:
    5px 10px;

  border:
    1px solid
    rgba(255, 255, 255, .55);

  border-radius:
    999px;

  background:
    rgba(255, 253, 249, .92);

  color:
    #2f2924;

  box-shadow:
    0 3px 12px
    rgba(0, 0, 0, .08);

  backdrop-filter:
    blur(8px);

  font-size:
    11px;

  font-weight:
    700;
}

.mini-badge.soldout {
  background:
    rgba(125, 45, 45, .9);

  color:
    #fff;
}

.mini-badge.hidden-item {
  background:
    rgba(70, 70, 70, .88);

  color:
    #fff;
}


/* ========================================
   Information
======================================== */

.information-list {
  border-top: 1px solid var(--line);
}

.information-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 110px 1fr 26px;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.information-row > span:first-child {
  color: var(--muted);
  font-size: 13px;
}

.information-row strong {
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.row-pencil {
  opacity: 0.55;
}


/* ========================================
   News
======================================== */

.visual-news-list {
  border-top: 1px solid var(--line);
}

.editor-news-card {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  padding: 20px 46px 20px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.editor-news-image {
  width: 130px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #e8e1da;
}

.editor-news-date {
  margin: 0 0 5px;
  color: #9a8c80;
  font-size: 11px;
}

.editor-news-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.editor-news-content {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.empty-state {
  padding: 28px 0;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}


/* ========================================
   Modal
======================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.modal.open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 22, 18, 0.48);
}

.modal-sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(100%, 640px);
  max-height: 92vh;
  overflow-y: auto;
  transform: translateX(-50%);
  margin: 0;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: var(--surface);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.18);
}

.modal-header {
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.modal-header h2 {
  margin: 0;
  font-size: 23px;
}

.modal-close {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 25px;
  line-height: 1;
}

.form-stack {
  display: grid;
  gap: 16px;
}

.form-stack label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

input,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid #d8d0c8;
  border-radius: 11px;
  outline: none;
  background: white;
  color: var(--text);
  font-size: 16px;
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.7;
}

input:focus,
textarea:focus {
  border-color: #66594f;
  box-shadow: 0 0 0 3px rgba(102, 89, 79, 0.10);
}

.file-label input {
  padding: 9px;
}

.switch-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.switch-row {
  min-height: 54px;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px !important;
  border-bottom: 1px solid var(--line);
}

.switch-row input {
  width: 22px;
  min-height: 22px;
  height: 22px;
  margin: 0;
}

.primary-action,
.danger-action {
  width: 100%;
  min-height: 52px;
  margin-top: 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
}

.primary-action {
  border: 0;
  background: var(--accent);
  color: white;
}

.danger-action {
  border: 1px solid rgba(159, 47, 47, 0.28);
  background: transparent;
  color: var(--danger);
}

.modal-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: end;
}

.modal-actions .danger-action {
  min-width: 92px;
}

.modal-actions .primary-action {
  min-width: 0;
}


/* ========================================
   Toast
======================================== */

.toast-message {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 200;
  max-width: calc(100vw - 32px);
  padding: 13px 18px;
  transform: translate(-50%, -15px);
  border-radius: 999px;
  background: #241e1a;
  color: white;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast-message.show {
  opacity: 1;
  transform: translate(-50%, 0);
}


/* ========================================
   Mobile
======================================== */

@media (max-width: 600px) {
  .editor-topbar-inner {
    padding: 11px 14px;
  }

  .editor-help {
    display: none;
  }

  .editor-topbar h1 {
    font-size: 17px;
  }

  .editor-eyebrow {
    font-size: 8px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .secondary-action {
    min-height: 36px;
    padding: 0 10px;
    font-size: 11px;
  }

  .editor-page {
    width: min(100% - 24px, 900px);
    margin-top: 14px;
  }

  .editor-status {
    padding: 10px 12px;
  }

  .editor-status p {
    display: none;
  }

  .visual-section {
    margin-bottom: 48px;
  }

  .visual-hero {
    min-height: 360px;
    margin-left: -12px;
    margin-right: -12px;
    border-radius: 0;
  }

  .hero-overlay {
    width: calc(100% - 38px);
    padding: 22px 18px;
  }

  .hero-title-button {
    font-size: 30px;
  }

  .content-section {
    padding: 0;
  }

  .section-heading h2 {
    font-size: 24px;
  }

  .visual-menu-list {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .editor-menu-card h3 {
    font-size: 19px;
  }

  .information-row {
    grid-template-columns: 90px 1fr 24px;
  }

  .editor-news-card {
    grid-template-columns: 92px 1fr;
    gap: 12px;
    padding-right: 40px;
  }

  .editor-news-image {
    width: 92px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .modal-sheet {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.hero-overlay {
  position: relative;
}

.hero-edit-button {
  position: absolute;
  top: 14px;
  right: 14px;

  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border: 1px solid rgba(47, 41, 36, 0.12);
  border-radius: 50%;

  background: rgba(255, 253, 249, 0.96);
  color: #2f2924;

  box-shadow: 0 4px 14px rgba(47, 41, 36, 0.08);

  font-size: 16px;
}

.editor-news-card.no-image {
  grid-template-columns: 1fr;
}

.editor-news-card.no-image > div {
  width: 100%;
  padding-right: 56px;
}

.business-field-hidden {
  display: none !important;
}

/* ========================================
   Portfolio
======================================== */

.visual-portfolio-list {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 34px 24px;
}

.editor-portfolio-card {
  position: relative;

  min-width: 0;

  padding: 0;

  border: 0;

  background: transparent;

  color: var(--text);

  text-align: left;
}

.editor-portfolio-card::after {
  content: "✏️";

  position: absolute;

  top: 14px;
  right: 14px;

  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border:
    1px solid
    rgba(47, 41, 36, 0.12);

  border-radius: 50%;

  background:
    rgba(255, 253, 249, 0.96);

  box-shadow:
    0 4px 14px
    rgba(47, 41, 36, 0.08);

  font-size: 16px;
}

.editor-portfolio-media {
  position: relative;

  overflow: hidden;

  aspect-ratio: 4 / 3;

  border-radius: 16px;

  background: #292725;
}

.editor-portfolio-image {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
}

.editor-portfolio-placeholder {
  width: 100%;
  height: 100%;

  display: grid;
  place-items: center;

  color:
    rgba(255, 255, 255, 0.72);

  font-size: 12px;

  font-weight: 700;

  letter-spacing: 0.18em;
}

.portfolio-video-badge {
  position: absolute;

  left: 14px;
  bottom: 14px;

  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background:
    rgba(255, 255, 255, 0.92);

  color: #211f1d;

  font-size: 14px;
}

.editor-portfolio-meta {
  margin-top: 12px;
}

.editor-portfolio-category {
  margin: 0 0 6px;

  color: #9a8c80;

  font-size: 10px;

  font-weight: 700;

  letter-spacing: 0.14em;

  text-transform: uppercase;
}

.editor-portfolio-card h3 {
  margin: 0 0 7px;

  font-size: 20px;

  line-height: 1.45;
}

.editor-portfolio-description {
  margin: 0;

  color: var(--muted);

  font-size: 13px;

  line-height: 1.7;

  display: -webkit-box;

  -webkit-box-orient: vertical;

  -webkit-line-clamp: 3;

  overflow: hidden;
}

.form-note {
  color: var(--muted);

  font-size: 11px;

  font-weight: 400;
}


/* selectも既存フォームと統一 */

select {
  width: 100%;

  min-height: 48px;

  padding: 12px 13px;

  border:
    1px solid #d8d0c8;

  border-radius: 11px;

  outline: none;

  background: white;

  color: var(--text);

  font-size: 16px;
}

select:focus {
  border-color: #66594f;

  box-shadow:
    0 0 0 3px
    rgba(102, 89, 79, 0.10);
}


@media (max-width: 620px) {

  .visual-portfolio-list {
    grid-template-columns: 1fr;

    gap: 28px;
  }

}