/* ===== もじへんげ 共通スタイル（ライト版） ===== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Noto+Sans+JP:wght@400;500;700;800&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --white: #FFFFFF;
  --bg: #F8F9FC;
  --text: #1A1A2E;
  --text2: #6B7194;
  --border: #E8EAF0;
  --theme: #667eea;
  --theme-rgb: 102,126,234;
}

body {
  font-family: 'Noto Sans JP', 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ===== CONTAINER ===== */
.converter-wrap {
  display: flex;
  justify-content: center;
  padding: 32px 16px;
}
.converter {
  width: 100%;
  max-width: 600px;
}

/* ===== BACK LINK ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
  margin-bottom: 20px;
}
.back-link:hover { color: var(--theme); }

/* ===== HEADER ===== */
.conv-header {
  text-align: center;
  margin-bottom: 32px;
  background: var(--white);
  border-radius: 24px;
  padding: 36px 24px;
  border: 1px solid var(--border);
}
.conv-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: var(--theme);
  background: rgba(var(--theme-rgb), 0.08);
  margin-bottom: 14px;
}
.conv-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
}
.conv-subtitle {
  font-size: 14px;
  color: var(--text2);
  margin: 0;
}

/* ===== EXAMPLES ===== */
.examples-section { margin-bottom: 20px; }
.examples-label {
  font-size: 13px;
  color: var(--text2);
  font-weight: 500;
  margin-bottom: 10px;
}
.examples-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.example-chip {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--white);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Noto Sans JP', sans-serif;
}
.example-chip:hover {
  border-color: var(--theme);
  color: var(--theme);
  background: rgba(var(--theme-rgb), 0.04);
  transform: translateY(-1px);
}

/* ===== INPUT ===== */
.input-section { margin-bottom: 20px; }
.input-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.input-textarea {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
  resize: vertical;
  font-family: 'Noto Sans JP', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-textarea:focus {
  outline: none;
  border-color: var(--theme);
  box-shadow: 0 0 0 3px rgba(var(--theme-rgb), 0.1);
}
.input-textarea::placeholder { color: #B8BDD4; }
.input-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}
.char-count, .shortcut-hint {
  font-size: 12px;
  color: var(--text2);
}

/* ===== CONVERT BUTTON ===== */
.convert-btn {
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--theme), rgba(var(--theme-rgb), 0.85));
  color: white;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Noto Sans JP', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(var(--theme-rgb), 0.25);
}
.convert-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--theme-rgb), 0.35);
}
.convert-btn:active:not(:disabled) { transform: translateY(0); }
.convert-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.loading-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== OUTPUT ===== */
.output-section {
  margin-bottom: 32px;
  animation: slideUp 0.4s ease-out;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.output-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.copy-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Noto Sans JP', sans-serif;
}
.copy-btn:hover {
  border-color: var(--theme);
  color: var(--theme);
}
.output-box {
  position: relative;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  border-left: 4px solid var(--theme);
  overflow: hidden;
}
.output-stamp {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 48px;
  color: rgba(var(--theme-rgb), 0.06);
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}
.output-text {
  font-size: 15px;
  line-height: 2;
  color: var(--text);
  margin: 0;
  position: relative;
  z-index: 1;
  white-space: pre-wrap;
}

/* ===== ERROR ===== */
.error-box {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(214,59,75,0.06);
  border: 1px solid rgba(214,59,75,0.2);
  color: #D63B4B;
  font-size: 14px;
  margin-bottom: 24px;
  animation: slideUp 0.4s ease-out;
}

/* ===== FOOTER ===== */
.conv-footer {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.conv-footer p {
  font-size: 12px;
  color: var(--text2);
}
.conv-footer a {
  color: var(--text2);
  text-decoration: none;
  transition: color 0.2s;
}
.conv-footer a:hover { color: var(--theme); }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .conv-title { font-size: 24px; }
  .convert-btn { font-size: 15px; }
  .conv-header { padding: 28px 20px; }
}

/* ===== CHARACTER INFO SECTION ===== */
.char-info {
  margin-top: 8px;
  margin-bottom: 32px;
}
.char-info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px;
  margin-bottom: 16px;
}
.char-info-card h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bg);
}
.char-info-card h2 .ci-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(var(--theme-rgb), 0.08);
  color: var(--theme);
  font-size: 13px;
  font-weight: 800;
  margin-right: 8px;
  vertical-align: middle;
}
.char-info-card p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 12px;
}
.char-info-card p:last-child { margin-bottom: 0; }
.char-info-card .ci-example {
  background: var(--bg);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.8;
  border-left: 3px solid var(--theme);
}
.char-info-card .ci-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.char-info-card .ci-list {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
  margin: 8px 0 12px 20px;
}
.char-info-card .ci-list li {
  margin-bottom: 4px;
}
@media (max-width: 480px) {
  .char-info-card { padding: 22px 18px; }
  .char-info-card h2 { font-size: 16px; }
}