* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  background: #f4f5f7;
  color: #111827;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(300px, 2fr) 320px;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "header header header"
    "sidebar map comments";
  height: 100vh;
}

header.app-header {
  grid-area: header;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #1f2937;
  color: #f9fafb;
}

header .title {
  font-weight: 600;
  font-size: 1.05rem;
}

header .subtitle {
  font-size: 0.85rem;
  opacity: 0.85;
}

header .tag {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #111827;
  font-size: 0.75rem;
}

.sidebar {
  grid-area: sidebar;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  padding: 0.75rem;
  overflow-y: auto;
}

.sidebar h2 {
  font-size: 0.9rem;
  margin: 0 0 0.5rem 0;
}

.day-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.day-item {
  border-radius: 0.5rem;
  padding: 0.4rem 0.5rem;
  margin-bottom: 0.35rem;
  cursor: pointer;
  border: 1px solid transparent;
  background: #f9fafb;
}

.day-item:hover {
  border-color: #d1d5db;
}

.day-item.active {
  border-color: #2563eb;
  background: #eff6ff;
}

.day-item-title {
  font-size: 0.9rem;
  font-weight: 500;
}

.day-item-meta {
  font-size: 0.8rem;
  color: #4b5563;
}

.map-wrapper {
  grid-area: map;
  padding: 0.5rem;
}

#map {
  width: 100%;
  height: calc(100vh - 60px);
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
  border: 1px solid #e5e7eb;
}

.comments-panel {
  grid-area: comments;
  border-left: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
}

.comments-panel h2 {
  font-size: 0.9rem;
  margin: 0 0 0.5rem 0;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  padding: 0.4rem 0.55rem;
  font-size: 0.85rem;
}

.comment-form textarea {
  resize: vertical;
  min-height: 60px;
}

.comment-form button {
  align-self: flex-end;
  border-radius: 999px;
  border: none;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: #2563eb;
  color: #ffffff;
  cursor: pointer;
}

.comment-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  flex: 1;
}

.comment-item {
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  padding: 0.35rem 0.5rem;
  margin-bottom: 0.35rem;
  background: #f9fafb;
}

.comment-meta {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.1rem;
}

.comment-message {
  font-size: 0.83rem;
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 300px 280px;
    grid-template-areas:
      "header"
      "map"
      "sidebar"
      "comments";
  }

  #map {
    height: 320px;
  }
}