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

:root {
  --color-primary: #6366f1;
  --color-primary-dark: #4f46e5;
  --color-primary-light: #818cf8;
  --color-bg: #0f172a;
  --color-bg-alt: #1e293b;
  --color-surface: rgba(30, 41, 59, 0.7);
  --color-surface-solid: #1e293b;
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-border: rgba(148, 163, 184, 0.15);
  --color-accent: #22d3ee;
  --color-accent-2: #a78bfa;
  --color-success: #34d399;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-glow: 0 0 20px rgba(99,102,241,0.15);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-width: 1200px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Animated background mesh */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 600px 600px at 10% 10%, rgba(99,102,241,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 90% 20%, rgba(34,211,238,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 400px 400px at 50% 80%, rgba(167,139,250,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  flex: 1;
  padding: 2rem 0;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

/* ===== Header ===== */
.site-header {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background var(--transition);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-logo:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.site-nav a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 1px;
  transition: width var(--transition);
}

.site-nav a:hover {
  color: var(--color-text);
  text-decoration: none;
}

.site-nav a:hover::after {
  width: 100%;
}

/* ===== Footer ===== */
.site-footer {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
.footer-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-bottom: 1.5rem; text-align: left; }
.footer-nav__col h3 { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--color-text-muted); }
.footer-nav__col ul { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; }
.footer-nav__col a { font-size: 0.8rem; color: var(--color-text-muted); opacity: 0.8; text-decoration: none; transition: color var(--transition), opacity var(--transition); }
.footer-nav__col a:hover { color: var(--color-primary-light); opacity: 1; }
.footer-copyright { text-align: center; padding-top: 1rem; border-top: 1px solid var(--color-border); }
@media (max-width: 768px) { .footer-nav { grid-template-columns: repeat(2, 1fr); } }

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
  animation: fadeInUp 0.8s ease-out;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary-light) 50%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.hero p {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== Ad Placeholder ===== */
.ad-unit {
  background: rgba(30, 41, 59, 0.5);
  border: 1px dashed rgba(148, 163, 184, 0.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.5rem auto;
}

.ad-unit--leaderboard {
  width: 100%;
  max-width: 728px;
  height: 90px;
}

.ad-unit--rectangle {
  width: 300px;
  max-width: 100%;
  height: 250px;
}

.ad-unit--responsive {
  width: 100%;
  min-height: 90px;
}

/* ===== Tool Grid ===== */
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--color-text);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.tool-card {
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out both;
}

/* Stagger animation for cards */
.tool-grid .tool-card:nth-child(1) { animation-delay: 0.05s; }
.tool-grid .tool-card:nth-child(2) { animation-delay: 0.1s; }
.tool-grid .tool-card:nth-child(3) { animation-delay: 0.15s; }
.tool-grid .tool-card:nth-child(4) { animation-delay: 0.2s; }
.tool-grid .tool-card:nth-child(5) { animation-delay: 0.25s; }
.tool-grid .tool-card:nth-child(6) { animation-delay: 0.3s; }
.tool-grid .tool-card:nth-child(7) { animation-delay: 0.35s; }
.tool-grid .tool-card:nth-child(8) { animation-delay: 0.4s; }
.tool-grid .tool-card:nth-child(9) { animation-delay: 0.45s; }
.tool-grid .tool-card:nth-child(10) { animation-delay: 0.5s; }

.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  opacity: 0;
  transition: opacity var(--transition);
}

.tool-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transform: translateY(-4px);
  text-decoration: none;
  color: inherit;
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card__icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.tool-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.tool-card__desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.tool-card__tag {
  display: inline-block;
  font-size: 0.7rem;
  background: rgba(99, 102, 241, 0.15);
  color: var(--color-primary-light);
  border-radius: 6px;
  padding: 0.2em 0.65em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: auto;
  align-self: flex-start;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ===== Tool Page Layout ===== */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
}

.tool-header {
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.5s ease-out;
}

.tool-header h1 {
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 0.4rem;
  background: linear-gradient(135deg, var(--color-text), var(--color-primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tool-header p {
  color: var(--color-text-muted);
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
  animation: fadeIn 0.4s ease-out;
}

.breadcrumb a {
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--color-primary-light);
}

/* ===== Tool Card (content panel) ===== */
.panel {
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  animation: fadeInUp 0.5s ease-out;
}

/* ===== Form Elements ===== */
textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
  color: var(--color-text);
  background: rgba(15, 23, 42, 0.6);
}

textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.2), 0 0 16px rgba(99,102,241,0.1);
}

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.stat-item {
  text-align: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 0.5rem;
  transition: all var(--transition);
}

.stat-item:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-glow);
}

.stat-item__value {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-item__label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  min-height: 44px;
  border-radius: var(--radius);
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn:hover::after {
  opacity: 1;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

.btn--primary:hover {
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
  transform: translateY(-1px);
}

.btn--ghost {
  background: rgba(148, 163, 184, 0.1);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  background: rgba(148, 163, 184, 0.15);
  color: var(--color-text);
  border-color: rgba(148, 163, 184, 0.3);
}

/* ===== Form Inputs ===== */
input[type="text"],
input[type="number"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
select {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.55rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-text);
  background: rgba(15, 23, 42, 0.6);
  transition: border-color var(--transition), box-shadow var(--transition);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.2), 0 0 16px rgba(99,102,241,0.1);
}

input[type="color"] {
  width: 48px;
  height: 48px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2px;
  cursor: pointer;
  background: none;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--color-primary);
  cursor: pointer;
}

