/* ========================================
   BetaVersion Tools — 共通スタイル
   Design: Modern SaaS / Minimal
   ======================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Inter", "Helvetica Neue", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  color: #111827;
  background: #f8f9fa;
  line-height: 1.7;
  letter-spacing: 0.01em;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- Portal Header (トップページ) --- */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
  padding: 3.5rem 1.5rem 2.5rem;
}

.site-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #111827;
}

.site-description {
  margin-top: 0.5rem;
  color: #6b7280;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  font-weight: 400;
}

/* --- Global Header (各ツールページ) --- */
.global-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 1.25rem 1.5rem 1.5rem;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
}

.breadcrumb {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0;
}

.breadcrumb a {
  color: #6b7280;
  transition: color 0.15s;
}

.breadcrumb a:hover {
  color: #3b82f6;
}

.breadcrumb span {
  margin: 0 0.4rem;
  color: #d1d5db;
  font-weight: 300;
}

.title-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.title-area h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #111827;
  line-height: 1.3;
}

.badge {
  flex-shrink: 0;
  font-size: 0.6rem;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 0.15em 0.55em;
  border-radius: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --- Layout --- */
main {
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* --- Tool Grid (ポータル用) --- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding-top: 2rem;
}

.tool-card {
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.6rem;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.tool-card:hover {
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
}

.tool-card__version {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  color: #3b82f6;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 0.1em 0.5em;
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
}

.tool-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.tool-card__desc {
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.6;
}

/* --- Tool Categories (ポータル カテゴリ) --- */
.tool-categories {
  padding-top: 2rem;
}
.tool-category {
  margin-bottom: 2.5rem;
}
.tool-category:last-child {
  margin-bottom: 0;
}
.tool-category__header {
  font-size: 0.82rem;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
  padding-left: 0.1rem;
}
.tool-category .tool-grid {
  padding-top: 0;
}

/* --- Tool Page Body (各ツール用) --- */
.tool-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* --- Form Parts (各ツール共通パーツ) --- */
label {
  display: block;
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
  color: #374151;
  letter-spacing: 0.01em;
}

textarea,
input[type="text"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
  color: #111827;
}

textarea:focus,
input[type="text"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

textarea::placeholder,
input[type="text"]::placeholder {
  color: #9ca3af;
}

.char-count {
  font-size: 0.82rem;
  margin-top: 0.35rem;
  color: #6b7280;
}

.char-count .current {
  font-weight: 700;
  font-size: 1.05rem;
}

.char-count .over {
  color: #ef4444;
}

.field-group {
  margin-bottom: 1.5rem;
}

.field-group__note {
  font-size: 0.72rem;
  color: #9ca3af;
  margin-top: 0.2rem;
}

/* --- Actions (ボタン群) --- */
.actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.actions button {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 1.1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  letter-spacing: 0.01em;
}

.actions button:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.actions .btn-copy {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.actions .btn-copy:hover {
  background: #1f2937;
  border-color: #1f2937;
}

.actions .btn-copy.copied {
  background: #059669;
  border-color: #059669;
}

/* --- SEO Content (解説セクション共通) --- */
.seo-content {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid #e5e7eb;
  line-height: 1.9;
  font-size: 0.9rem;
  color: #374151;
}

.seo-content h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.seo-content h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 0.6rem;
  padding-left: 0.7rem;
  border-left: 2px solid #3b82f6;
  letter-spacing: -0.01em;
}

.seo-content p {
  margin-bottom: 1rem;
}

.seo-content ul {
  margin: 0 0 1rem 1.2rem;
}

.seo-content li {
  margin-bottom: 0.4rem;
}

.seo-content a {
  color: #3b82f6;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(59, 130, 246, 0.3);
}

.seo-content a:hover {
  color: #1d4ed8;
  text-decoration-color: #1d4ed8;
}

.seo-content pre {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.7;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  margin: 1rem 0;
  border: 1px solid #334155;
}

.seo-content .callout {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.1rem 1.4rem;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #475569;
}

.seo-content .callout a {
  font-weight: 600;
}

.seo-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  white-space: nowrap;
}

.seo-table th,
.seo-table td {
  padding: 0.6rem 0.85rem;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.seo-table thead th {
  background: #f9fafb;
  font-weight: 700;
  color: #374151;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.seo-table tbody td:nth-child(n+2) {
  text-align: center;
}

.seo-table code {
  font-size: 0.78rem;
  background: #f3f4f6;
  padding: 0.12em 0.4em;
  border-radius: 3px;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
}

.seo-note {
  font-size: 0.72rem;
  color: #9ca3af;
}

/* --- Next Actions (ツール間回遊カード) --- */
.next-actions {
  margin-top: 3rem;
}

.next-actions h2 {
  font-size: 0.85rem;
  color: #9ca3af;
  font-weight: 500;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.next-actions__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.next-actions__card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.2rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.next-actions__card:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.06);
  transform: translateY(-1px);
}

.next-actions__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.next-actions__icon--blue   { background: #3b82f6; }
.next-actions__icon--green  { background: #10b981; }
.next-actions__icon--purple { background: #8b5cf6; }

.next-actions__text {
  min-width: 0;
}

.next-actions__name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.1rem;
}

.next-actions__desc {
  font-size: 0.7rem;
  color: #9ca3af;
  line-height: 1.45;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.72rem;
  color: #9ca3af;
  letter-spacing: 0.02em;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .site-header {
    padding: 2.5rem 1rem 1.5rem;
  }
  .site-header h1 {
    font-size: 1.3rem;
  }
  .global-header {
    padding: 1rem 1rem 1.25rem;
  }
  .title-area h1 {
    font-size: 1.15rem;
  }
  main {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .tool-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
