* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4f5f7;
  color: #1c1e21;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e0e0e0;
  padding: 1.25rem 1rem;
}

.sidebar h1 {
  font-size: 1.1rem;
  margin: 0 0 1rem;
}

.list-nav {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.list-nav-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.4rem;
  border-radius: 6px;
  cursor: default;
}

.list-nav-item.active {
  background: #eef2ff;
}

.list-nav-name {
  flex: 1;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-nav-count {
  font-size: 0.75rem;
  color: #888;
  min-width: 1.2em;
  text-align: right;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  font-size: 0.85rem;
  padding: 0.2rem 0.3rem;
  border-radius: 4px;
}

.icon-btn:hover {
  background: #f0f0f0;
  color: #333;
}

.new-list-form {
  display: flex;
  gap: 0.4rem;
}

.new-list-form input {
  flex: 1;
  min-width: 0;
}

input[type="text"] {
  padding: 0.45rem 0.6rem;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  font-size: 0.9rem;
}

button {
  padding: 0.45rem 0.8rem;
  border: none;
  border-radius: 6px;
  background: #4f5bd5;
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
}

button:hover {
  background: #3f4ac0;
}

.panel {
  flex: 1;
  padding: 1.5rem 2rem;
  max-width: 640px;
}

.panel.empty {
  color: #888;
}

.panel h2 {
  margin-top: 0;
}

.new-item-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.new-item-form input {
  flex: 1;
}

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

.item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.2rem;
  border-bottom: 1px solid #eee;
}

.item.done .item-text {
  text-decoration: line-through;
  color: #999;
}

.item-text {
  flex: 1;
  cursor: pointer;
}

.empty-hint {
  color: #999;
}
