* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", system-ui, sans-serif;
  color: #f8fafc;
  background:
    radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.25), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(236, 72, 153, 0.22), transparent 32%),
    linear-gradient(135deg, #061827, #080b18 55%, #17071d);
  min-height: 100vh;
}

.page {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 36px 18px;
}

.tool-card {
  width: min(960px, 100%);
  padding: 34px 42px;
  border-radius: 28px;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(148, 163, 184, 0.18), rgba(15, 23, 42, 0.78)),
    rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(226, 232, 240, 0.20);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.badge {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #dbeafe;
  border: 1px solid rgba(219, 234, 254, 0.25);
  background: rgba(15, 23, 42, 0.45);
}

h1 {
  margin: 16px 0 8px;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.lead {
  margin: 0 auto 26px;
  max-width: 660px;
  color: #cbd5e1;
  line-height: 1.8;
  font-weight: 700;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.tab {
  border: 1px solid rgba(125, 211, 252, 0.28);
  background: rgba(15, 23, 42, 0.65);
  color: #e0f2fe;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
}

.tab.active {
  background: linear-gradient(135deg, #38bdf8, #a855f7, #ec4899);
  color: white;
  border-color: transparent;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.input-row,
.actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.file-label,
button,
select {
  border: 1px solid rgba(125, 211, 252, 0.35);
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  padding: 12px 18px;
  border-radius: 16px;
  font-weight: 900;
}

.file-label {
  cursor: pointer;
}

.file-label input {
  display: none;
}

button {
  cursor: pointer;
}

button:hover,
.file-label:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.75);
}

.primary {
  background: linear-gradient(135deg, #38bdf8, #a855f7, #ec4899);
  border: none;
}

.range-label {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #cbd5e1;
  font-weight: 900;
}

.hint {
  color: #94a3b8;
  font-size: 14px;
  margin: 8px 0 18px;
}

.canvas-wrap,
.slide-preview-wrap {
  width: 100%;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(226, 232, 240, 0.12);
  border-radius: 22px;
  padding: 14px;
  overflow: auto;
}

#editCanvas {
  max-width: 100%;
  border-radius: 14px;
  background: #020617;
  cursor: crosshair;
}

.slide-editor {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.slide-editor input,
.slide-editor textarea,
.slide-editor select {
  width: 100%;
  border: 1px solid rgba(125, 211, 252, 0.25);
  background: rgba(2, 6, 23, 0.65);
  color: #f8fafc;
  padding: 14px 16px;
  border-radius: 16px;
  font-family: inherit;
  font-weight: 700;
}

.slide-editor textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.7;
}

#slideCanvas {
  width: 100%;
  max-width: 760px;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

footer {
  margin-top: 26px;
}

footer a {
  color: #bae6fd;
  text-decoration: none;
  font-weight: 900;
}

@media (max-width: 640px) {
  .tool-card {
    padding: 28px 18px;
  }

  .input-row,
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  button,
  select,
  .file-label {
    width: 100%;
  }
}

/* 無料バッジ */
.badge-free-pill {
  display: inline-flex;
  align-items: center;
  background: #1D9E75;
  color: #E1F5EE;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.badge-free-outline {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: #1D9E75;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1.5px solid #1D9E75;
  letter-spacing: 0.03em;
}
