/* ============================================================
   style.css — 口コミ返信AIツール
   白ベース・フラットデザイン
   Font: Noto Sans JP + Outfit
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Outfit:wght@500;600;700&display=swap');

/* ---- リセット ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }

/* ---- カラー変数 ---- */
:root {
  --white:        #ffffff;
  --bg:           #f5f6f8;
  --bg-deep:      #eef0f4;
  --border:       #e2e5ea;
  --border-dark:  #c8cdd8;

  --ink:          #111318;
  --ink-2:        #4b5263;
  --ink-3:        #8b95a5;

  --blue:         #2058e8;
  --blue-h:       #1748cc;
  --blue-light:   #eef2fd;
  --blue-mid:     #c5d3f8;

  --green:        #15803d;
  --green-bg:     #f0fdf4;
  --amber:        #b45309;
  --amber-bg:     #fffbeb;
  --amber-border: #fcd34d;
  --red:          #dc2626;
  --red-bg:       #fff1f1;
  --red-border:   #fca5a5;

  --star:         #f59e0b;

  --radius-s:  6px;
  --radius-m:  10px;
  --radius-l:  16px;
  --radius-xl: 20px;
}

/* ---- ベース ---- */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ================================================================
   HEADER
   ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.logo-mark {
  width: 32px; height: 32px;
  background: var(--blue);
  border-radius: var(--radius-s);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { width: 16px; height: 16px; }
.logo-name {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.2;
}
.logo-name small {
  display: block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 10px;
  font-weight: 400;
  color: var(--ink-3);
  letter-spacing: 0;
}

.header-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.header-nav a {
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color .15s;
}
.header-nav a:hover { color: var(--blue); }
.nav-user {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--ink-3);
}
.nav-cta {
  padding: 5px 12px;
  border: 1px solid var(--blue-mid);
  border-radius: var(--radius-s);
  color: var(--blue) !important;
  background: var(--blue-light);
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 72px 28px 60px;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 22px;
  letter-spacing: .02em;
}
.hero-pill svg { width: 11px; height: 11px; }

.hero-title {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  font-size: clamp(26px, 4.5vw, 42px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 18px;
}
.hero-title em {
  font-style: normal;
  color: var(--blue);
}

.hero-desc {
  font-size: 15px;
  color: var(--ink-2);
  max-width: 500px;
  margin: 0 auto 44px;
  line-height: 1.85;
}

/* ステップ */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  max-width: 640px;
  margin: 0 auto;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 120px;
  padding: 0 8px;
  position: relative;
}
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 14px;
  width: 18px;
  height: 1px;
  background: var(--border-dark);
}
.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-text {
  font-size: 11.5px;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.45;
}

/* ================================================================
   MAIN 2カラム
   ================================================================ */
.tool-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 36px 28px;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 24px;
  align-items: start;
}

/* ================================================================
   CARD
   ================================================================ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 28px 24px;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.card-head svg { color: var(--blue); flex-shrink: 0; }

/* ================================================================
   FORM
   ================================================================ */
.fg { margin-bottom: 20px; }
.fg:last-of-type { margin-bottom: 0; }

.flabel {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 7px;
}
.flabel .opt {
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-3);
  margin-left: 6px;
}
.req {
  color: var(--red);
  margin-left: 2px;
  font-weight: 400;
}

/* select */
.fselect {
  width: 100%;
  padding: 10px 36px 10px 12px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-m);
  background: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b95a5' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  appearance: none;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s;
}
.fselect:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(32,88,232,.1);
}
.fselect.is-err { border-color: var(--red); }

/* textarea */
.ftextarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-m);
  background: var(--white);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.75;
  resize: vertical;
  min-height: 148px;
  transition: border-color .15s;
}
.ftextarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(32,88,232,.1);
}
.ftextarea.is-err { border-color: var(--red); }

.char-cnt {
  text-align: right;
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 4px;
  transition: color .15s;
}
.char-cnt.warn { color: var(--amber); }
.char-cnt.over { color: var(--red); }

.ferr {
  font-size: 12px;
  color: var(--red);
  margin-top: 4px;
}

/* 星・ラジオ pill */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.pill-opt { position: relative; }
.pill-opt input { position: absolute; opacity: 0; width: 0; height: 0; }

.pill-opt label {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border: 1px solid var(--border-dark);
  border-radius: 100px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, background .15s, color .15s;
  white-space: nowrap;
}
.pill-opt label:hover {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--blue);
}
.pill-opt input:checked + label {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}
.star-ico { color: var(--star); font-size: 13px; }
.pill-opt input:checked + label .star-ico { color: rgba(255,255,255,.85); }

/* ================================================================
   ALERT
   ================================================================ */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-m);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 18px;
}
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert.warn  { background: var(--amber-bg); color: #92400e; border: 1px solid var(--amber-border); }
.alert.danger{ background: var(--red-bg);   color: #991b1b; border: 1px solid var(--red-border); }
.alert-danger-input { display: none; }

.usage-panel {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--bg);
}
.usage-panel.member {
  background: var(--green-bg);
  border-color: #bbf7d0;
}
.usage-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}
.usage-desc {
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-2);
}
.usage-desc a {
  color: var(--blue);
  text-decoration: none;
  margin-left: 8px;
}
.usage-desc a:hover { text-decoration: underline; }

