html, body, main, header, footer {
  padding: 0px;
  margin: 0px;
}

body {
  background: #F5F5F5;
  color: #333333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px;
}

#app h1 {
  text-align: center;
  font-size: 1.8rem;
  color: #1565C0;
  margin-bottom: 24px;
  font-weight: 700;
}

.card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card h2 {
  font-size: 1.2rem;
  color: #1976D2;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.section-desc {
  color: #757575;
  font-size: 0.9rem;
  margin: 0 0 16px 0;
}

.wall-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 12px;
  padding: 12px;
  background: #FAFAFA;
  border-radius: 8px;
  flex-wrap: wrap;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 120px;
}

.input-group label {
  font-size: 0.85rem;
  color: #616161;
  font-weight: 500;
}

.input-group input,
.input-group select {
  padding: 10px 12px;
  border: 2px solid #E0E0E0;
  border-radius: 8px;
  font-size: 1rem;
  color: #333333;
  background: #FFFFFF;
  transition: border-color 0.2s;
  box-sizing: border-box;
  width: 100%;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #2196F3;
}

.input-group input[readonly] {
  background: #F5F5F5;
  color: #757575;
  cursor: default;
}

.btn-delete-wall {
  width: 36px;
  height: 36px;
  border: 2px solid #E0E0E0;
  border-radius: 8px;
  background: #FFFFFF;
  color: #F44336;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.btn-delete-wall:hover:not(:disabled) {
  background: #FFEBEE;
  border-color: #F44336;
}

.btn-delete-wall:disabled {
  color: #BDBDBD;
  border-color: #EEEEEE;
  cursor: not-allowed;
}

.btn-primary {
  display: inline-block;
  padding: 12px 32px;
  background: #FF9800;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #F57C00;
}

.btn-secondary {
  display: inline-block;
  padding: 10px 24px;
  background: #FFFFFF;
  color: #1976D2;
  border: 2px solid #1976D2;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

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

#add-wall-btn {
  margin-top: 8px;
}

.total-display {
  margin-top: 12px;
  padding: 10px 16px;
  background: #E3F2FD;
  border-radius: 8px;
  font-size: 1rem;
  color: #1565C0;
}

.total-display strong {
  font-size: 1.2rem;
}

#action-section {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.result-card {
  background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
  border: 2px solid #90CAF9;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #BBDEFB;
}

.result-item:last-child {
  border-bottom: none;
}

.result-label {
  font-size: 1rem;
  color: #424242;
  font-weight: 500;
}

.result-value {
  font-size: 1.1rem;
  color: #1565C0;
  font-weight: 600;
  text-align: right;
}

.result-value.highlight {
  font-size: 1.4rem;
  color: #E65100;
}

.error-msg {
  color: #F44336;
  font-size: 0.9rem;
  margin: 8px 0 0 0;
  line-height: 1.6;
}

.bucket-list {
  margin: 8px 0;
  padding-left: 20px;
}

.bucket-list li {
  margin-bottom: 4px;
  color: #424242;
}

.detail-note {
  font-size: 0.9rem;
  color: #616161;
  margin: 4px 0;
}

#bucket-detail {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #BBDEFB;
}

#features,
#scenarios,
#FAQ {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

#features h2,
#scenarios h2,
#FAQ h2 {
  font-size: 1.3rem;
  color: #1565C0;
  margin-bottom: 12px;
}

#features p {
  color: #616161;
  line-height: 1.8;
}

#scenarios ul {
  padding-left: 20px;
}

#scenarios li {
  margin-bottom: 8px;
  color: #424242;
  line-height: 1.6;
}

#FAQ dl {
  margin: 0;
}

#FAQ dt {
  font-weight: 600;
  color: #333333;
  margin-top: 16px;
  margin-bottom: 4px;
}

#FAQ dd {
  margin-left: 0;
  color: #616161;
  line-height: 1.8;
  padding-bottom: 8px;
  border-bottom: 1px solid #EEEEEE;
}

#__fork {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 16px;
}

#__fork button {
  padding: 8px 20px;
  background: #FFFFFF;
  color: #1976D2;
  border: 2px solid #1976D2;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

#__fork button:hover {
  background: #E3F2FD;
}

footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 0.85rem;
  color: #757575;
}

footer a {
  color: #1976D2;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  #app {
    padding: 16px 12px;
  }

  #app h1 {
    font-size: 1.5rem;
  }

  .wall-row {
    flex-direction: column;
    gap: 8px;
  }

  .input-group {
    min-width: 100%;
  }

  .btn-delete-wall {
    align-self: flex-end;
  }

  .card {
    padding: 16px;
  }

  .result-value.highlight {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  #app h1 {
    font-size: 1.3rem;
  }

  #action-section {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }

  .result-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .result-value {
    text-align: left;
  }
}
