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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #fffbeb;
  color: #111827;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(254, 243, 199, 0.9);
  border-bottom: 1px solid #fcd34d;
}

.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.logo-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.logo-subtitle {
  font-size: 0.8rem;
  opacity: 0.8;
}

.topbar-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #fbbf24;
  background: #fef3c7;
  font-weight: 500;
}

.layout {
  max-width: 1120px;
  margin: 1.5rem auto;
  padding: 0 1rem 2rem;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid #fcd34d;
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
  padding: 1rem 1.25rem 1.25rem;
}

.card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.card-header h2,
.card-form h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.card-form h2 {
  margin-bottom: 0.75rem;
}

.card-header .hint {
  font-size: 0.8rem;
  color: #4b5563;
}

#map {
  width: 100%;
  height: 360px;
  border-radius: 0.75rem;
  border: 1px solid #fcd34d;
  overflow: hidden;
}

.map-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.map-info-item {
  background: #fef3c7;
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #fcd34d;
}

.map-info-wide input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #fcd34d;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

.map-info .label {
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.map-info .value {
  opacity: 0.9;
}

.field-group {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.field-group label {
  font-weight: 500;
}

.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="tel"],
.field-group input[type="datetime-local"],
.field-group textarea {
  border-radius: 0.75rem;
  border: 1px solid #fcd34d;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

.field-group textarea {
  resize: vertical;
}

.field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.toggle-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.toggle-btn {
  border-radius: 0.75rem;
  border: 1px solid #fcd34d;
  background: #fef3c7;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.toggle-btn.active {
  background: #d97706;
  color: white;
  border-color: #b45309;
  box-shadow: 0 2px 6px rgba(180,83,9,0.4);
}

.checkbox-group {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  margin-top: 0.15rem;
}

.preview-grid {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
}

.preview-item {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #facc15;
}

.preview-item img {
  width: 100%;
  height: 70px;
  object-fit: cover;
  display: block;
}

.preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  border: none;
  background: rgba(255,255,255,0.9);
  border-radius: 999px;
  font-size: 0.7rem;
  padding: 0.1rem 0.35rem;
  cursor: pointer;
}

.button-row {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn {
  border-radius: 0.8rem;
  border: 1px solid transparent;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: #d97706;
  color: white;
  border-color: #b45309;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: #fef3c7;
  border-color: #fcd34d;
}

.btn-ghost {
  background: white;
  border-color: #d1d5db;
}

.status-box {
  margin-top: 0.5rem;
  min-height: 1.2rem;
}

.alert {
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
}

.alert-success {
  background: #dcfce7;
  border: 1px solid #22c55e;
  color: #166534;
}

.alert-error {
  background: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

.alert-warn {
  background: #fef9c3;
  border: 1px solid #eab308;
  color: #854d0e;
}

.footer {
  border-top: 1px solid #fcd34d;
  background: #fef3c7;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem;
  font-size: 0.85rem;
}

.footer-inner ul {
  padding-left: 1.1rem;
  margin: 0 0 0.5rem 0;
}

.footer-meta {
  opacity: 0.8;
}
