:root { 
  --bg:#f7f7fb; 
  --fg:#111; 
  --muted:#666; 
  --primary:#2d6cdf; 
  --border:#ddd; 
  --radius:12px; 
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px;
  color: var(--fg);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans JP", "ヒラギノ角ゴ ProN", "Hiragino Kaku Gothic ProN", "メイリオ", Meiryo, Arial, sans-serif;
  line-height: 1.55;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(22px, 2.6vw, 28px);
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  font-size: 12px;
  color: var(--muted);
  display: inline-block;
  margin-bottom: 6px;
}

textarea, input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-family: inherit;
}

textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.inputs {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .inputs {
    grid-template-columns: repeat(3, 1fr);
  }
}

.input-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.input-number {
  position: absolute;
  top: -8px;
  left: 12px;
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  padding: 0 4px;
  z-index: 1;
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--fg);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .02s, box-shadow .2s;
}

.btn:hover {
  box-shadow: 0 6px 14px rgba(0, 0, 0, .06);
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.pill {
  background: #eef3ff;
  color: #2d55aa;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.options {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.spacer {
  flex: 1;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.counts {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.subpill {
  background: #f2f2f2;
  color: #333;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.extended-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-family: inherit;
}

#extendedInputs {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* 右上のボタンスタイル */
.ubersuggest-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #ff6600;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
  transition: all 0.2s ease;
  z-index: 1000;
}

.ubersuggest-btn:hover {
  background-color: #e55a00;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.4);
}

.spreadsheet-btn {
  position: fixed;
  top: 20px;
  right: 240px;
  background-color: #28a745;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
  transition: all 0.2s ease;
  z-index: 1000;
}

.spreadsheet-btn:hover {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}
