* {
  box-sizing: border-box;
}

:root {
  --bg: #f4efe7;
  --bg-accent: #e7dccd;
  --card: rgba(255, 250, 244, 0.9);
  --card-strong: #fffaf3;
  --text: #1f2933;
  --muted: #6b7280;
  --line: rgba(105, 88, 69, 0.15);
  --shadow: 0 24px 60px rgba(59, 42, 19, 0.15);
  --accent: #c26a2d;
  --accent-dark: #8b4513;
  --productive: #236c5d;
  --fun: #b04a5a;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 30%),
    radial-gradient(circle at bottom right, rgba(194, 106, 45, 0.18), transparent 28%),
    linear-gradient(145deg, var(--bg) 0%, var(--bg-accent) 100%);
}

.app-shell {
  width: min(100%, 1100px);
  margin: 0 auto;
  padding: 48px 20px;
}

.selector-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
  border-radius: 32px;
  padding: 32px;
  backdrop-filter: blur(10px);
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-dark);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.intro,
.panel-heading p {
  color: var(--muted);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 28px 0 32px;
}

.field {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field span {
  font-size: 0.95rem;
  font-weight: 600;
}

select,
button {
  border: none;
  border-radius: 18px;
  padding: 16px 18px;
  font: inherit;
}

select {
  background: var(--card-strong);
  color: var(--text);
  border: 1px solid var(--line);
  outline: none;
}

button {
  align-self: end;
  min-width: 200px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 18px 30px rgba(139, 69, 19, 0.2);
}

button:hover, select:hover, option:hover {
  transform: translateY(-2px);
  cursor: pointer;
}

.panel {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
}

.panel + .panel {
  margin-top: 18px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin-bottom: 6px;
}

.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.location-card,
.empty-state,
.history-list li {
  border-radius: 18px;
  border: 1px solid var(--line);
}

.location-card {
  padding: 18px;
  background: var(--card-strong);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.location-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(31, 41, 51, 0.08);
}

.location-card h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: capitalize;
}

.badge.fun {
  background: rgba(176, 74, 90, 0.12);
  color: var(--fun);
}

.badge.productive {
  background: rgba(35, 108, 93, 0.12);
  color: var(--productive);
}

.empty-state {
  padding: 22px;
  background: rgba(255, 250, 243, 0.75);
  color: var(--muted);
  text-align: center;
}

.history-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.history-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--card-strong);
  cursor: pointer;
}

.history-name {
  font-weight: 600;
}

.history-count {
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .selector-card {
    padding: 22px;
    border-radius: 24px;
  }

  .controls {
    margin-bottom: 24px;
  }

  button {
    width: 100%;
  }

  .panel-heading,
  .history-list li {
    flex-direction: column;
    align-items: start;
  }
}
