:root {
  --hl-bg: #fff7f5;
  --hl-surface: #ffffff;
  --hl-text: #2b1d1a;
  --hl-text-muted: #8a746f;
  --hl-accent: #ff5d6c;
  --hl-accent-dark: #e14556;
  --hl-accent-soft: #ffe4e6;
  --hl-border: #f1e0dd;
  --hl-success: #2f9e63;
  --hl-error: #d1425a;
  --hl-radius: 18px;
  --hl-frame-width: 480px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: #efe2df;
  color: var(--hl-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  justify-content: center;
}

a { color: inherit; }

.hl-app {
  width: 100%;
  max-width: var(--hl-frame-width);
  min-height: 100vh;
  background: var(--hl-bg);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.12);
}

@media (min-width: 540px) {
  body { padding: 24px 0; }
  .hl-app { min-height: calc(100vh - 48px); border-radius: 28px; overflow: hidden; }
}

.hl-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--hl-surface);
  border-bottom: 1px solid var(--hl-border);
}

.hl-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}

.hl-brand-mark { color: var(--hl-accent); }

.hl-topbar-action {
  font-size: 0.85rem;
  color: var(--hl-text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--hl-accent-soft);
}

.hl-main {
  flex: 1;
  padding: 20px;
  padding-bottom: 96px;
  overflow-y: auto;
}

.hl-main.hl-main--flush {
  padding: 0;
  padding-bottom: 84px;
  display: flex;
  flex-direction: column;
}

.hl-card {
  background: var(--hl-surface);
  border-radius: var(--hl-radius);
  padding: 24px 20px;
  box-shadow: 0 2px 12px rgba(43, 29, 26, 0.06);
}

h1.hl-title {
  font-size: 1.4rem;
  margin: 0 0 4px;
}

p.hl-subtitle {
  color: var(--hl-text-muted);
  margin: 0 0 20px;
  font-size: 0.92rem;
}

.hl-field {
  margin-bottom: 16px;
}

.hl-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--hl-text-muted);
}

.hl-field input[type="email"],
.hl-field input[type="password"],
.hl-field input[type="text"],
.hl-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--hl-border);
  border-radius: 12px;
  font-size: 0.95rem;
  background: #fffdfc;
  font-family: inherit;
}

.hl-field input:focus,
.hl-field textarea:focus {
  outline: none;
  border-color: var(--hl-accent);
}

.hl-field textarea { resize: vertical; min-height: 70px; }

.hl-hint {
  font-size: 0.78rem;
  color: var(--hl-text-muted);
  margin-top: 6px;
}

.hl-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--hl-text);
}

.hl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 18px;
  border-radius: 999px;
  border: none;
  background: var(--hl-accent);
  color: white;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.hl-btn:hover { background: var(--hl-accent-dark); }
.hl-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.hl-btn-secondary {
  background: var(--hl-accent-soft);
  color: var(--hl-accent-dark);
}
.hl-btn-secondary:hover { background: #ffd3d7; }

.hl-alt-link {
  text-align: center;
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--hl-text-muted);
}
.hl-alt-link a { color: var(--hl-accent-dark); font-weight: 600; text-decoration: none; }

.hl-flash {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}
.hl-flash-error { background: #fdecee; color: var(--hl-error); }
.hl-flash-success { background: #e7f7ee; color: var(--hl-success); }

.hl-tabbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--hl-surface);
  border-top: 1px solid var(--hl-border);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
}

.hl-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  text-decoration: none;
  color: var(--hl-text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 12px;
}

.hl-tab-icon { font-size: 1.3rem; line-height: 1; }

.hl-tab.hl-tab-active { color: var(--hl-accent-dark); }
.hl-tab.hl-tab-active .hl-tab-icon { transform: scale(1.08); }

/* Map page */
#hl-map { flex: 1; width: 100%; min-height: 0; }

.hl-map-heart-icon {
  font-size: 26px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
  line-height: 1;
}

.hl-popup img {
  width: 100%;
  max-width: 220px;
  border-radius: 10px;
  display: block;
  margin-bottom: 8px;
}

.hl-popup .hl-popup-caption {
  font-size: 0.85rem;
  margin: 0 0 4px;
}

.hl-popup .hl-popup-meta {
  font-size: 0.72rem;
  color: var(--hl-text-muted);
  margin: 0;
}

.hl-upload-map {
  height: 220px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1.5px solid var(--hl-border);
}

.hl-preview {
  width: 100%;
  border-radius: 14px;
  margin-top: 10px;
  display: none;
}

.hl-empty-state {
  text-align: center;
  color: var(--hl-text-muted);
  padding: 40px 20px;
  font-size: 0.9rem;
}
