body {
  touch-action: manipulation;
}

.tag-container {
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
  background-color: #f9f9f9;
  min-height: auto;
}

.tag-header {
  margin-bottom: 25px;
}

.tag-header-logo {
  margin: 3px auto 35px;
}

.tag-action-buttons {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.action-button {
  padding: 12px 15px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  flex: 1;
  max-width: 48%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: white;
  border: 1px solid #ddd;
  color: #555;
}

.primary-button {
  background-color: #7b68ee;
  color: white;
  border: 1px solid #7b68ee;
}

.tag {
  background-color: #f0f0f0;
  color: #888;
  padding: 10px 15px;
  border-radius: 20px;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.create-tag-modal-content {
  background-color: white;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  margin: 0 auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: relative;
}

/* 🎯 ログインプロンプト用（ピンク色） */
.login-prompt-modal-header {
  background-color: #ff6b81; /* ピンク色 */
  color: white;
  padding: 15px 20px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px 8px 0 0;
}

/* 🎯 タグ作成用（紫色） */
.create-tag-modal-header {
  background-color: #8472ff; /* 紫色 */
  color: white;
  padding: 15px 20px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px 8px 0 0;
}

.create-tag-modal-title {
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
}

.create-tag-close-button {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 1.8em;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.create-tag-modal-body {
  padding: 20px;
}

.create-tag-form-group {
  margin-bottom: 15px;
}

.create-tag-form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
  color: #333;
}

.create-tag-form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1em;
}

.create-tag-form-group small {
  display: block;
  color: #999;
  margin-top: 5px;
  font-size: 0.85em;
}

.create-tag-button {
  background-color: #8472ff;
  color: white;
  border: none;
  padding: 15px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  width: 100px;
  margin-left: auto;
  display: block;
}

.back-row {
  display: flex;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 30px;
  position: relative;
}

.back-button {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background-color: transparent;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-weight: bold;
  color: #555;
  cursor: pointer;
  font-size: 0.9em;
}

.back-button svg {
  margin-right: 5px;
}

.back-button:hover {
  background-color: #f0f0f0;
}

.tag-filter-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2em;
  font-weight: bold;
  color: #555;
}

.tag-action-buttons {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-top: 10px;
  margin-bottom: 15px;
}

.action-button {
  padding: 10px 15px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: white;
  border: 1px solid #ddd;
  color: #555;
  font-size: 0.9em;
}

.bottom-action-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  padding: 5px 0 20px;
}

.delete-button {
  background-color: #777;
  color: white;
  border: 1px solid #777;
}

.tag.active {
  background-color: #7b68ee;
  color: white;
}

.tag-delete-container .tag.active {
  background-color: #777;
  color: white;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding-bottom: 15px;
}

.tag-container {
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
  background-color: #f9f9f9;
  min-height: auto;
}

@media (min-width: 768px) {
  .tag-container {
    max-width: 480px;
    margin: 0 auto;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  .create-tag-modal-content {
    max-width: 400px;
  }
}
