:root {
  --editor-navy: #071a33;
  --editor-blue: #135ea8;
  --editor-sky: #dceeff;
  --editor-border: #ced9e6;
  --editor-muted: #5a6c80;
  --editor-surface: #ffffff;
  --editor-danger: #b42318;
  --editor-success: #067647;
}

.place-editor-form {
  color: var(--editor-navy);
  display: grid;
  gap: 20px;
  font-family: "IBM Plex Sans Thai", "Prompt", sans-serif;
  min-width: 0;
}

.place-editor-section {
  background: var(--editor-surface);
  border: 1px solid var(--editor-border);
  border-radius: 16px;
  padding: 20px;
  min-width: 0;
}

.place-editor-section-heading {
  align-items: flex-start;
  border-bottom: 1px solid #e8eef5;
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
}

.place-editor-section-heading > span {
  align-items: center;
  background: var(--editor-navy);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 32px;
  font-size: 0.72rem;
  font-weight: 600;
  height: 32px;
  justify-content: center;
}

.place-editor-section-heading h3,
.place-editor-section-heading p {
  margin: 0;
}

.place-editor-section-heading h3 {
  font-size: 1.1rem;
  line-height: 1.35;
}

.place-editor-section-heading p {
  color: var(--editor-muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.place-editor-grid,
.place-editor-coordinates {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.place-editor-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.place-editor-field-wide {
  grid-column: 1 / -1;
}

.place-editor-field > span,
.place-editor-range label > span {
  color: #253b55;
  font-size: 0.86rem;
  font-weight: 600;
}

.place-editor-field b {
  color: var(--editor-danger);
}

.place-editor-field input,
.place-editor-field select,
.place-editor-field textarea,
.place-editor-range input {
  background: #fff;
  border: 1px solid #afbdcd;
  border-radius: 9px;
  box-sizing: border-box;
  color: var(--editor-navy);
  font: inherit;
  font-size: 0.94rem;
  max-width: 100%;
  padding: 10px 12px;
  width: 100%;
}

.place-editor-field textarea {
  resize: vertical;
}

.place-editor-field input:focus,
.place-editor-field select:focus,
.place-editor-field textarea:focus,
.place-editor-range input:focus {
  border-color: var(--editor-blue);
  box-shadow: 0 0 0 3px rgba(19, 94, 168, 0.14);
  outline: none;
}

.place-editor-field [aria-invalid="true"] {
  border-color: var(--editor-danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.place-editor-field small {
  color: var(--editor-muted);
  font-size: 0.76rem;
  justify-self: end;
}

.place-editor-location-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.place-editor-location-button,
.place-editor-add-range,
.place-editor-secondary,
.place-editor-primary {
  align-items: center;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 600;
  gap: 8px;
  justify-content: center;
}

.place-editor-location-button,
.place-editor-add-range,
.place-editor-secondary {
  background: #fff;
  border: 1px solid #afbdcd;
  color: var(--editor-navy);
  padding: 9px 13px;
}

.place-editor-location-button:hover,
.place-editor-add-range:hover,
.place-editor-secondary:hover {
  background: #f2f7fc;
  border-color: var(--editor-blue);
}

.place-editor-location-tools span {
  color: var(--editor-muted);
  font-size: 0.82rem;
}

.place-editor-map {
  background: #e8eef5;
  border: 1px solid var(--editor-border);
  border-radius: 12px;
  height: 320px;
  margin-bottom: 14px;
  overflow: hidden;
  width: 100%;
}

.place-editor-schedule {
  display: grid;
  gap: 10px;
}

.place-editor-day {
  background: #f8fafc;
  border: 1px solid #dce4ed;
  border-radius: 12px;
  min-width: 0;
  padding: 14px;
}

.place-editor-day > header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.place-editor-day > header strong {
  font-size: 0.98rem;
}

.place-editor-switch,
.place-editor-24,
.place-editor-admin-grid > label:not(.place-editor-field) {
  align-items: center;
  color: #314b68;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.84rem;
  gap: 7px;
}

.place-editor-day-body {
  border-top: 1px solid #e0e7ef;
  margin-top: 12px;
  padding-top: 12px;
}

.place-editor-24 {
  margin-bottom: 10px;
}

.place-editor-range {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(100px, 1fr) auto minmax(100px, 1fr) 44px;
  margin-bottom: 10px;
}

.place-editor-range label {
  display: grid;
  gap: 4px;
}

.place-editor-range button {
  background: #fff;
  border: 1px solid #e2b9b5;
  border-radius: 8px;
  color: var(--editor-danger);
  cursor: pointer;
  height: 44px;
  width: 44px;
}

.place-editor-range small {
  color: var(--editor-muted);
  font-size: 0.76rem;
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
}

.place-editor-add-range {
  font-size: 0.82rem;
  margin-top: 2px;
}

.place-editor-closed {
  color: var(--editor-muted);
  font-size: 0.82rem;
  margin: 8px 0 0;
}

.place-editor-admin {
  background: #f5f9fd;
}

.place-editor-admin-grid {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.place-editor-feedback {
  border-radius: 10px;
  min-height: 22px;
  overflow-wrap: anywhere;
  padding: 10px 12px;
}

.place-editor-feedback:empty {
  padding: 0;
}

.place-editor-feedback.is-error {
  background: #fef3f2;
  color: var(--editor-danger);
}

.place-editor-feedback.is-success {
  background: #ecfdf3;
  color: var(--editor-success);
}

.place-editor-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--editor-border);
  padding: 14px 0 2px;
  z-index: 2;
}

.place-editor-secondary,
.place-editor-primary {
  min-height: 44px;
  padding: 10px 18px;
}

.place-editor-primary {
  background: var(--editor-navy);
  border: 1px solid var(--editor-navy);
  color: #fff;
}

.place-editor-primary:hover {
  background: #0d315d;
}

.place-editor-primary:disabled {
  cursor: wait;
  opacity: 0.65;
}

.place-submission-dialog {
  background: #f3f7fb;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(7, 26, 51, 0.35);
  box-sizing: border-box;
  color: var(--editor-navy);
  max-height: calc(100dvh - 32px);
  max-width: 960px;
  overflow: auto;
  padding: 0;
  width: calc(100% - 32px);
}

.place-submission-dialog::backdrop {
  background: rgba(2, 14, 29, 0.78);
  backdrop-filter: blur(4px);
}

.place-submission-header {
  align-items: center;
  background: var(--editor-navy);
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 20px 24px;
  position: sticky;
  top: 0;
  z-index: 1001;
}

.place-submission-header h2,
.place-submission-header p {
  margin: 0;
}

.place-submission-header p {
  color: #a9cdef;
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.place-submission-header button {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.1rem;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.place-submission-editor {
  padding: 20px;
}

.place-editor-admin-page {
  background: #eef3f8;
  color: var(--editor-navy);
  min-height: 100dvh;
}

.place-editor-admin-shell {
  margin: 0 auto;
  max-width: 1100px;
  padding: 28px 20px 60px;
}

.place-editor-admin-header {
  align-items: flex-start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.place-editor-admin-header h1,
.place-editor-admin-header p {
  margin: 0;
}

.place-editor-admin-header p {
  color: var(--editor-muted);
  margin-top: 4px;
}

.place-editor-admin-back {
  align-items: center;
  color: var(--editor-blue);
  display: inline-flex;
  gap: 8px;
  font-weight: 600;
  min-height: 44px;
  text-decoration: none;
}

.place-editor-admin-toolbar {
  align-items: end;
  background: #fff;
  border: 1px solid var(--editor-border);
  border-radius: 14px;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr auto;
  margin-bottom: 18px;
  padding: 16px;
}

@media (max-width: 680px) {
  .place-editor-section {
    border-radius: 12px;
    padding: 15px;
  }

  .place-editor-grid,
  .place-editor-coordinates,
  .place-editor-admin-grid,
  .place-editor-admin-toolbar {
    grid-template-columns: 1fr;
  }

  .place-editor-field-wide {
    grid-column: auto;
  }

  .place-editor-map {
    height: 250px;
  }

  .place-editor-day > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .place-editor-range {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 44px;
  }

  .place-editor-range input {
    padding-inline: 5px;
  }

  .place-editor-actions {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
  }

  .place-submission-dialog {
    border-radius: 0;
    height: 100dvh;
    max-height: 100dvh;
    width: 100%;
  }

  .place-submission-header {
    padding: 16px;
  }

  .place-submission-editor {
    padding: 12px;
  }

  .place-editor-admin-header {
    flex-direction: column;
  }
}
