* {
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  scroll-behavior: smooth;
  overflow-y: scroll;
}

.tabs {
  position: fixed;
  top: 0;
  width: 100%;
  background: white;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.tab {
  cursor: pointer;
  padding: 10px 20px;
  flex: 0 0 auto;
}

.tab.active {
  color: #007bff;
  font-weight: bold;
}

.title-area {
  text-align: center;
  margin-top: calc(50px + 20px);
  padding: 20px;
  background: #f9f9f9;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: normal;
  color: #333;
}

.content section {
  padding: 10px;
  border-bottom: 1px solid #eee;
  min-height: 100vh;
  width: 100%;
  margin: 0 auto;
}

.section-header {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.reset-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

.reset-btn:hover {
  color: #e63946;
  transform: scale(1.1);
}

h2 {
  margin: 0;
  display: inline;
  font-size: 1.2rem;
}

.container {
  margin: clamp(10px, 3vw, 30px) 0;
}

.selected-grid{
  display: grid;
  justify-content: center;
  grid-template-columns: repeat(auto-fit, minmax(clamp(48px, 8vw, 80px), 1fr));
  gap: clamp(2px, 3vw, 5px);
  padding: 0 5%;
  max-width: 100%;
  margin: 0 auto;
}

.pool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(60px, 10vw, 100px), 1fr));
  gap: clamp(10px, 3vw, 20px);
  justify-items: center;
}

.icon {
  width: clamp(48px, 8vw, 80px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, outline 0.2s;
}

.icon:hover {
  transform: scale(1.1);
}

.icon.selected {
  outline: 3px solid #ffcc00;
  outline-offset: 2px;
}

.icon.empty {
  display: inline-block;
  background-color: #f0f0f0;
  border: 3px solid #cccccc;
  border-radius: 8px;
}

h3 {
  margin: 0;
  display: inline;
  font-size: 1rem;
}
