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

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

.container {
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #2e7d32;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 入力エリア */
.input-area {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

#item-input {
  flex: 1;
  padding: 10px 12px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
}

#item-input:focus {
  border-color: #4caf50;
}

#add-btn {
  padding: 10px 18px;
  background: #4caf50;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

#add-btn:active {
  background: #388e3c;
}

/* リスト */
#item-list {
  list-style: none;
  margin-bottom: 12px;
}

#item-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px;
  border-bottom: 1px solid #eee;
}

#item-list li:last-child {
  border-bottom: none;
}

#item-list li input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #4caf50;
  cursor: pointer;
  flex-shrink: 0;
}

.item-text {
  flex: 1;
  font-size: 16px;
  word-break: break-all;
}

.item-text.checked {
  text-decoration: line-through;
  color: #aaa;
}

.delete-btn {
  background: none;
  border: none;
  color: #ccc;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.2s;
  flex-shrink: 0;
}

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

/* アクションボタン */
.actions {
  margin-bottom: 12px;
}

.btn-secondary {
  background: none;
  border: 1px solid #ddd;
  color: #888;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: #f5f5f5;
}

/* 共有エリア */
.share-area {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

#share-btn {
  width: 100%;
  padding: 12px;
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

#share-btn:active {
  background: #1565c0;
}

.share-msg {
  margin-top: 8px;
  font-size: 13px;
  color: #4caf50;
  text-align: center;
  min-height: 20px;
}

/* 共有通知バナー */
.shared-notice {
  margin-top: 16px;
  padding: 12px;
  background: #fff3e0;
  border: 1px solid #ffb74d;
  border-radius: 8px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#use-this-btn {
  background: #f57c00;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

@media (max-width: 375px) {
  .container {
    padding: 14px;
  }
  h1 {
    font-size: 19px;
  }
}
