:root {
  --primary: #41C9B4;
  --primary-dark: #2ea391;
  --bg: #f4f7f9;
  --card: #ffffff;
  --text: #333333;
  --border: #dce3e8;
  --code-bg: #1e242b;
  --code-text: #e6edf3;
}
* {
  box-sizing: border-box;
}
body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 16px;
  line-height: 1.6;
}
.container {
  max-width: 920px;
  margin: 0 auto;
}
header {
  background: var(--card);
  padding: 20px 24px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 20px;
  border-left: 6px solid var(--primary);
}
header h1 {
  margin: 0 0 6px 0;
  font-size: 1.4rem;
}
header p {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}
.card {
  background: var(--card);
  padding: 24px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 20px;
}
.card h2 {
  margin-top: 0;
  font-size: 1.15rem;
  border-bottom: 2px solid var(--bg);
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: bold;
}
.alert-error {
  background-color: #fdecea;
  color: #b71c1c;
  border: 1px solid #f5c6cb;
}
.alert-success {
  background-color: #e6f7f4;
  color: #135e52;
  border: 1px solid #b2e2da;
}
.form-group {
  margin-bottom: 18px;
}
label {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.hint {
  font-size: 0.82rem;
  color: #666;
  margin-top: 4px;
}
input[type="text"], select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
}
.file-switch-box {
  border: 2px dashed var(--primary);
  background: #f9fdfc;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}
.file-switch-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 10px 22px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}
.file-switch-btn:hover {
  background: var(--primary-dark);
}
input[type="file"] {
  display: none;
}
.preview-area {
  margin-top: 14px;
}
.preview-area img {
  max-width: 140px;
  max-height: 140px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background-image: linear-gradient(45deg, #eee 25%, transparent 25%), linear-gradient(-45deg, #eee 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eee 75%), linear-gradient(-45deg, transparent 75%, #eee 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
input[type="color"] {
  width: 48px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
}
.btn-submit {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 14px;
  font-size: 1.05rem;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-submit:hover {
  background: var(--primary-dark);
}
pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 14px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.5;
}
.file-list {
  margin: 10px 0 0 0;
  padding-left: 20px;
}
.nav-footer {
  text-align: center;
  margin: 28px 0 16px 0;
}
.btn-home {
  display: inline-block;
  background: #4a5568;
  color: #fff;
  text-decoration: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: bold;
  transition: background 0.2s;
}
.btn-home:hover {
  background: #2d3748;
}

/* Tablet / Smartphone レスポンシブ対応 */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  .card {
    padding: 16px;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  header h1 {
    font-size: 1.2rem;
  }
}
