* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f0f4f4;
  color: #333;
  min-height: 100vh;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 0 80px;
}

/* Header */
header {
  background: #2a9d8f;
  color: white;
  padding: 16px;
}

header h1 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.trip-name-area {
  display: flex;
  gap: 8px;
}

.trip-name-area input {
  flex: 1;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.9);
}

.trip-name-area button {
  padding: 8px 14px;
  background: #264653;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

.trip-name-area button:hover {
  background: #1d3a45;
}

/* Tabs */
.tabs {
  display: flex;
  background: white;
  border-bottom: 2px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.tab-btn {
  flex: 1;
  padding: 12px 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.tab-btn.active {
  color: #2a9d8f;
  border-bottom-color: #2a9d8f;
  font-weight: bold;
}

.tab-btn:hover:not(.active) {
  background: #f5f5f5;
}

/* Tab content */
.tab-content {
  display: none;
  padding: 16px;
}

.tab-content.active {
  display: block;
}

/* Add form */
.add-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.item-input,
.note-input {
  padding: 10px 12px;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
  transition: border-color 0.2s;
}

.item-input:focus,
.note-input:focus {
  outline: none;
  border-color: #2a9d8f;
}

.note-input {
  font-size: 0.9rem;
  color: #555;
}

.add-btn {
  padding: 10px;
  background: #2a9d8f;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: background 0.2s;
}

.add-btn:hover {
  background: #21867a;
}

/* Item list */
.item-list {
  list-style: none;
}

.item-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: white;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: opacity 0.2s;
}

.item-list li.checked {
  opacity: 0.5;
}

.item-list li.checked .item-name {
  text-decoration: line-through;
  color: #999;
}

.check-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #2a9d8f;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.check-btn.checked {
  background: #2a9d8f;
  color: white;
}

.item-text {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-size: 0.95rem;
  word-break: break-all;
}

.item-note {
  font-size: 0.8rem;
  color: #888;
  margin-top: 2px;
  word-break: break-all;
}

.delete-btn {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 2px;
  flex-shrink: 0;
  transition: color 0.2s;
}

.delete-btn:hover {
  color: #e63946;
}

/* Footer */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #e0e0e0;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 600px;
  margin: 0 auto;
}

.progress-area {
  font-size: 0.85rem;
  color: #666;
}

#clearChecked {
  padding: 8px 14px;
  background: #e9ecef;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #444;
  transition: background 0.2s;
}

#clearChecked:hover {
  background: #dee2e6;
}

/* Empty state */
.empty-msg {
  text-align: center;
  color: #aaa;
  font-size: 0.9rem;
  padding: 30px 0;
}

@media (max-width: 375px) {
  .tab-btn {
    font-size: 0.82rem;
    padding: 10px 4px;
  }
}