input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 1rem;
  height: 1rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}

.input-row {
  display: flex;
  gap: 0.75rem;
  align-items: end;
  flex-wrap: wrap;
}

.input-row .input-group {
  flex: 1;
  min-width: 120px;
}

/* ===== Output Box ===== */
.output-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.85rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--color-text);
  min-height: 60px;
  max-height: 400px;
  overflow: auto;
}

/* ===== Tabs ===== */
.tab-group {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1rem;
}

.tab {
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
  position: relative;
}

.tab:hover {
  color: var(--color-text);
}

.tab.active {
  color: var(--color-primary-light);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

/* ===== Copy Button ===== */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
}

.copy-btn:hover {
  background: rgba(148, 163, 184, 0.2);
  color: var(--color-text);
  border-color: rgba(148, 163, 184, 0.3);
}

.copy-btn.copied {
  color: var(--color-success);
  border-color: var(--color-success);
  background: rgba(52, 211, 153, 0.1);
}

/* ===== Color Preview ===== */
.color-preview {
  width: 100%;
  height: 80px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.color-preview:hover {
  box-shadow: 0 0 20px rgba(255,255,255,0.1);
}

/* ===== Slider Group ===== */
.slider-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.slider-group input[type="range"] {
  flex: 1;
}

.slider-group .slider-value {
  min-width: 3rem;
  text-align: right;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary-light);
}

/* ===== Action Bar ===== */
.action-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0.75rem 0;
}

/* ===== Preview Panel ===== */
.preview-panel {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  min-height: 120px;
  overflow: auto;
  line-height: 1.7;
  color: var(--color-text);
}

/* ===== File Drop Zone ===== */
.drop-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.drop-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99,102,241,0.05), rgba(34,211,238,0.05));
  opacity: 0;
  transition: opacity var(--transition);
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--color-primary);
  background: rgba(99,102,241,0.05);
}

.drop-zone:hover::before,
.drop-zone.dragover::before {
  opacity: 1;
}

.drop-zone input[type="file"] {
  display: none;
}

/* ===== Split Pane ===== */
.split-pane {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .split-pane {
    grid-template-columns: 1fr;
  }
}

/* ===== Strength Meter ===== */
.strength-meter {
  height: 6px;
  border-radius: 3px;
  background: var(--color-border);
  overflow: hidden;
  margin-top: 0.5rem;
}

.strength-meter__fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s;
}

/* ===== Timer ===== */
.timer-display {
  font-size: clamp(2.5rem, 12vw, 4.5rem);
  font-weight: 700;
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
  padding: 1.5rem 0;
  text-shadow: none;
}

/* ===== Diff ===== */
.diff-line {
  padding: 0.15rem 0.6rem;
  font-family: monospace;
  font-size: 0.85rem;
  border-radius: 4px;
  margin: 1px 0;
}

.diff-add {
  background: rgba(52, 211, 153, 0.15);
  color: var(--color-success);
}

.diff-remove {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}

.diff-same {
  color: var(--color-text-muted);
}

/* ===== Category Filter ===== */
.category-filter {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.5rem 0;
  margin-bottom: 1.5rem;
  position: sticky;
  top: 56px;
  z-index: 90;
  background: var(--color-bg);
}

.category-filter::-webkit-scrollbar { display: none; }

.category-filter__btn {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.category-filter__btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-light);
}

.category-filter__btn.is-active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.category-section.is-hidden { display: none; }
.category-ad.is-hidden { display: none; }

/* ===== Category Title ===== */
.category-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.category-title::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 1px;
}

/* ===== FAQ ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.faq-item {
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.faq-item:hover {
  border-color: rgba(99, 102, 241, 0.2);
}

.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--color-text);
  transition: color var(--transition);
}

.faq-item summary:hover {
  color: var(--color-primary-light);
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color var(--transition);
  width: 1.5rem;
  text-align: center;
}

.faq-item[open] summary::after {
  content: "\2212";
  color: var(--color-primary-light);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  padding: 0 1.25rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  animation: fadeIn 0.3s ease-out;
}

/* ===== Responsive 2-Column Grid ===== */
.result-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* ===== Table Scroll Wrapper ===== */
.table-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .site-nav {
    gap: 1rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .input-row {
    flex-direction: column;
  }

  .hero {
    padding: 2.5rem 1rem 2rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .tool-card {
    padding: 1rem;
    gap: 0.3rem;
  }

  .tool-card__icon {
    font-size: 1.6rem;
  }

  .tool-card__title {
    font-size: 0.8rem;
  }

  .tool-card__desc {
    display: none;
  }

  .tool-card__tag {
    display: none;
  }

  .container {
    padding: 0 1rem;
  }

  .tab-group {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tab-group::-webkit-scrollbar {
    display: none;
  }

  .tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .drop-zone {
    padding: 1.5rem 1rem;
  }

  .table-scroll-wrap::after {
    content: "\2190 \30B9\30AF\30ED\30FC\30EB \2192";
    display: block;
    text-align: center;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    padding: 0.25rem 0;
    opacity: 0.7;
  }
}

@media (max-width: 480px) {
  .result-grid-2col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-item__value {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .panel {
    padding: 1rem;
  }
}

/* ===== Selection ===== */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: var(--color-text);
}
