.form-group input[type="text"], .form-group select {
    width: 22vw;
}

.store-list-page {
  width: 100%;
  margin: var(--page-margin-desktop);
  box-sizing: border-box;
}

.store-list-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  padding: 32px;
  box-sizing: border-box;
}

.store-list-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.store-list-header h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.3;
  color: #111827;
}

.page-eyebrow {
  margin: 0 0 6px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-link {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

.page-link:hover {
  text-decoration: underline;
}

.store-list-note {
  margin: 0 0 20px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.8;
}

.store-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 20px;
}

.button {
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.button-primary {
  background: #1d4ed8;
  color: #ffffff;
}

.button-secondary {
  background: #e5e7eb;
  color: #111827;
}

.form-message {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
  min-height: 24px;
}

.form-message-info {
  background: #e0f2fe;
  color: #0369a1;
}

.form-message-success {
  background: #dcfce7;
  color: #166534;
}

.form-message-error {
  background: #fee2e2;
  color: #991b1b;
}

.store-list-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.store-edit-row {
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  box-sizing: border-box;
}

.store-edit-row.is-dirty {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 1px rgba(29, 78, 216, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.store-row-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.store-row-eyebrow {
  margin: 0 0 4px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.store-row-title {
  margin: 0;
  font-size: 18px;
  color: #111827;
}

.store-row-meta {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
}

.store-row-status {
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  white-space: nowrap;
}

.store-edit-row.is-dirty .store-row-status {
  background: #dbeafe;
  color: #1d4ed8;
}

.store-row-body {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.store-image-panel,
.store-form-panel {
  min-width: 0;
}

.store-image-preview {
  width: 25%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: #f3f4f6;
  margin-bottom: 12px;
  cursor: pointer;
  position: relative;
}

.store-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
  background: #f3f4f6;
  display: block;
}

.store-image-preview-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #d1d5db;
  background: #f9fafb;
}

.store-image-empty-text {
  color: #9ca3af;
  font-weight: 700;
  padding: 16px;
  box-sizing: border-box;
  text-align: center;
}

.store-image-frame.is-pending-delete {
  opacity: 0.55;
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

.store-image-frame.is-pending-delete::after {
  content: "2回クリックで削除";
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.92);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.js-store-image-input {
  display: none;
}

.store-card-image-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-weight: 700;
  padding: 16px;
  box-sizing: border-box;
}

.image-label input {
  display: none;
}

.image-label {
  width: 100%;
  min-height: 44px;
  padding: 4px 14px;
  display: flex;
  align-items: center;
  border: 2px solid #d9d9d9;
  border-radius: 13px;
  background: #ffffff;
  cursor: pointer;
  transition: 0.2s;
  box-sizing: border-box;
}

.image-label.selected {
  border-color: var(--main-color);
  background: #f5fbff;
}

.image-label .image-text {
  display: inline-block;
  width: 100%;
  color: #374151;
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  color: #747475;
}

.required {
  color: #dc2626;
  margin-left: 2px;
}

.form-group input,
.form-group .store-map-preview {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 14px;
  border: 2px solid #d9d9d9;
  border-radius: 14px;
  background: #fff;
  font-size: 14px;
  color: #333;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--main-color);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04);
}

.form-group-wide {
  grid-column: 1 / -1;
}

.store-hours-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  gap: 14px;
}

.store-hours-row > .form-group {
  width: 100%;
  min-width: 0;
  margin-bottom: 0;
}

.store-hours-row input[type="time"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.store-map-preview {
  display: flex;
  align-items: center;
  color: #4b5563;
  line-height: 1.5;
}

.reserve-details {
  margin-top: 32px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
}

.reserve-details summary {
  cursor: pointer;
  font-weight: 700;
  color: #111827;
}

.reserve-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.reserve-grid .form-group {
  gap: 6px;
}

.reserve-grid .form-group input {
  min-height: 30px;
  padding: 0 12px;
  font-size: 13px;
}

.store-card-empty {
  padding: 32px;
  text-align: center;
  color: #6b7280;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 16px;
}

.scroll-top-button {
  position: fixed;
  right: 16px;
  bottom: calc(72px + env(safe-area-inset-bottom));
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: #1d4ed8;
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(29, 78, 216, 0.35);
  cursor: pointer;
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.scroll-top-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-button:hover {
  opacity: 0.95;
}

.scroll-top-icon {
  display: block;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-clip-path: polygon(50% 0, 100% 45%, 70% 45%, 70% 100%, 30% 100%, 30% 45%, 0 45%);
  clip-path: polygon(50% 0, 100% 45%, 70% 45%, 70% 100%, 30% 100%, 30% 45%, 0 45%);
}

@media (max-width: 1024px) {
  .store-list-card {
    padding: 24px;
  }

  .store-row-body {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 721px) and (max-width: 1366px) {
  .store-hours-row {
    grid-template-columns: repeat(2, 180px);
    width: fit-content;
    max-width: 100%;
  }

  .store-hours-row > .form-group,
  .store-hours-row input[type="time"] {
    width: 180px;
    max-width: 180px;
  }
}

@media (max-width: 720px) {
  .store-list-page {
    width: 100%;
    margin: var(--page-margin-mobile);
  }

  .store-list-card {
    padding: 18px;
    border-radius: 18px;
  }

  .store-list-header h1 {
    font-size: 22px;
  }

  .store-form-grid,
  .reserve-grid {
    grid-template-columns: 1fr;
  }

  .scroll-top-button {
    right: 14px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}
