/* =====================================
   NicheWorks Formal UI - style.css
   （共通テンプレ不使用。単体最適化版）
===================================== */

/* -----------------------------
   基本
----------------------------- */
body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  line-height: 1.6;
}

.nw-header,
.nw-main,
.nw-footer {
  max-width: 620px;
  padding: 0 16px;
  margin-left: auto;
  margin-right: auto;
}


/* -----------------------------
   HEADER（仕様準拠）
----------------------------- */
.nw-header-inner {
  padding: 20px 0 12px;
}

.nw-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
}

.nw-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 14px;
}

/* 言語切替 */
.nw-lang-switch {
  display: flex;
  gap: 8px;
}

.nw-lang-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
}

.nw-lang-btn.active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}


/* -----------------------------
   MAIN
----------------------------- */
.nw-main {
  padding: 10px 16px 40px;
}

.nw-note {
  font-size: 12.5px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 8px 10px;
  border-radius: 8px;
  margin: 0 0 16px;
}


/* -----------------------------
   ドロップゾーン（12-6）
----------------------------- */
.drop-zone {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 40px 10px;
  text-align: center;
  color: #374151;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
  margin-bottom: 14px;
}

.drop-zone.dragover {
  border-color: #111827;
  background: #f9fafb;
}

.drop-hint {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
}


/* -----------------------------
   エラーボックス（12-5）
----------------------------- */
.error-box {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 10px;
}


/* -----------------------------
   プログレスバー（12-1）
----------------------------- */
.progress-bar {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e7eb;
  margin: 10px 0 14px;
}

.progress-inner {
  width: 100%;
  height: 100%;
  background: #111827;
  animation: loading 1.1s infinite linear;
}

@keyframes loading {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}


/* -----------------------------
   ボタン
----------------------------- */
.btn-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.btn {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #111827;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.btn:hover {
  background: #f3f4f6;
}

.btn.primary {
  background: #111827;
  color: #fff;
}

.btn.primary:hover {
  background: #000;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.reset-btn {
  width: 100%;
  margin-top: 20px;
}


/* -----------------------------
   結果エリア（12-2）
----------------------------- */
.result-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.preview-img {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 10px;
}

.size-info {
  color: #374151;
  font-size: 13px;
  margin-bottom: 12px;
}


/* -----------------------------
   FAQ（仕様推奨・Aでは必須採用）
----------------------------- */
.faq-section {
  margin-top: 32px;
  padding: 16px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.faq-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px;
}

.faq-item {
  margin-bottom: 12px;
}

.faq-q {
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 4px;
}

.faq-a {
  color: #6b7280;
  font-size: 13px;
  margin: 0;
}


/* -----------------------------
   FOOTER（仕様完全準拠）
----------------------------- */
.nw-footer {
  border-top: 1px solid #e5e7eb;
  padding: 20px 16px 28px;
  background: #fff;
}

.nw-links {
  text-align: center;
  font-size: 13px;
  margin-bottom: 14px;
}

.nw-links a {
  color: #374151;
  text-decoration: none;
  padding: 0 6px;
}

.nw-links a:hover {
  text-decoration: underline;
}

/* usage */
.nw-usage {
  text-align: center;
  margin-bottom: 14px;
}

.nw-usage a {
  color: #374151;
  font-size: 13px;
  text-decoration: underline;
}

/* donate */
.nw-donate {
  text-align: center;
  margin-bottom: 14px;
}

.nw-donate p {
  font-size: 13px;
  margin-bottom: 6px;
}

.nw-donate-links {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.nw-donate-links a {
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  text-decoration: none;
  color: #374151;
}

.nw-donate-links a:hover {
  background: #f3f4f6;
}

/* copy & notes */
.nw-footer-copy {
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  margin: 4px 0;
}

.nw-footer-note {
  text-align: center;
  font-size: 11px;
  color: #6b7280;
}
