:root {
  --bg-main: #f8fafc;       /* 배경: 밝은 쿨 그레이 */
  --bg-panel: #ffffff;      /* 패널: 흰색 */
  --text-main: #1e293b;     /* 본문: 짙은 남색 */
  --text-muted: #64748b;    /* 보조: 중간 회색 */
  --border: #e2e8f0;        /* 테두리: 연한 회색 */
  --primary: #4f46e5;       /* 포인트: 인디고 */
  --primary-soft: #eef2ff;  /* 포인트 배경(연함) */
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --radius: 16px;
}

body {
  margin: 0;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* 랜딩페이지와 비슷한 은은한 텍스처 */
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 40%);
}

a { text-decoration: none; color: inherit; }
* { box-sizing: border-box; }

.shell { max-width: 800px; margin: 0 auto; padding: 20px; }

/* Header */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 800; font-size: 1.25rem; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
.brandMark {
  background: var(--primary); color: white; width: 32px; height: 32px;
  display: grid; place-items: center; border-radius: 8px; font-size: 18px;
}
.navLink { color: var(--text-muted); font-size: 0.9rem; margin-left: 12px; }
.navLink:hover { color: var(--primary); }

/* Hero Section */
.hero { text-align: center; margin-bottom: 40px; }
.heroTitle { font-size: 2.5rem; margin: 0; letter-spacing: -1px; color: var(--text-main); }
.heroSub { color: var(--text-muted); margin-top: 10px; }

/* Panels & Cards */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.panelHead { margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.panelTitle { font-size: 1.1rem; font-weight: 700; }
.panelSub { font-size: 0.9rem; color: var(--text-muted); margin-top: 4px; }

/* Grid for Tools */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

.card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s;
  background: #fdfdfd;
}
.card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); background: #fff; }
.cardTitle { font-weight: 700; font-size: 1.1rem; color: var(--primary); }
.cardDesc { font-size: 0.9rem; color: var(--text-muted); margin-top: 6px; line-height: 1.4; }
.cardCta { font-size: 0.85rem; font-weight: 600; margin-top: 12px; color: var(--text-main); }

/* Language Grid (SEO Friendly) */
.langGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.langChip {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
  background: #f8fafc;
}
.langChip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
.langCode { font-size: 0.75rem; text-transform: uppercase; opacity: 0.7; margin-top: 2px; }

.divider { height: 1px; background: var(--border); margin: 30px 0; }
.footer { text-align: center; margin-top: 60px; color: var(--text-muted); font-size: 0.875rem; }

/* Form Styles (For tools) */
.form .field { margin-bottom: 20px; }
.label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; color: var(--text-main); }
.input {
  width: 100%; padding: 12px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 1rem;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.btn {
  width: 100%; padding: 14px; border: none; border-radius: 10px;
  background: var(--primary); color: white; font-weight: 700; font-size: 1rem; cursor: pointer;
}
.btn:hover { background: var(--primary-hover); }

/* Result Box */
.result {
  margin-top: 24px; padding: 20px;
  background: var(--primary-soft); border-radius: 12px;
  border: 1px solid rgba(79, 70, 229, 0.2);
}
.resultRow { display: flex; justify-content: space-between; margin-bottom: 8px; }
.k { color: var(--text-muted); font-size: 0.9rem; }
.v { font-weight: 700; font-size: 1.1rem; color: var(--primary); }

/* Tool page layout */
.toolLayout {
  max-width: 720px;
  margin: 0 auto 60px;
}

/* Rails (language / tools) */
.rail {
  margin-top: 28px;
  padding: 20px 24px;
  background: var(--bg-panel);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.railHead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.railTitle {
  font-size: 0.95rem;
  font-weight: 700;
}

.railSub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.railChips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.railChip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: #f8fafc;
  transition: all 0.15s ease-out;
}

.railChip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.railChip--active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.railChipCode {
  font-size: 0.75rem;
  text-transform: uppercase;
  opacity: 0.7;
}


/* ---------- Collapsible language rail ---------- */

.rail--lang {
  padding-top: 16px;
}

.rail--lang summary {
  list-style: none;
  cursor: pointer;
}

.rail--lang summary::-webkit-details-marker {
  display: none;
}

.railHint {
  font-size: 0.8rem;
  color: var(--text-muted);
}