.auth-wrap {
  max-width: 420px;
  margin: 44px auto 72px;
  padding: 0 20px;
}
.auth-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}
.auth-lead {
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 20px;
}
.auth-form .fg { margin-bottom: 16px; }
.finput {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-m);
  background: var(--white);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  color: var(--ink);
}
.finput:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(32,88,232,.1);
}
.keyword-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.auth-link {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-2);
  text-align: center;
}
.auth-link a {
  color: var(--blue);
  text-decoration: none;
}
.auth-link a:hover { text-decoration: underline; }

/* ================================================================
   GENERATE BUTTON
   ================================================================ */
.btn-gen {
  width: 100%;
  padding: 13px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: var(--radius-l);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, opacity .15s;
  margin-top: 22px;
}
.btn-gen:hover:not(:disabled) { background: var(--blue-h); }
.btn-gen:active:not(:disabled) { opacity: .9; }
.btn-gen:disabled { background: var(--border-dark); cursor: not-allowed; }

/* ================================================================
   NOTICE
   ================================================================ */
.notice {
  margin-top: 20px;
  padding: 14px 16px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
}
.notice-ttl {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.notice-ttl svg { color: var(--ink-3); }
.notice ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.notice li {
  font-size: 11.5px;
  color: var(--ink-3);
  display: flex;
  gap: 6px;
  line-height: 1.6;
}
.notice li::before {
  content: '–';
  flex-shrink: 0;
  color: var(--border-dark);
}

/* ================================================================
   RESULT COLUMN
   ================================================================ */
.result-col { position: sticky; top: 70px; }

/* placeholder */
.result-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 28px;
  gap: 14px;
}
.placeholder-icon {
  width: 52px; height: 52px;
  background: var(--blue-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
}
.placeholder-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.placeholder-desc {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.7;
}

/* loading */
.loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 28px;
  gap: 16px;
  text-align: center;
}
.loading.on { display: flex; }
.spinner {
  width: 34px; height: 34px;
  border: 2.5px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-msg { font-size: 13px; color: var(--ink-3); }

/* result section */
.result-section { display: none; }
.result-section.on { display: block; }

.result-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.result-ttl {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 7px;
}
.result-ttl svg { color: var(--blue); }
.result-meta {
  font-size: 11.5px;
  color: var(--ink-3);
}

/* 返信カード */
.rcard {
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  overflow: hidden;
  margin-bottom: 14px;
  transition: border-color .15s;
}
.rcard:hover { border-color: var(--blue-mid); }
.rcard:last-child { margin-bottom: 0; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rcard { animation: fadeUp .28s ease both; }
.rcard:nth-child(2) { animation-delay: .07s; }
.rcard:nth-child(3) { animation-delay: .14s; }

.rcard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.rcard-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 7px;
}
.rcard-badge {
  font-size: 10.5px;
  font-weight: 400;
  background: var(--white);
  color: var(--ink-3);
  border: 1px solid var(--border);
  padding: 1px 8px;
  border-radius: 100px;
}
.rcard-cnt {
  font-size: 11px;
  color: var(--ink-3);
}

.rcard-body {
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-all;
}

.rcard-foot {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.btn-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1px solid var(--border-dark);
  border-radius: 100px;
  background: var(--white);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s;
}
.btn-sub:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
}
.btn-sub.copied {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-bg);
}

/* ================================================================
   FEATURES
   ================================================================ */
.features {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 28px;
}
.features-inner { max-width: 960px; margin: 0 auto; }
.sec-ttl {
  text-align: center;
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 40px;
  letter-spacing: -.015em;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}
.feat {
  padding: 22px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: border-color .15s;
}
.feat:hover { border-color: var(--blue-mid); }
.feat-ico {
  width: 40px; height: 40px;
  background: var(--blue-light);
  border-radius: var(--radius-s);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  margin-bottom: 12px;
}
.feat-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.feat-desc {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.7;
}

/* ================================================================
   INDUSTRIES
   ================================================================ */
.industries {
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 28px;
}
.ind-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
}
.ind-tag {
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--white);
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 28px 28px;
  text-align: center;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: 12.5px;
  color: var(--ink-3);
  text-decoration: none;
  transition: color .15s;
}
.footer-nav a:hover { color: var(--blue); }
.footer-copy { font-size: 11.5px; color: var(--ink-3); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 800px) {
  .tool-wrap {
    grid-template-columns: 1fr;
    padding: 20px 16px;
    gap: 16px;
  }
  .result-col { position: static; }
  .hero { padding: 48px 20px 40px; }
  .hero-title { font-size: 24px; }
  .header-nav { display: none; }
  .features { padding: 44px 20px; }
  .industries { padding: 40px 20px; }
}
@media (max-width: 480px) {
  .card { padding: 20px 18px; }
  .pill-row { gap: 6px; }
  .pill-opt label { padding: 6px 11px; font-size: 12px; }
  .steps { gap: 6px; }
  .step { min-width: 90px; }
  .keyword-row { grid-template-columns: 1fr; }
}

/* アクセシビリティ */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
