:root {
  --bg: #f6f7f8;
  --paper: #ffffff;
  --ink: #111315;
  --muted: #6c737c;
  --line: #e6e8eb;
  --line-strong: #d7dade;
  --soft: #f0f2f4;
  --black: #0b0d10;
  --black-2: #171a1f;
  --green: #7cff6b;
  --green-2: #35d05c;
  --blue: #3b82f6;
  --red: #ef4444;
  --orange: #f59e0b;
  --radius: 22px;
  --radius-sm: 14px;
  --container: 1180px;
  --shadow: 0 24px 70px rgba(16, 20, 26, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 8%, rgba(124, 255, 107, .18), transparent 28%),
    linear-gradient(180deg, #fff 0%, var(--bg) 38%, #fff 100%);
  word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.container { width: min(var(--container), calc(100% - 40px)); margin: 0 auto; }
.skip-link { position: absolute; left: -9999px; top: 14px; padding: 10px 14px; background: var(--black); color: #fff; border-radius: 10px; z-index: 999; }
.skip-link:focus { left: 14px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(230,232,235,.8);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: -.04em; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  display: inline-grid; place-items: center;
  color: #fff; background: var(--black);
  font-size: 20px; font-weight: 950; line-height: 1;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.15);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; right: 7px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--green);
}
.brand-text { font-size: 20px; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav a { padding: 10px 13px; border-radius: 999px; color: #3f4650; font-weight: 800; font-size: 14px; }
.nav a:hover { background: var(--soft); color: var(--black); }
.menu-button { display: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 12px; font-weight: 900; }

.hero { padding: 74px 0 26px; }
.hero-inner { display: grid; grid-template-columns: minmax(0, .95fr) minmax(440px, 1fr); gap: 42px; align-items: center; }
.eyebrow { margin: 0 0 14px; color: #1e9d40; font-weight: 950; letter-spacing: -.02em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 22px; font-size: clamp(42px, 6vw, 72px); line-height: 1.04; letter-spacing: -.08em; }
h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.12; letter-spacing: -.07em; }
h3 { letter-spacing: -.04em; }
.lead { max-width: 660px; margin: 0; color: #4d5560; font-size: 19px; line-height: 1.75; letter-spacing: -.02em; }
.search-card { background: rgba(255,255,255,.78); border: 1px solid rgba(215,218,222,.9); box-shadow: var(--shadow); border-radius: 32px; padding: 18px; }
.search-form { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 22px; }
.search-form label { display: block; font-size: 14px; font-weight: 950; margin: 0 0 10px; color: #2a3037; }
.search-line { display: grid; grid-template-columns: minmax(0, 1fr) 126px; gap: 10px; }
.search-line input {
  width: 100%; height: 58px; border: 1px solid var(--line-strong); border-radius: 17px; padding: 0 18px;
  outline: none; font-size: 18px; font-weight: 800; letter-spacing: -.03em; background: #fbfcfd;
}
.search-line input:focus { border-color: var(--black); box-shadow: 0 0 0 4px rgba(11,13,16,.08); background: #fff; }
.btn-primary, .btn-secondary, .small-btn {
  border: 0; border-radius: 17px; font-weight: 950; letter-spacing: -.03em;
}
.btn-primary { height: 58px; color: #fff; background: var(--black); box-shadow: 0 14px 28px rgba(11,13,16,.18); }
.btn-primary:hover { transform: translateY(-1px); background: #000; }
.btn-secondary { height: 42px; padding: 0 14px; background: #fff; border: 1px solid var(--line); color: #222830; }
.btn-secondary:hover { border-color: var(--black); }
.small-btn { padding: 8px 10px; background: var(--soft); color: #222; font-size: 13px; border: 1px solid transparent; }
.small-btn:hover { border-color: var(--black); }
.field-help { margin: 10px 0 16px; color: var(--muted); font-size: 13px; }
.quick-box { margin-top: 2px; }
.quick-title { margin-bottom: 8px; color: #111315; font-size: 13px; font-weight: 950; }
.quick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-row button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; color: #3c444d; border-radius: 999px; padding: 9px 12px; font-size: 13px; font-weight: 850; }
.quick-row button span { width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 999px; background: #111315; color: var(--green); font-size: 11px; font-weight: 950; line-height: 1; }
.quick-row button:hover { border-color: var(--black); color: var(--black); transform: translateY(-1px); }

.summary-strip { padding: 28px 0 12px; }
.strip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.strip-grid div { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.strip-grid strong { display: block; font-size: 22px; letter-spacing: -.05em; margin-bottom: 6px; }
.strip-grid span { color: var(--muted); font-size: 14px; font-weight: 700; }

.section { padding: 66px 0; }
.result-section { padding-top: 28px; }
.result-shell { min-height: 330px; }
.empty-panel { display: grid; place-items: center; text-align: center; padding: 72px 22px; background: #fff; border: 1px dashed var(--line-strong); border-radius: 32px; }
.empty-icon { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 22px; background: var(--black); color: #fff; font-size: 34px; font-weight: 950; margin-bottom: 20px; position: relative; }
.empty-icon::after { content:""; position: absolute; top: 12px; right: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.empty-panel h2 { margin-bottom: 10px; font-size: clamp(24px, 3vw, 36px); }
.empty-panel p { margin: 0; color: var(--muted); }

.dashboard { display: grid; gap: 18px; }
.overview-card { background: var(--black); color: #fff; border-radius: 34px; padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 20px; box-shadow: 0 24px 70px rgba(11,13,16,.22); }
.overview-card .label { color: #a8b0bb; font-weight: 800; font-size: 14px; margin-bottom: 8px; }
.overview-card h2 { color: #fff; margin-bottom: 12px; font-size: clamp(30px, 4vw, 48px); }
.overview-card p { color: #c8ced6; line-height: 1.65; margin-bottom: 0; }
.grade-box { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 26px; padding: 20px; display: grid; align-content: center; text-align: center; }
.grade { font-size: 56px; font-weight: 950; letter-spacing: -.07em; color: var(--green); line-height: 1; }
.grade-text { color: #fff; font-weight: 950; margin-top: 8px; }
.score-note { color: #a8b0bb; font-size: 12px; margin-top: 8px; }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.metric { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: 0 12px 36px rgba(16, 20, 26, .04); }
.metric span { display: block; color: var(--muted); font-size: 13px; font-weight: 850; margin-bottom: 9px; }
.metric strong { display: block; font-size: clamp(22px, 3vw, 32px); letter-spacing: -.06em; }
.metric small { display: block; margin-top: 6px; color: var(--muted); }
.metric.good strong { color: #108b37; }
.metric.warn strong { color: #b87300; }
.metric.bad strong { color: #d73333; }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; }
.tab { border: 0; background: transparent; padding: 11px 14px; border-radius: 999px; color: #59616b; font-weight: 950; white-space: nowrap; }
.tab.active { background: var(--black); color: #fff; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 26px; padding: 22px; box-shadow: 0 12px 42px rgba(16, 20, 26, .05); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel-head h3 { margin-bottom: 6px; font-size: 24px; }
.panel-head p { margin: 0; color: var(--muted); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.toolbar-left, .toolbar-right { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.select, .filter-input { border: 1px solid var(--line); background: #fbfcfd; border-radius: 13px; height: 40px; padding: 0 12px; outline: none; }
.filter-input { min-width: 220px; }
.select:focus, .filter-input:focus { border-color: var(--black); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; }
table { width: 100%; min-width: 900px; border-collapse: collapse; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: #4b535d; background: #fafbfc; font-size: 13px; font-weight: 950; white-space: nowrap; }
td { color: #242a31; font-size: 14px; }
tr:last-child td { border-bottom: 0; }
.keyword-cell { font-weight: 950; letter-spacing: -.02em; }
.score-pill { display: inline-flex; min-width: 52px; justify-content: center; border-radius: 999px; padding: 6px 9px; font-weight: 950; background: var(--soft); }
.score-high { background: #e7ffdf; color: #157c31; }
.score-mid { background: #fff3cf; color: #9a6200; }
.score-low { background: #ffe2e2; color: #b61e1e; }
.intent-pill { display: inline-flex; border-radius: 999px; padding: 6px 9px; background: #f2f4f6; font-size: 12px; font-weight: 900; color: #424a54; }
.icon-actions { display: flex; gap: 6px; }
.icon-btn { width: 34px; height: 34px; border-radius: 11px; border: 1px solid var(--line); background: #fff; display: inline-grid; place-items: center; font-weight: 900; }
.icon-btn.active { background: #e7ffdf; border-color: #7be870; }

.insight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.insight-card { border: 1px solid var(--line); background: #fbfcfd; border-radius: 18px; padding: 18px; }
.insight-card strong { display: block; margin-bottom: 8px; font-size: 18px; }
.insight-card p { margin: 0; color: var(--muted); line-height: 1.6; }
.chart-card { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; }
.chart-box { min-height: 270px; display: grid; align-items: center; }
#trendChart { width: 100%; height: 270px; }
.trend-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.trend-list li { display: flex; justify-content: space-between; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; }
.suggestion-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.suggestion-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.suggestion-list li { padding: 12px 13px; background: #fbfcfd; border: 1px solid var(--line); border-radius: 15px; line-height: 1.55; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 10px; font-weight: 850; }
.saved-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 14px; }
.saved-list { display: grid; gap: 8px; max-height: 380px; overflow: auto; padding-right: 4px; }
.saved-item { border: 1px solid var(--line); border-radius: 15px; padding: 12px; background: #fbfcfd; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.saved-item strong { letter-spacing: -.03em; }
.note-box { display: grid; gap: 10px; }
.note-box textarea { width: 100%; min-height: 190px; resize: vertical; border: 1px solid var(--line); border-radius: 16px; padding: 14px; outline: none; background: #fbfcfd; }
.note-box textarea:focus { border-color: var(--black); }

.two-column { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 60px; align-items: start; }
.steps { display: grid; gap: 12px; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 22px; }
.step span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--black); color: var(--green); font-weight: 950; }
.step strong { display: block; margin-bottom: 5px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); line-height: 1.6; }
.muted-section { background: #fafbfc; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head.center { max-width: 740px; margin: 0 auto 28px; text-align: center; }
.section-head p:last-child { color: var(--muted); line-height: 1.75; }
.explain-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.explain-card { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 22px; }
.explain-card h3 { margin-bottom: 8px; }
.explain-card p { margin: 0; color: var(--muted); line-height: 1.65; }
.footer { padding: 34px 0; background: #fff; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.brand.mini .brand-mark { width: 32px; height: 32px; border-radius: 10px; font-size: 17px; }
.brand.mini .brand-text { font-size: 17px; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-links a { color: #56606b; font-weight: 800; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(30px); min-width: 220px; max-width: calc(100% - 36px); padding: 12px 16px; border-radius: 999px; background: var(--black); color: #fff; font-weight: 850; box-shadow: 0 16px 50px rgba(0,0,0,.22); opacity: 0; pointer-events: none; transition: .2s ease; z-index: 100; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.loading { opacity: .72; pointer-events: none; }

@media (max-width: 980px) {
  .hero-inner, .overview-card, .chart-card, .two-column, .saved-layout { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .insight-grid, .suggestion-grid, .explain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .container { width: min(100% - 28px, var(--container)); }
  .header-inner { height: 64px; }
  .menu-button { display: inline-flex; }
  .nav { position: absolute; top: 64px; left: 14px; right: 14px; display: none; flex-direction: column; align-items: stretch; padding: 10px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 13px 14px; }
  .hero { padding-top: 42px; }
  .hero-inner { gap: 24px; }
  .search-card { padding: 10px; border-radius: 24px; }
  .search-form { padding: 16px; border-radius: 20px; }
  .search-line { grid-template-columns: 1fr; }
  .btn-primary { width: 100%; }
  .metric-grid, .insight-grid, .suggestion-grid, .strip-grid, .explain-grid { grid-template-columns: 1fr; }
  .overview-card { border-radius: 26px; padding: 22px; }
  .tabs { border-radius: 20px; }
  .panel { padding: 16px; border-radius: 22px; }
  .panel-head { flex-direction: column; }
  .filter-input { width: 100%; min-width: 0; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .select { width: 100%; }
  .section { padding: 48px 0; }
}

/* update: richer user-facing analysis layout */
.metric-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.popular-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.popular-card { border: 1px solid var(--line); background: #fbfcfd; border-radius: 20px; padding: 18px; display: grid; gap: 10px; }
.popular-card h4 { margin: 0; font-size: 20px; letter-spacing: -.04em; }
.popular-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.popular-meta, .popular-detail { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.popular-meta span, .popular-detail span { border-radius: 999px; background: #fff; border: 1px solid var(--line); padding: 6px 9px; color: #4d5660; font-size: 12px; font-weight: 900; }
.popular-meta strong { color: #11883a; font-weight: 950; }
.faq-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.faq-card { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 12px 38px rgba(16,20,26,.04); }
.faq-card h3 { margin-bottom: 10px; font-size: 19px; letter-spacing: -.04em; }
.faq-card p { margin: 0; color: var(--muted); line-height: 1.75; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .popular-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .metric-grid, .popular-grid, .faq-grid { grid-template-columns: 1fr; }
}

/* 기간별 인기 키워드 */
.period-section { padding-top: 54px; }
.period-card { background: #fff; border: 1px solid var(--line); border-radius: 30px; padding: 22px; box-shadow: 0 18px 54px rgba(16,20,26,.06); }
.period-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px; background: #f7f8f9; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 14px; }
.period-tab { border: 0; background: transparent; color: #4b535d; border-radius: 999px; padding: 12px 18px; font-weight: 950; }
.period-tab.active { background: var(--black); color: #fff; }
.period-status { color: var(--muted); font-weight: 800; margin: 10px 4px 16px; }
.period-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.period-item { border: 1px solid var(--line); border-radius: 20px; background: #fbfcfd; padding: 14px; display: grid; gap: 10px; }
.period-item button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 0; text-align: left; }
.period-item .rank { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 999px; background: var(--black); color: var(--green); display: inline-grid; place-items: center; font-size: 13px; font-weight: 950; }
.period-keyword { color: var(--ink); font-size: 18px; font-weight: 950; letter-spacing: -.04em; }
.period-numbers { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 40px; }
.period-numbers span { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 9px; color: #58616c; font-size: 12px; font-weight: 850; }
.period-skeleton { min-height: 92px; border-radius: 20px; background: linear-gradient(90deg, #f2f4f6 0%, #ffffff 52%, #f2f4f6 100%); background-size: 220% 100%; animation: periodShimmer 1.2s infinite linear; border: 1px solid var(--line); }
.period-empty { grid-column: 1 / -1; padding: 24px; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 20px; }
@keyframes periodShimmer { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }

@media (max-width: 720px) {
  .period-tabs { border-radius: 20px; }
  .period-tab { flex: 1 1 calc(50% - 8px); }
  .period-grid { grid-template-columns: 1fr; }
  .period-numbers { padding-left: 0; }
}

.sub-hero { padding: 76px 0 22px; background: linear-gradient(135deg, #ffffff 0%, #f3fff4 100%); border-bottom: 1px solid var(--line); }
.sub-hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 34px; align-items: center; }
.sub-hero h1 { margin: 10px 0 18px; font-size: clamp(42px, 5.4vw, 74px); line-height: .98; letter-spacing: -.07em; }
.sub-hero-card { border: 1px solid var(--line); border-radius: 28px; padding: 26px; background: #fff; box-shadow: 0 18px 54px rgba(16,20,26,.07); }
.sub-hero-card strong { display: block; font-size: 22px; letter-spacing: -.04em; margin-bottom: 10px; }
.sub-hero-card p { color: var(--muted); line-height: 1.75; margin: 0 0 18px; }
.link-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
@media (max-width: 920px) { .sub-hero-inner { grid-template-columns: 1fr; } .sub-hero { padding-top: 46px; } }


/* final polish */
.hero-actions { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }
.small-lead { font-size: 16px; margin-top: 18px; }
.narrow { max-width: 900px; }
.legal-panel h2 { font-size: 24px; margin: 28px 0 10px; letter-spacing: -.04em; }
.legal-panel h2:first-child { margin-top: 0; }
.legal-panel p, .legal-panel li { color: var(--muted); line-height: 1.85; }
.legal-panel a { color: #0f8e3a; font-weight: 900; text-decoration: underline; text-underline-offset: 3px; }
.section-head { margin-bottom: 24px; }
.section-head.center { max-width: 820px; margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--muted); line-height: 1.8; }
.muted-section { background: linear-gradient(180deg, rgba(247,248,249,.7), rgba(255,255,255,.9)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.faq-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.faq-card { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 12px 38px rgba(16,20,26,.04); }
.faq-card h3 { margin-bottom: 10px; font-size: 19px; letter-spacing: -.04em; }
.faq-card p { margin: 0; color: var(--muted); line-height: 1.75; }
.nav a[aria-current="page"] { background: var(--soft); color: var(--black); }
@media (max-width: 980px) { .faq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .faq-grid { grid-template-columns: 1fr; } h1 { letter-spacing: -.06em; } }

/* 추가 도구 페이지 */
.compact-hero { padding: 72px 0 36px; }
.tool-page { padding-top: 44px; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 18px; align-items: start; }
.tool-card { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: 0 16px 50px rgba(12, 16, 20, .05); }
.tool-card label { display: block; margin-bottom: 10px; }
.tool-card textarea, .result-textarea { width: 100%; min-height: 230px; border: 1px solid var(--line); border-radius: 18px; padding: 15px; outline: none; resize: vertical; background: #fbfcfd; font: inherit; line-height: 1.65; }
.tool-card textarea:focus, .wide-input:focus { border-color: var(--black); box-shadow: 0 0 0 4px rgba(124, 255, 107, .2); }
.wide-input { width: 100%; height: 54px; border: 1px solid var(--line); border-radius: 16px; padding: 0 16px; outline: none; background: #fbfcfd; font: inherit; }
.tool-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.soft-card { background: #fbfcfd; }
.clean-list { margin: 12px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.9; }
.muted-text { color: var(--muted); line-height: 1.7; }
.result-block { margin-top: 24px; }
.tool-result-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.tool-result-head h2 { margin: 0 0 6px; }
.tool-result-head p { margin: 0; color: var(--muted); line-height: 1.65; }
.mini-card-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.mini-card { border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: 15px; }
.mini-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 900; margin-bottom: 6px; }
.mini-card strong { display: block; font-size: 17px; letter-spacing: -.03em; margin-bottom: 7px; }
.mini-card p { margin: 0; color: var(--muted); font-size: 13px; }
.grade-mini { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: var(--black); color: var(--green); font-weight: 950; }
.progress-line { height: 10px; background: #eef0f2; border-radius: 999px; overflow: hidden; margin-top: 14px; }
.progress-line span { display: block; height: 100%; background: var(--green); transition: width .25s ease; }
.priority-list { display: grid; gap: 12px; margin-bottom: 30px; }
.priority-item { display: grid; grid-template-columns: 46px 1fr; gap: 14px; padding: 18px; border: 1px solid var(--line); background: #fff; border-radius: 20px; }
.priority-item h3 { margin: 0 0 7px; }
.priority-item p { margin: 0 0 10px; color: var(--muted); line-height: 1.6; }
.priority-item .rank { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; background: var(--black); color: var(--green); font-weight: 950; }
.title-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.inner-head { margin-top: 28px; }
.month-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.month-card { padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: #fff; }
.month-card h3 { margin-bottom: 12px; }
.saved-page-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tool-table th, .tool-table td { white-space: nowrap; }
.result-card { min-height: 360px; }
@media (max-width: 1100px) { .mini-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .saved-page-grid, .month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .tool-layout, .title-card-grid { grid-template-columns: 1fr; } .mini-card-grid, .saved-page-grid, .month-grid { grid-template-columns: 1fr; } .tool-result-head { align-items: stretch; } }
@media (min-width: 721px) {
  .nav { gap: 4px; }
  .nav a { padding: 9px 9px; font-size: 13px; }
}

/* PC / mobile dedicated layout refinements */
.hero-actions { margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; }
.link-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding-left: 16px; padding-right: 16px; }
.mobile-only { display: none !important; }

@media (min-width: 1081px) {
  .site-header { min-width: 1080px; }
  .nav { flex-wrap: wrap; justify-content: flex-end; }
  .hero-inner { min-height: 470px; }
  .search-card { align-self: center; }
  .dashboard { gap: 20px; }
  .panel { padding: 26px; }
  .tool-layout { grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr); }
  .sub-hero.compact-hero { padding-top: 66px; }
}

@media (max-width: 900px) {
  body { background: linear-gradient(180deg, #fff 0%, #f8f9fa 42%, #fff 100%); }
  .container { width: min(100% - 28px, var(--container)); }
  .site-header { background: rgba(255,255,255,.96); }
  .header-inner { height: 62px; gap: 10px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 11px; font-size: 18px; }
  .brand-text { font-size: 18px; }
  .menu-button { min-height: 42px; padding: 0 14px; }
  .nav {
    position: fixed;
    top: 70px;
    left: 14px;
    right: 14px;
    max-height: calc(100vh - 92px);
    overflow: auto;
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
    border-radius: 24px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 30px 80px rgba(11,13,16,.20);
    border: 1px solid var(--line);
  }
  .nav.open { display: grid; }
  .nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 10px;
    text-align: center;
    background: #f7f8f9;
    border: 1px solid #edf0f2;
    border-radius: 16px;
    font-size: 13px;
  }
  .nav a:first-child { grid-column: 1 / -1; background: var(--black); color: #fff; }

  .hero { padding: 18px 0 14px; }
  .hero-inner { display: flex; flex-direction: column; gap: 18px; }
  .search-card { order: 1; width: 100%; padding: 8px; border-radius: 24px; }
  .hero-copy { order: 2; width: 100%; }
  h1 { font-size: clamp(33px, 11vw, 48px); line-height: 1.08; letter-spacing: -.065em; margin-bottom: 14px; }
  h2 { font-size: clamp(26px, 8vw, 38px); }
  .lead { font-size: 16px; line-height: 1.68; }
  .eyebrow { font-size: 13px; margin-bottom: 8px; }
  .hero-actions { margin-top: 16px; }
  .hero-actions .btn-secondary { width: 100%; min-height: 46px; }

  .search-form { padding: 15px; border-radius: 20px; }
  .search-form label { font-size: 13px; }
  .search-line { grid-template-columns: 1fr; gap: 9px; }
  .search-line input { height: 54px; font-size: 16px; border-radius: 16px; }
  .btn-primary { width: 100%; min-height: 54px; }
  .quick-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
  .quick-row button { flex: 0 0 auto; scroll-snap-align: start; min-height: 40px; }

  .summary-strip { padding: 14px 0 4px; }
  .strip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .strip-grid div { padding: 13px; border-radius: 16px; }
  .strip-grid strong { font-size: 18px; }
  .strip-grid span { font-size: 12px; }

  .section { padding: 42px 0; }
  .result-section { padding-top: 16px; }
  .empty-panel { padding: 46px 16px; border-radius: 24px; }
  .empty-icon { width: 58px; height: 58px; border-radius: 18px; font-size: 28px; margin-bottom: 16px; }

  .overview-card { grid-template-columns: 1fr; padding: 20px; border-radius: 24px; gap: 14px; }
  .overview-card h2 { font-size: clamp(28px, 9vw, 40px); margin-bottom: 8px; }
  .overview-card p { font-size: 14px; }
  .grade-box { padding: 16px; border-radius: 20px; }
  .grade { font-size: 48px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric { padding: 14px; border-radius: 18px; }
  .metric span { font-size: 12px; margin-bottom: 7px; }
  .metric strong { font-size: 22px; }
  .metric small { font-size: 11px; line-height: 1.35; }

  .tabs { position: sticky; top: 64px; z-index: 20; border-radius: 18px; padding: 6px; overflow-x: auto; box-shadow: 0 12px 34px rgba(16,20,26,.08); }
  .tab { min-height: 42px; padding: 10px 13px; font-size: 13px; }
  .panel { padding: 15px; border-radius: 22px; }
  .panel-head { flex-direction: column; gap: 10px; margin-bottom: 14px; }
  .panel-head h3 { font-size: 21px; }
  .panel-head .btn-secondary, .panel-head .btn-primary { width: 100%; }
  .toolbar { gap: 8px; }
  .toolbar-left, .toolbar-right { width: 100%; display: grid; grid-template-columns: 1fr; }
  .toolbar-right { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .select, .filter-input { width: 100%; height: 44px; }

  .insight-grid, .suggestion-grid, .explain-grid, .faq-grid, .popular-grid, .saved-layout { grid-template-columns: 1fr; }
  .insight-card, .explain-card, .faq-card, .popular-card, .tool-card { border-radius: 20px; padding: 16px; }
  .chart-card { grid-template-columns: 1fr; }
  .chart-box { min-height: 210px; }
  #trendChart { height: 220px; }
  .saved-list { max-height: 260px; }

  .two-column, .tool-layout, .sub-hero-inner, .title-card-grid { grid-template-columns: 1fr; gap: 18px; }
  .sub-hero { padding: 34px 0 18px; }
  .sub-hero h1 { font-size: clamp(32px, 10vw, 46px); line-height: 1.06; }
  .sub-hero-card { padding: 18px; border-radius: 22px; }
  .sub-hero-card .btn-primary, .sub-hero-card .btn-secondary { width: 100%; }
  .tool-page { padding-top: 32px; }
  .tool-card textarea, .result-textarea { min-height: 180px; font-size: 15px; }
  .tool-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .tool-actions .btn-primary, .tool-actions .btn-secondary, .tool-actions .small-btn { width: 100%; }
  .mini-card-grid, .saved-page-grid, .month-grid { grid-template-columns: 1fr; }
  .priority-item { grid-template-columns: 40px 1fr; padding: 15px; }
  .priority-item .rank { width: 40px; height: 40px; border-radius: 13px; }

  .period-card { padding: 15px; border-radius: 22px; }
  .period-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 18px; }
  .period-tab { width: 100%; padding: 12px 8px; }
  .period-grid { grid-template-columns: 1fr; }
  .period-item { border-radius: 18px; }
  .period-numbers { padding-left: 0; }

  .footer { padding: 28px 0 96px; }
  .footer-inner { align-items: flex-start; }
  .footer-links { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .footer-links a { background: #f7f8f9; border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; text-align: center; font-size: 13px; }
  .toast { bottom: 18px; border-radius: 18px; }
}

@media (max-width: 620px) {
  .table-wrap { border: 0; border-radius: 0; overflow: visible; }
  .table-wrap table, .table-wrap thead, .table-wrap tbody, .table-wrap tr, .table-wrap th, .table-wrap td { display: block; width: 100%; min-width: 0; }
  .table-wrap thead { display: none; }
  .table-wrap tr { margin-bottom: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 10px 28px rgba(16,20,26,.04); }
  .table-wrap td { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 2px; border-bottom: 1px solid #eef0f2; text-align: right; font-size: 14px; }
  .table-wrap td:last-child { border-bottom: 0; }
  .table-wrap td::before { content: attr(data-label); flex: 0 0 auto; color: var(--muted); font-size: 12px; font-weight: 950; text-align: left; }
  .table-wrap td.keyword-cell { display: block; text-align: left; padding: 4px 2px 12px; font-size: 18px; }
  .table-wrap td.keyword-cell::before { display: block; margin-bottom: 5px; }
  .table-wrap .icon-actions { justify-content: flex-end; }
  .table-wrap .small-btn { min-width: 86px; }
}

@media (max-width: 430px) {
  .container { width: min(100% - 22px, var(--container)); }
  .nav { left: 10px; right: 10px; grid-template-columns: 1fr; }
  .nav a:first-child { grid-column: auto; }
  .metric-grid, .strip-grid { grid-template-columns: 1fr; }
  .toolbar-right { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr; }
  .popular-detail, .popular-meta { align-items: stretch; }
  .popular-detail span, .popular-meta span { width: 100%; text-align: center; }
}

/* Rank check pages */
.rank-layout .rank-form label { margin-top: 14px; font-weight: 950; color: #252b32; }
.rank-layout .rank-form label:first-of-type { margin-top: 0; }
.optional { color: var(--muted); font-size: 12px; font-weight: 800; }
.rank-result-card { min-height: 180px; }
.rank-result-grid { display: grid; grid-template-columns: 1.1fr repeat(2, minmax(0, .95fr)); gap: 12px; margin-bottom: 16px; }
.rank-main-card, .rank-info-card { border: 1px solid var(--line); border-radius: 24px; padding: 22px; background: #fff; box-shadow: 0 12px 38px rgba(16,20,26,.04); }
.rank-main-card { background: var(--black); color: #fff; }
.rank-main-card.found { background: linear-gradient(135deg, #0b0d10, #14351b); }
.rank-main-card.missing { background: linear-gradient(135deg, #0b0d10, #392015); }
.rank-main-card span, .rank-info-card span { display: block; color: var(--muted); font-size: 13px; font-weight: 950; margin-bottom: 10px; }
.rank-main-card span { color: #a8b0bb; }
.rank-main-card strong { display: block; font-size: clamp(38px, 5vw, 64px); letter-spacing: -.08em; line-height: 1; color: var(--green); margin-bottom: 12px; }
.rank-info-card strong { display: block; font-size: 22px; letter-spacing: -.05em; margin-bottom: 10px; }
.rank-main-card p, .rank-info-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.id-merge-card strong { margin-bottom: 0; }
.id-merge-rows { display: grid; gap: 12px; }
.id-merge-row { display: grid; gap: 6px; padding-top: 2px; }
.id-merge-row + .id-merge-row { padding-top: 12px; border-top: 1px dashed var(--line); }
.id-merge-row b { font-size: 12px; color: var(--muted); font-weight: 900; }
.rank-main-card p { color: #d9dee5; }
.product-found-card { display: grid; grid-template-columns: 110px 1fr; gap: 18px; align-items: center; margin-bottom: 16px; }
.product-found-card img { width: 110px; height: 110px; object-fit: cover; border-radius: 18px; border: 1px solid var(--line); background: #f7f8f9; }
.product-found-card h3, .place-found-card h3 { margin-bottom: 8px; font-size: 22px; letter-spacing: -.04em; }
.product-id-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 14px; }
.product-id-meta span { display: inline-flex; align-items: center; border: 1px solid var(--line); background: #f7f9fb; border-radius: 999px; padding: 7px 10px; color: #3d4650; font-size: 12px; font-weight: 900; }
.rank-list { display: grid; gap: 10px; }
.rank-list-item { display: grid; grid-template-columns: 58px 1fr; gap: 14px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: #fbfcfd; }
.rank-list-item strong { display: block; margin-bottom: 5px; letter-spacing: -.03em; }
.rank-list-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.rank-badge { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--black); color: var(--green); font-weight: 950; font-size: 13px; }
.notice-card { margin-top: 14px; padding: 18px; border: 1px solid #dbe7dd; background: #f6fff7; border-radius: 20px; }
.notice-card strong { display: block; margin-bottom: 6px; }
.notice-card p { margin: 0; color: #4d5b50; line-height: 1.75; }

@media (max-width: 900px) {
  .rank-result-grid { grid-template-columns: 1fr; }
  .product-found-card { grid-template-columns: 82px 1fr; padding: 15px; }
  .product-found-card img { width: 82px; height: 82px; border-radius: 15px; }
  .rank-main-card, .rank-info-card { padding: 18px; border-radius: 20px; }
  .rank-main-card strong { font-size: 48px; }
  .rank-list-item { grid-template-columns: 46px 1fr; padding: 12px; }
  .rank-badge { width: 42px; height: 42px; border-radius: 13px; font-size: 12px; }
}

@media (max-width: 430px) {
  .product-found-card { grid-template-columns: 1fr; }
  .product-found-card img { width: 100%; height: 180px; }
}


/* Publish-ready clean navigation */
.compact-nav { gap: 10px; }
.compact-nav .nav-main,
.compact-nav .nav-group-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 999px;
  color: #3f4650;
  font-weight: 900;
  font-size: 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
}
.compact-nav .nav-main:hover,
.compact-nav .nav-group-button:hover,
.compact-nav .nav-main[aria-current="page"] { background: var(--soft); color: var(--black); }
.nav-group { position: relative; display: inline-flex; }
.nav-group-button::after { content: ""; width: 6px; height: 6px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .72; }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  display: none;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 24px 70px rgba(16,20,26,.13);
  z-index: 70;
}
.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown { display: grid; gap: 4px; }
.nav-dropdown a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 12px;
  color: #404751;
  font-size: 13px;
  font-weight: 850;
}
.nav-dropdown a:hover,
.nav-dropdown a[aria-current="page"] { background: #f2f4f6; color: #0b0d10; }
.compact-feature-section { padding-top: 56px; }
.feature-link-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.feature-link-card {
  display: block;
  min-height: 132px;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 44px rgba(16,20,26,.05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.feature-link-card:hover { transform: translateY(-3px); border-color: #cfd5da; box-shadow: 0 20px 58px rgba(16,20,26,.09); }
.feature-link-card strong { display: block; margin-bottom: 9px; color: var(--black); font-size: 19px; letter-spacing: -.04em; }
.feature-link-card span { display: block; color: var(--muted); line-height: 1.65; font-size: 14px; }

@media (min-width: 901px) {
  .compact-nav { flex-wrap: nowrap; }
}
@media (max-width: 900px) {
  .compact-nav.nav {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .compact-nav .nav-main,
  .compact-nav .nav-group-button {
    width: 100%;
    min-height: 48px;
    background: #f7f8f9;
    border: 1px solid #edf0f2;
    border-radius: 16px;
    font-size: 14px;
  }
  .compact-nav .nav-main:first-child { background: var(--black); color: #fff; }
  .nav-group { display: grid; gap: 8px; width: 100%; }
  .nav-group-button { justify-content: space-between; }
  .nav-dropdown {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    padding: 8px;
    box-shadow: none;
    background: #fff;
    border-radius: 18px;
  }
  .nav-dropdown a {
    min-height: 44px;
    justify-content: center;
    text-align: center;
    background: #f7f8f9;
    border: 1px solid #edf0f2;
  }
  .feature-link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-feature-section { padding-top: 42px; }
}
@media (max-width: 520px) {
  .nav-dropdown, .feature-link-grid { grid-template-columns: 1fr; }
  .feature-link-card { min-height: auto; padding: 18px; border-radius: 20px; }
}

/* Dropdown polish: open only while hovering or explicitly toggled */
.compact-nav .nav-group:focus-within:not(:hover):not(.is-open) .nav-dropdown { display: none; }
.compact-nav .nav-group.is-open .nav-dropdown { display: grid; gap: 4px; }
.compact-nav .nav-group.is-open .nav-group-button { background: var(--soft); color: var(--black); }

@media (hover: hover) and (min-width: 901px) {
  .compact-nav .nav-group:hover .nav-dropdown { display: grid; gap: 4px; }
}

@media (max-width: 900px) {
  .compact-nav .nav-dropdown { display: none; }
  .compact-nav .nav-group.is-open .nav-dropdown { display: grid; }
  .compact-nav .nav-group-button::after { transition: transform .16s ease; }
  .compact-nav .nav-group.is-open .nav-group-button::after { transform: rotate(225deg) translate(-2px, -1px); }
}

/* mobile readability update: PC layout is left untouched */
@media (max-width: 760px) {
  :root {
    --mobile-gap: 12px;
    --mobile-radius: 18px;
  }

  html { scroll-padding-top: 72px; }
  body {
    font-size: 15px;
    line-height: 1.6;
    letter-spacing: -.01em;
    background: linear-gradient(180deg, #ffffff 0%, #f8faf9 55%, #ffffff 100%);
  }
  .container { width: min(100% - 24px, var(--container)); }

  .site-header {
    background: rgba(255,255,255,.98);
    border-bottom: 1px solid rgba(230,232,235,.95);
    box-shadow: 0 8px 24px rgba(16,20,26,.04);
  }
  .header-inner { height: 58px; }
  .brand { gap: 8px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 10px; font-size: 17px; }
  .brand-mark::after { right: 6px; top: 6px; width: 5px; height: 5px; }
  .brand-text { font-size: 17px; letter-spacing: -.05em; }
  .menu-button {
    height: 38px;
    min-height: 38px;
    padding: 0 13px;
    border-radius: 999px;
    background: #0b0d10;
    color: #fff;
    border-color: #0b0d10;
    font-size: 13px;
    font-weight: 950;
  }

  .compact-nav.nav,
  .nav {
    top: 66px;
    left: 12px;
    right: 12px;
    max-height: min(74vh, 560px);
    padding: 12px;
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(11,13,16,.24);
  }
  .compact-nav .nav-main,
  .compact-nav .nav-group-button,
  .nav a {
    min-height: 46px;
    border-radius: 15px;
    font-size: 13.5px;
    letter-spacing: -.02em;
  }
  .nav-dropdown {
    gap: 7px;
    padding: 8px;
    background: #f8f9fa;
  }
  .nav-dropdown a {
    min-height: 43px;
    font-size: 13px;
    border-radius: 14px;
  }

  .hero,
  .compact-hero,
  .sub-hero {
    padding-top: 22px;
    padding-bottom: 14px;
  }
  .hero-inner { gap: 14px; }
  .search-card {
    border-radius: 22px;
    padding: 8px;
    box-shadow: 0 12px 34px rgba(16,20,26,.07);
    background: rgba(255,255,255,.92);
  }
  .search-form {
    padding: 15px;
    border-radius: 18px;
  }
  .search-form label,
  .tool-card label,
  .rank-layout .rank-form label {
    font-size: 13px;
    margin-bottom: 8px;
  }
  .search-line input,
  .wide-input {
    height: 52px;
    padding: 0 15px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 850;
  }
  .btn-primary {
    height: 52px;
    min-height: 52px;
    border-radius: 15px;
    font-size: 15px;
  }
  .btn-secondary,
  .small-btn {
    min-height: 42px;
    border-radius: 14px;
  }
  .field-help {
    margin: 8px 0 14px;
    font-size: 12.5px;
    line-height: 1.5;
  }
  .quick-title {
    margin-bottom: 7px;
    font-size: 12.5px;
  }
  .quick-row {
    gap: 7px;
    margin-left: -2px;
    margin-right: -2px;
  }
  .quick-row button {
    padding: 8px 11px;
    min-height: 38px;
    font-size: 12.5px;
    border-radius: 999px;
    background: #fff;
  }
  .quick-row button span {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .hero-copy {
    padding: 4px 2px 0;
  }
  .eyebrow {
    font-size: 12.5px;
    margin-bottom: 7px;
  }
  h1 {
    font-size: clamp(27px, 8.4vw, 38px);
    line-height: 1.16;
    letter-spacing: -.06em;
    margin-bottom: 12px;
  }
  h2 {
    font-size: clamp(24px, 7vw, 33px);
    line-height: 1.2;
    letter-spacing: -.055em;
  }
  h3 { line-height: 1.3; }
  .lead {
    font-size: 15px;
    line-height: 1.66;
    color: #4f5964;
  }
  .hero-actions { margin-top: 12px; }
  .hero-actions .link-button { width: 100%; }

  .summary-strip { padding: 12px 0 0; }
  .strip-grid {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 0 2px 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .strip-grid div {
    flex: 0 0 152px;
    scroll-snap-align: start;
    padding: 13px 14px;
    border-radius: 16px;
  }
  .strip-grid strong { font-size: 17px; margin-bottom: 4px; }
  .strip-grid span { font-size: 12px; line-height: 1.35; }

  .section { padding: 34px 0; }
  .compact-feature-section { padding-top: 28px; }
  .section-head,
  .section-head.center {
    text-align: left;
    margin-bottom: 16px;
  }
  .section-head p { line-height: 1.65; }
  .section-head h2 { margin-bottom: 10px; }
  .feature-link-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .feature-link-card {
    min-height: auto;
    padding: 16px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(16,20,26,.04);
  }
  .feature-link-card strong {
    font-size: 17px;
    margin-bottom: 5px;
  }
  .feature-link-card span {
    font-size: 13.5px;
    line-height: 1.55;
  }

  .result-section { padding-top: 12px; }
  .result-shell { min-height: 240px; }
  .empty-panel {
    padding: 36px 17px;
    border-radius: 22px;
  }
  .empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 25px;
    margin-bottom: 14px;
  }
  .empty-panel h2 { font-size: 22px; line-height: 1.25; }
  .empty-panel p { font-size: 14px; line-height: 1.6; }

  .dashboard { gap: 12px; }
  .overview-card {
    padding: 18px;
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(11,13,16,.18);
  }
  .overview-card .label { font-size: 12.5px; }
  .overview-card h2 { font-size: 29px; line-height: 1.14; }
  .overview-card p { font-size: 13.5px; line-height: 1.6; }
  .grade-box { padding: 14px; border-radius: 18px; }
  .grade { font-size: 42px; }
  .grade-text { font-size: 14px; }
  .score-note { font-size: 11.5px; }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .metric {
    min-height: 104px;
    padding: 13px;
    border-radius: 17px;
  }
  .metric span { font-size: 11.5px; }
  .metric strong { font-size: 20px; line-height: 1.12; }
  .metric small { font-size: 11px; }

  .tabs {
    top: 58px;
    margin-left: -4px;
    margin-right: -4px;
    border-radius: 16px;
    padding: 5px;
  }
  .tab {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 12.5px;
  }
  .panel {
    padding: 14px;
    border-radius: 20px;
  }
  .panel-head h3 {
    font-size: 20px;
    margin-bottom: 5px;
  }
  .panel-head p {
    font-size: 13.5px;
    line-height: 1.55;
  }

  .insight-card,
  .explain-card,
  .faq-card,
  .popular-card,
  .tool-card,
  .month-card,
  .mini-card {
    padding: 15px;
    border-radius: 18px;
  }
  .insight-card strong,
  .explain-card h3,
  .faq-card h3 { font-size: 17px; }
  .insight-card p,
  .explain-card p,
  .faq-card p,
  .muted-text,
  .clean-list { font-size: 13.5px; line-height: 1.65; }

  .two-column { gap: 20px; }
  .steps { gap: 9px; }
  .step {
    grid-template-columns: 38px 1fr;
    gap: 11px;
    padding: 14px;
    border-radius: 18px;
  }
  .step span {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 14px;
  }
  .step strong { font-size: 16px; }
  .step p { font-size: 13.5px; line-height: 1.6; }

  .sub-hero-card,
  .period-card,
  .rank-main-card,
  .rank-info-card,
  .notice-card {
    border-radius: 18px;
    padding: 15px;
  }
  .sub-hero-card strong { font-size: 19px; }
  .sub-hero-card p { font-size: 13.5px; line-height: 1.65; }

  .period-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 5px;
    border-radius: 15px;
  }
  .period-tab {
    min-height: 39px;
    padding: 8px 4px;
    font-size: 12.5px;
  }
  .period-item {
    padding: 13px;
    border-radius: 17px;
  }
  .period-keyword { font-size: 16px; }
  .period-numbers span { font-size: 11.5px; }

  .tool-card textarea,
  .result-textarea {
    min-height: 160px;
    padding: 13px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.6;
  }
  .tool-result-head h2 { font-size: 24px; }
  .tool-result-head p { font-size: 13.5px; }
  .priority-item {
    grid-template-columns: 36px 1fr;
    gap: 11px;
    padding: 14px;
    border-radius: 17px;
  }
  .priority-item .rank {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }
  .priority-item h3 { font-size: 17px; }
  .priority-item p { font-size: 13.5px; }

  .rank-main-card strong { font-size: 42px; }
  .rank-info-card strong { font-size: 18px; }
  .rank-main-card p,
  .rank-info-card p,
  .notice-card p { font-size: 13.5px; line-height: 1.6; }
  .product-found-card {
    grid-template-columns: 72px 1fr;
    gap: 12px;
    padding: 0;
  }
  .product-found-card img {
    width: 72px;
    height: 72px;
    border-radius: 14px;
  }
  .product-found-card h3,
  .place-found-card h3 {
    font-size: 18px;
    line-height: 1.35;
  }
  .rank-list-item {
    grid-template-columns: 40px 1fr;
    gap: 11px;
    padding: 12px;
    border-radius: 16px;
  }
  .rank-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }
  .rank-list-item p { font-size: 12.8px; }

  .table-wrap tr {
    padding: 12px 13px;
    border-radius: 16px;
    margin-bottom: 10px;
  }
  .table-wrap td {
    padding: 8px 0;
    font-size: 13.2px;
    gap: 10px;
  }
  .table-wrap td::before { font-size: 11.5px; }
  .table-wrap td.keyword-cell {
    font-size: 16.5px;
    padding-bottom: 10px;
  }
  .score-pill,
  .intent-pill { font-size: 11.5px; padding: 5px 8px; }
  .icon-btn { width: 32px; height: 32px; border-radius: 10px; }

  .footer { padding: 24px 0 64px; }
  .footer-inner { gap: 14px; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .footer-links a { padding: 10px; font-size: 12.5px; }
}

@media (max-width: 390px) {
  .container { width: min(100% - 18px, var(--container)); }
  h1 { font-size: 27px; }
  .metric-grid,
  .strip-grid,
  .footer-links { grid-template-columns: 1fr; }
  .strip-grid { display: grid; }
  .strip-grid div { flex: initial; }
  .period-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar-right { grid-template-columns: 1fr; }
}

/* Mobile dropdown fix: touch devices must open only by explicit tap, not sticky hover/focus. */
@media (max-width: 900px) {
  .compact-nav .nav-group:hover .nav-dropdown,
  .compact-nav .nav-group:focus-within .nav-dropdown,
  .compact-nav .nav-group:focus .nav-dropdown {
    display: none !important;
  }
  .compact-nav .nav-group.is-open .nav-dropdown {
    display: grid !important;
  }
  .compact-nav .nav-group:not(.is-open) .nav-group-button::after {
    transform: rotate(45deg) translateY(-2px);
  }
}

/* Navigation dropdown stability update
   - Desktop and mobile both use click-to-open.
   - Open dropdowns stay visible until the same button, another menu, a link, ESC, or outside area is clicked.
   - This prevents menus from disappearing when the pointer slightly leaves the dropdown area. */
.compact-nav .nav-group:hover .nav-dropdown,
.compact-nav .nav-group:focus-within .nav-dropdown,
.compact-nav .nav-group:focus .nav-dropdown {
  display: none;
}
.compact-nav .nav-group.is-open .nav-dropdown {
  display: grid;
  gap: 4px;
}
.compact-nav .nav-group.is-open .nav-group-button {
  background: var(--soft);
  color: var(--black);
}
@media (min-width: 901px) {
  .compact-nav .nav-group.is-open .nav-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
  }
}
@media (max-width: 900px) {
  .compact-nav .nav-group:hover .nav-dropdown,
  .compact-nav .nav-group:focus-within .nav-dropdown,
  .compact-nav .nav-group:focus .nav-dropdown {
    display: none !important;
  }
  .compact-nav .nav-group.is-open .nav-dropdown {
    display: grid !important;
  }
}

/* Rank URL inputs: keep long Naver links readable without making mobile screens cramped */
.rank-guide-panel {
  margin: 14px 0 18px;
  padding: 16px 18px;
  border: 1px solid #dfe8e1;
  border-radius: 20px;
  background: linear-gradient(180deg, #fbfffb 0%, #f6faf7 100%);
}
.rank-guide-panel strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: -.03em;
}
.rank-guide-panel ol {
  margin: 0;
  padding-left: 20px;
  color: #374151;
  line-height: 1.75;
  font-size: 14px;
}
.rank-guide-panel li::marker {
  font-weight: 950;
  color: var(--green-2);
}
.rank-guide-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}
.rank-url-input {
  min-height: 108px !important;
  height: auto;
  white-space: normal;
  word-break: break-all;
}
@media (max-width: 640px) {
  .rank-guide-panel {
    margin: 12px 0 16px;
    padding: 14px;
    border-radius: 16px;
  }
  .rank-guide-panel strong { font-size: 14px; margin-bottom: 8px; }
  .rank-guide-panel ol { font-size: 13px; line-height: 1.65; padding-left: 18px; }
  .rank-guide-panel p { font-size: 12.8px; }
  .rank-url-input {
    min-height: 96px !important;
    font-size: 14px;
    line-height: 1.55;
  }
}

/* PC left sidebar navigation update */
@media (min-width: 1025px) {
  body {
    padding-left: 286px;
    background:
      radial-gradient(circle at 82% 6%, rgba(124, 255, 107, .16), transparent 28%),
      linear-gradient(180deg, #fff 0%, var(--bg) 38%, #fff 100%);
  }
  .site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: 286px;
    height: 100vh;
    border-right: 1px solid rgba(230,232,235,.9);
    border-bottom: 0;
    background: rgba(255,255,255,.94);
    box-shadow: 18px 0 60px rgba(16,20,26,.04);
    overflow-y: auto;
  }
  .header-inner {
    width: 100%;
    height: auto;
    min-height: 100vh;
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 20px;
  }
  .brand {
    min-height: 54px;
    padding: 8px 8px 18px;
    border-bottom: 1px solid var(--line);
  }
  .brand-mark { width: 42px; height: 42px; border-radius: 13px; }
  .brand-text { font-size: 21px; }
  .menu-button { display: none !important; }
  .compact-nav.nav,
  .nav {
    position: static !important;
    inset: auto !important;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    max-height: none;
  }
  .compact-nav .nav-main,
  .compact-nav .nav-group-button,
  .nav a {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-radius: 16px;
    background: transparent;
    color: #303741;
    font-size: 14px;
    font-weight: 900;
  }
  .compact-nav .nav-main:hover,
  .compact-nav .nav-group-button:hover,
  .nav a:hover,
  .compact-nav .nav-main[aria-current="page"] {
    background: #f2f4f6;
    color: var(--black);
  }
  .compact-nav .nav-main:first-child {
    background: var(--black);
    color: #fff;
  }
  .nav-group {
    display: grid !important;
    width: 100%;
    gap: 4px;
    position: relative;
  }
  .nav-group-button {
    border: 0;
    cursor: pointer;
  }
  .compact-nav .nav-group.is-open .nav-group-button {
    background: var(--soft);
    color: var(--black);
  }
  .compact-nav .nav-group.is-open .nav-group-button::after {
    transform: rotate(225deg) translate(-2px, -1px);
  }
  .compact-nav .nav-dropdown,
  .compact-nav .nav-group.is-open .nav-dropdown {
    position: static !important;
    right: auto !important;
    top: auto !important;
    min-width: 0;
    width: 100%;
    transform: none;
    padding: 4px 0 4px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .compact-nav .nav-dropdown {
    display: none;
  }
  .compact-nav .nav-group.is-open .nav-dropdown {
    display: grid;
    gap: 5px;
  }
  .compact-nav .nav-dropdown a {
    min-height: 42px;
    border-radius: 14px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid var(--line);
    color: #535c66;
    font-size: 13px;
    justify-content: flex-start;
  }
  .compact-nav .nav-dropdown a:hover,
  .compact-nav .nav-dropdown a[aria-current="page"] {
    border-color: #d3d8de;
    background: #fbfcfd;
    color: var(--black);
  }
  .hero,
  .sub-hero,
  .compact-hero {
    padding-top: 50px;
  }
  .container { width: min(var(--container), calc(100% - 56px)); }
}

/* Daily estimated search volume panel */
.daily-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.daily-summary-card {
  border: 1px solid var(--line);
  background: #fbfcfd;
  border-radius: 20px;
  padding: 18px;
  display: grid;
  gap: 6px;
}
.daily-summary-card span {
  color: #59636f;
  font-size: 13px;
  font-weight: 900;
}
.daily-summary-card strong {
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -.04em;
}
.daily-summary-card small {
  color: var(--muted);
  font-weight: 800;
}
.daily-chart-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 22px;
  padding: 14px;
  margin-bottom: 14px;
  overflow-x: auto;
}
.daily-chart-card canvas {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
}
.daily-table-wrap table td,
.daily-table-wrap table th { white-space: nowrap; }

@media (max-width: 1024px) {
  .site-header { position: sticky; top: 0; }
  body { padding-left: 0; }
}

@media (max-width: 720px) {
  .daily-summary-grid { grid-template-columns: 1fr; }
  .daily-summary-card { padding: 15px; border-radius: 17px; }
  .daily-summary-card strong { font-size: 24px; }
  .daily-chart-card { padding: 10px; border-radius: 18px; }
  .daily-chart-card canvas { min-width: 540px; }
}

/* Layout correction after sidebar update
   PC: keep the left navigation, but make the content area read naturally.
   This prevents the home screen from looking split/empty on wide monitors. */
@media (min-width: 1025px) {
  body {
    padding-left: 264px;
  }
  .site-header {
    width: 264px;
  }
  .header-inner {
    padding: 28px 16px;
  }
  .container {
    width: min(1120px, calc(100vw - 264px - 56px));
    margin-left: auto;
    margin-right: auto;
  }
  .hero {
    padding: 44px 0 22px;
  }
  .hero-inner {
    display: grid;
    grid-template-columns: minmax(0, .98fr) minmax(420px, .92fr);
    gap: 32px;
    align-items: center;
    min-height: auto;
  }
  .hero-copy {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    padding: 0;
  }
  .hero-copy h1 {
    max-width: 620px;
    font-size: clamp(44px, 4.2vw, 64px);
    line-height: 1.06;
    letter-spacing: -.075em;
    margin-bottom: 18px;
  }
  .hero-copy .lead {
    max-width: 620px;
    font-size: 17px;
    line-height: 1.7;
  }
  .search-card {
    width: 100%;
    max-width: 560px;
    justify-self: end;
    border-radius: 28px;
  }
  .summary-strip {
    padding: 18px 0 10px;
  }
  .strip-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .compact-feature-section {
    padding-top: 52px;
  }
  .section-head.center {
    max-width: 760px;
  }
}

@media (min-width: 1025px) and (max-width: 1320px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .search-card {
    justify-self: start;
    max-width: 760px;
  }
  .hero-copy h1,
  .hero-copy .lead {
    max-width: 780px;
  }
}

/* Final PC sidebar grouping
   PC: major tool groups stay expanded in the left sidebar.
   Only low-frequency guide pages remain collapsible. */
.sidebar-section {
  display: grid;
  gap: 8px;
}
.sidebar-section-title {
  color: #7a838d;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: -.01em;
}
.sidebar-section-links {
  display: grid;
  gap: 6px;
}
.sidebar-section-links a {
  text-decoration: none;
}

@media (min-width: 1025px) {
  .compact-nav.nav.sidebar-nav,
  .nav.sidebar-nav {
    gap: 18px;
  }
  .sidebar-section {
    padding: 0 0 14px;
    border-bottom: 1px solid rgba(232,235,238,.92);
  }
  .sidebar-section-title {
    padding: 0 10px 2px;
  }
  .sidebar-section-links a,
  .sidebar-nav .nav-dropdown a {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 14px;
    border-radius: 13px;
    color: #38414b;
    font-size: 14px;
    font-weight: 900;
    border: 1px solid transparent;
    background: transparent;
  }
  .sidebar-section-links a:hover,
  .sidebar-nav .nav-dropdown a:hover {
    background: #f3f5f7;
    color: #0b0d10;
  }
  .sidebar-nav a[aria-current="page"],
  .sidebar-nav .nav-dropdown a[aria-current="page"] {
    background: var(--black) !important;
    border-color: var(--black) !important;
    color: #fff !important;
  }
  .compact-nav .nav-main:first-child {
    background: transparent;
    color: #38414b;
  }
  .guide-group {
    padding-top: 2px;
  }
  .guide-group .nav-group-button {
    min-height: 42px;
    border-radius: 13px;
    background: #f8fafb;
    border: 1px solid var(--line);
    color: #38414b;
    padding: 0 14px;
  }
  .guide-group.is-open .nav-group-button {
    background: #eef2f4 !important;
  }
  .guide-group .nav-dropdown {
    padding-left: 0 !important;
    margin-top: 4px;
  }
  .guide-group .nav-dropdown a {
    background: #fff;
    border: 1px solid var(--line);
  }
}

@media (max-width: 1024px) {
  .sidebar-nav {
    gap: 10px;
  }
  .sidebar-section {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
  }
  .sidebar-section-title {
    padding: 0 2px;
    color: #111820;
    font-size: 13px;
  }
  .sidebar-section-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .sidebar-section-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fbfcfd;
    color: #26303a;
    font-size: 13px;
    font-weight: 950;
    text-align: center;
  }
  .sidebar-nav a[aria-current="page"] {
    background: var(--black) !important;
    color: #fff !important;
    border-color: var(--black) !important;
  }
  .compact-nav .nav-main:first-child {
    background: #fbfcfd;
    color: #26303a;
  }
  .guide-group {
    width: 100%;
  }
  .guide-group .nav-group-button {
    min-height: 48px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
    padding: 0 14px;
  }
}

@media (max-width: 420px) {
  .sidebar-section-links {
    grid-template-columns: 1fr;
  }
}

/* FINAL FIX: stable desktop sidebar width + clean URL layout polish */
@media (min-width: 1025px) {
  body {
    padding-left: 272px !important;
  }
  .site-header {
    width: 272px !important;
    min-width: 272px !important;
    max-width: 272px !important;
  }
  .site-header .container,
  .site-header .header-inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }
  .site-header .header-inner {
    min-height: 100vh !important;
    padding: 26px 16px !important;
  }
  .site-header .brand {
    width: 100% !important;
  }
  .site-header .nav,
  .site-header .sidebar-nav {
    width: 100% !important;
    max-width: 100% !important;
  }
  .sidebar-section-links a,
  .sidebar-nav .nav-dropdown a,
  .guide-group .nav-group-button {
    width: 100% !important;
  }
  main, .footer {
    width: 100%;
  }
  .container {
    width: min(1180px, calc(100vw - 272px - 64px)) !important;
    max-width: 1180px !important;
  }
  .hero-inner {
    grid-template-columns: minmax(0, .95fr) minmax(420px, .9fr) !important;
    gap: 34px !important;
  }
  .search-card {
    justify-self: end;
    max-width: 560px;
  }
}

@media (min-width: 1025px) and (max-width: 1320px) {
  .hero-inner {
    grid-template-columns: 1fr !important;
  }
  .search-card {
    justify-self: start;
    max-width: 760px;
  }
}

/* SIDEBAR FINAL LOCK v2
   The sidebar uses a fixed 260px rail on desktop. Main/footer are offset with margin,
   not body padding, to prevent the sidebar from taking half of the screen on local files
   or cached layouts. */
@media (min-width: 1025px) {
  html, body { overflow-x: hidden !important; }
  body { padding-left: 0 !important; }
  .site-header {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    right: auto !important;
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    height: 100vh !important;
    z-index: 50 !important;
    border-right: 1px solid rgba(230,232,235,.9) !important;
    border-bottom: 0 !important;
    background: rgba(255,255,255,.96) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-shadow: 16px 0 48px rgba(16,20,26,.035) !important;
  }
  .site-header .container,
  .site-header .header-inner {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  .site-header .header-inner {
    min-height: 100vh !important;
    height: auto !important;
    padding: 24px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 18px !important;
  }
  .site-header .brand {
    width: 100% !important;
    min-height: 52px !important;
    padding: 6px 8px 18px !important;
    border-bottom: 1px solid var(--line) !important;
  }
  .site-header .brand-mark { width: 40px !important; height: 40px !important; }
  .site-header .brand-text { font-size: 20px !important; }
  .site-header .menu-button { display: none !important; }
  .site-header .sidebar-nav {
    display: flex !important;
    position: static !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 16px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
  }
  .sidebar-section {
    width: 100% !important;
    display: grid !important;
    gap: 7px !important;
    padding: 0 0 13px !important;
    border-bottom: 1px solid rgba(232,235,238,.92) !important;
  }
  .sidebar-section-title {
    padding: 0 9px 1px !important;
    color: #7a838d !important;
    font-size: 12px !important;
    font-weight: 950 !important;
  }
  .sidebar-section-links {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 5px !important;
    width: 100% !important;
  }
  .sidebar-section-links a,
  .guide-group .nav-group-button,
  .guide-group .nav-dropdown a {
    width: 100% !important;
    min-height: 38px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 12px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    text-decoration: none !important;
  }
  .sidebar-section-links a,
  .guide-group .nav-dropdown a {
    color: #38414b !important;
    border: 1px solid transparent !important;
    background: transparent !important;
  }
  .sidebar-section-links a:hover,
  .guide-group .nav-dropdown a:hover {
    background: #f3f5f7 !important;
    color: #0b0d10 !important;
  }
  .sidebar-nav a[aria-current="page"],
  .sidebar-nav .nav-dropdown a[aria-current="page"] {
    background: var(--black) !important;
    border-color: var(--black) !important;
    color: #fff !important;
  }
  .guide-group { width: 100% !important; }
  .guide-group .nav-group-button {
    background: #f8fafb !important;
    border: 1px solid var(--line) !important;
    color: #38414b !important;
    cursor: pointer !important;
  }
  .guide-group .nav-dropdown {
    display: none !important;
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 5px 0 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .guide-group.is-open .nav-dropdown { display: grid !important; gap: 5px !important; }
  .guide-group .nav-dropdown a { border: 1px solid var(--line) !important; background: #fff !important; }

  main,
  .footer {
    margin-left: 260px !important;
    width: calc(100% - 260px) !important;
    max-width: calc(100% - 260px) !important;
  }
  main .container,
  .footer .container {
    width: min(1180px, calc(100% - 48px)) !important;
    max-width: 1180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .hero,
  .sub-hero,
  .compact-hero { padding-top: 48px !important; }
  .hero-inner {
    grid-template-columns: minmax(0, .98fr) minmax(390px, .82fr) !important;
    gap: 30px !important;
    align-items: center !important;
  }
  .search-card { max-width: 540px !important; justify-self: end !important; }
}

@media (min-width: 1025px) and (max-width: 1360px) {
  .hero-inner { grid-template-columns: 1fr !important; }
  .search-card { justify-self: start !important; max-width: 720px !important; }
}

/* MOBILE MENU COLLAPSE + SEARCH RESULT UX FIX
   On mobile, tool categories start folded so the menu stays compact.
   Users can tap a category title to open it, and tap again to close it. */
@media (max-width: 1024px) {
  .sidebar-section {
    padding: 0 !important;
    overflow: hidden;
  }
  .sidebar-section-title {
    min-height: 48px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px !important;
    cursor: pointer;
    user-select: none;
    color: #111820 !important;
    font-size: 14px !important;
    font-weight: 950 !important;
  }
  .sidebar-section-title::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    opacity: .7;
    transition: transform .16s ease;
  }
  .sidebar-section.is-open .sidebar-section-title::after {
    transform: rotate(225deg) translate(-2px, -1px);
  }
  .sidebar-section-links {
    display: none !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 0 12px 12px !important;
  }
  .sidebar-section.is-open .sidebar-section-links {
    display: grid !important;
  }
  .sidebar-section-links a {
    min-height: 46px !important;
    font-size: 14px !important;
  }
  #resultArea {
    scroll-margin-top: 88px;
  }
}

@media (min-width: 1025px) {
  .sidebar-section-links {
    display: grid !important;
  }
}

/* Daily search volume popup */
.metric.daily-metric { position: relative; }
.metric-link {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}
.metric-link:hover { background: var(--black); color: #fff; border-color: var(--black); }
.panel-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
body.modal-open { overflow: hidden; }
.daily-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  background: rgba(11, 13, 16, .58);
  backdrop-filter: blur(3px);
}
.daily-modal {
  width: min(520px, calc(100vw - 34px));
  max-height: min(82vh, 760px);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .28);
}
.daily-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: #707780;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}
.daily-modal-close:hover { color: var(--black); }
.daily-modal-head {
  padding: 28px 32px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.daily-modal-head h3 { margin: 2px 0 8px; font-size: 24px; }
.daily-modal-head p { margin: 0; color: var(--muted); line-height: 1.6; }
.daily-modal-kicker { color: var(--green-2) !important; font-weight: 950; }
.daily-modal-download { white-space: nowrap; margin-right: 34px; }
.daily-modal-table-wrap { overflow: auto; padding: 0 32px 16px; }
.daily-modal-table { width: 100%; border-collapse: collapse; }
.daily-modal-table th,
.daily-modal-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 15px;
}
.daily-modal-table th { color: var(--muted); font-weight: 950; }
.daily-modal-table td:last-child,
.daily-modal-table th:last-child { text-align: right; }
.daily-modal-note { margin: 0; padding: 14px 32px 24px; color: var(--muted); font-size: 13px; line-height: 1.6; }
@media (max-width: 640px) {
  .daily-modal-backdrop { align-items: flex-end; padding: 0; }
  .daily-modal { width: 100%; max-height: 88vh; border-radius: 24px 24px 0 0; }
  .daily-modal-head { padding: 24px 20px 14px; flex-direction: column; }
  .daily-modal-download { width: calc(100% - 46px); margin-right: 0; }
  .daily-modal-table-wrap { padding: 0 20px 12px; }
  .daily-modal-table th,
  .daily-modal-table td { padding: 13px 6px; font-size: 14px; }
  .daily-modal-note { padding: 12px 20px 20px; }
  .panel-actions { width: 100%; justify-content: flex-start; }
}


/* 2026-06: homepage/tool UX overhaul */
@media (min-width: 1025px) {
  :root { --sidebar-w: 260px; }
  body { overflow-x: hidden; }
  .site-header { width: var(--sidebar-w) !important; max-width: var(--sidebar-w) !important; min-width: var(--sidebar-w) !important; }
  main, .footer { margin-left: var(--sidebar-w) !important; width: calc(100% - var(--sidebar-w)) !important; max-width: none !important; }
  .site-header .nav, .site-header .sidebar-nav { width: 100% !important; }
  .sidebar-section-links a, .sidebar-nav .nav-dropdown a { width: 100% !important; box-sizing: border-box; }
}
.home-page .home-intro { padding: 86px 0 72px; background: radial-gradient(circle at 86% 14%, rgba(117,255,98,.18), transparent 34%), linear-gradient(135deg, #fff 0%, #f7fff6 100%); border-bottom: 1px solid var(--line); }
.home-intro-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 42px; align-items: center; }
.home-intro-copy h1 { margin: 0; font-size: clamp(44px, 5vw, 76px); line-height: .98; letter-spacing: -.08em; }
.home-intro-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.home-about-card { background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 28px; padding: 30px; box-shadow: 0 20px 50px rgba(16,20,26,.08); }
.home-about-card strong { display: block; font-size: 20px; margin-bottom: 14px; }
.home-about-card ul { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.9; }
.tool-focus-section { padding-top: 72px; padding-bottom: 34px; }
.tool-focus-grid { display: grid; grid-template-columns: minmax(280px, .78fr) minmax(360px, 1.22fr); gap: 28px; align-items: stretch; }
.tool-focus-copy { background: #fff; border: 1px solid var(--line); border-radius: 26px; padding: 30px; box-shadow: 0 14px 42px rgba(16,20,26,.05); }
.tool-focus-copy h2 { margin: 0 0 12px; font-size: clamp(30px, 3vw, 48px); letter-spacing: -.06em; line-height: 1.08; }
.tool-tip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tool-tip-list span { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 850; background: var(--soft); color: var(--muted); }
.search-card-wide { min-height: auto; align-self: stretch; display: flex; align-items: center; }
.search-card-wide .search-form { width: 100%; }
.result-section-close { padding-top: 20px; }
.split-guide-section { padding-top: 64px; }
.feature-link-grid.two-only { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 900px; margin: 0 auto; }
@media (max-width: 1024px) {
  .home-page .home-intro { padding: 34px 0 24px; }
  .home-intro-inner, .tool-focus-grid { grid-template-columns: 1fr; gap: 16px; }
  .home-intro-copy h1 { font-size: clamp(36px, 10vw, 56px); }
  .home-intro-actions .link-button { width: 100%; justify-content: center; }
  .home-about-card, .tool-focus-copy { padding: 22px; border-radius: 22px; }
  .tool-focus-section { padding-top: 34px; }
  .feature-link-grid.two-only { grid-template-columns: 1fr; }
  .search-line { gap: 10px; }
  .search-line input, .search-line .btn-primary { min-height: 56px; }
}
@media (max-width: 640px) {
  .search-line { display: grid; grid-template-columns: 1fr; }
  .quick-row { gap: 8px; }
  .quick-row button { width: 100%; justify-content: flex-start; }
}


/* HOME/SEARCH SEPARATION FINAL UPDATE */
@media (min-width: 1025px) {
  :root { --sidebar-w: 260px; }
  .site-header { width: var(--sidebar-w) !important; min-width: var(--sidebar-w) !important; max-width: var(--sidebar-w) !important; }
  main, .footer { margin-left: var(--sidebar-w) !important; width: calc(100% - var(--sidebar-w)) !important; max-width: calc(100% - var(--sidebar-w)) !important; }
  .site-header .header-inner, .site-header .container, .site-header .nav { max-width: 100% !important; min-width: 0 !important; }
}
.intro-only-page .home-intro { padding: 82px 0 72px; }
.intro-only-page .feature-link-card { min-height: 132px; }
.intro-only-page .feature-link-card strong { font-size: 21px; }
.intro-only-page .feature-link-card span { font-size: 15px; line-height: 1.65; }
.search-page .tool-search-hero { padding: 62px 0 34px; background: radial-gradient(circle at 84% 12%, rgba(117,255,98,.18), transparent 34%), linear-gradient(135deg, #fff 0%, #f7fff6 100%); border-bottom: 1px solid var(--line); }
.search-only-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(380px, .9fr); gap: 34px; align-items: center; }
.search-page .hero-copy h1 { margin: 0; font-size: clamp(42px, 4.5vw, 70px); letter-spacing: -.08em; line-height: 1; }

@media (max-width: 1024px) {
  .intro-only-page .home-intro { padding: 34px 0 28px; }
  .search-only-grid { grid-template-columns: 1fr; gap: 18px; }
  .search-page .tool-search-hero { padding: 28px 0 18px; }
}

/* Home intro copy update */
.intro-only-page .home-intro-inner {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1120px;
}
.intro-only-page .home-intro-copy {
  max-width: 860px;
}
.intro-only-page .home-about-card-below {
  max-width: 720px;
  margin-top: 30px;
}
@media (max-width: 760px) {
  .intro-only-page .home-about-card-below {
    max-width: none;
    margin-top: 18px;
  }
}


/* HOME CENTER SPACING FIX */
.nowrap { white-space: nowrap; }
.intro-only-page .home-intro {
  padding: 92px 0 86px;
}
.intro-only-page .home-intro-inner {
  max-width: 1120px;
  margin: 0 auto;
  justify-items: center;
  text-align: center;
}
.intro-only-page .home-intro-copy {
  max-width: 1040px;
  margin: 0 auto;
}
.intro-only-page .home-intro-copy .eyebrow {
  margin-bottom: 20px;
}
.intro-only-page .home-intro-copy h1 {
  max-width: 1040px;
  margin: 0 auto;
  line-height: 1.12;
  letter-spacing: -0.075em;
  text-wrap: balance;
}
.intro-only-page .home-intro-copy .lead {
  max-width: 920px;
  margin: 28px auto 0;
  line-height: 1.84;
  text-align: center;
  word-break: keep-all;
}
.intro-only-page .home-about-card-below {
  max-width: 760px;
  width: 100%;
  margin: 58px auto 0;
  text-align: left;
}
@media (max-width: 1024px) {
  .intro-only-page .home-intro {
    padding: 52px 0 46px;
  }
  .intro-only-page .home-intro-copy h1 {
    font-size: clamp(38px, 8.5vw, 58px);
    line-height: 1.08;
  }
  .intro-only-page .home-intro-copy .lead {
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.76;
  }
  .intro-only-page .home-about-card-below {
    margin-top: 34px;
  }
}
@media (max-width: 640px) {
  .intro-only-page .home-intro-inner {
    text-align: left;
    justify-items: stretch;
  }
  .intro-only-page .home-intro-copy,
  .intro-only-page .home-intro-copy .lead {
    text-align: left;
  }
  .intro-only-page .home-intro-copy h1 {
    margin-left: 0;
    margin-right: 0;
    font-size: clamp(34px, 11vw, 48px);
    letter-spacing: -0.07em;
  }
  .nowrap { white-space: normal; }
}

/* 검색량 확인 페이지: 설명·예시·검색창 순서 정리 */
.search-form-stacked {
  display: grid;
  gap: 16px;
}
.search-form-stacked .search-form-intro label {
  margin-bottom: 6px;
}
.search-form-stacked .search-form-intro .field-help {
  margin: 0;
}
.search-form-stacked .quick-box {
  margin-top: 0;
}
.search-form-stacked .search-line-stacked {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.search-form-stacked .search-line-stacked .btn-primary {
  width: 100%;
  min-height: 56px;
}
.search-form-stacked .search-bottom-help {
  margin: -4px 0 0;
}
@media (min-width: 1025px) {
  .search-form-stacked .quick-row button {
    flex: 0 0 auto;
  }
}

/* 검색량 확인 페이지: 설명은 위, 검색 박스는 아래로 정리 */
.search-page .tool-search-hero {
  padding: 70px 0 52px;
}
.search-only-grid {
  grid-template-columns: 1fr !important;
  max-width: 1040px;
  margin: 0 auto;
  gap: 34px;
  justify-items: center;
}
.search-page .hero-copy {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}
.search-page .hero-copy h1 {
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.06;
  text-wrap: balance;
}
.search-page .hero-copy .lead {
  max-width: 760px;
  margin: 22px auto 0;
  line-height: 1.78;
  word-break: keep-all;
}
.search-page .hero-copy .tool-tip-list {
  justify-content: center;
  margin-top: 24px;
}
.search-page .search-card-wide {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 30px;
}
.search-page .search-form-stacked {
  gap: 18px;
}
.search-page .search-form-stacked .search-form-intro {
  text-align: center;
}
.search-page .search-form-stacked .quick-title {
  text-align: center;
}
.search-page .search-form-stacked .quick-row {
  justify-content: center;
}
@media (max-width: 760px) {
  .search-page .tool-search-hero {
    padding: 38px 0 24px;
  }
  .search-page .hero-copy,
  .search-page .hero-copy .lead,
  .search-page .search-form-stacked .search-form-intro,
  .search-page .search-form-stacked .quick-title {
    text-align: left;
  }
  .search-page .hero-copy h1 {
    margin-left: 0;
    margin-right: 0;
  }
  .search-page .hero-copy .lead {
    margin-left: 0;
    margin-right: 0;
  }
  .search-page .hero-copy .tool-tip-list,
  .search-page .search-form-stacked .quick-row {
    justify-content: flex-start;
  }
  .search-page .search-card-wide {
    width: 100%;
    padding: 22px;
  }
}

/* Search page wide horizontal search panel update */
@media (min-width: 761px) {
  .search-page .search-card-wide {
    width: min(100%, 1080px) !important;
    max-width: 1080px !important;
    padding: 26px 30px !important;
    border-radius: 30px !important;
  }
  .search-page .search-form-stacked {
    padding: 28px 32px !important;
    border-radius: 24px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
  }
  .search-page .search-form-stacked .search-form-intro,
  .search-page .search-form-stacked .quick-title {
    text-align: left !important;
  }
  .search-page .search-form-stacked .search-form-intro label {
    margin-bottom: 6px !important;
  }
  .search-page .search-form-stacked .search-form-intro .field-help {
    margin: 0 !important;
  }
  .search-page .search-form-stacked .quick-box {
    margin: 0 !important;
  }
  .search-page .search-form-stacked .quick-row {
    justify-content: flex-start !important;
    gap: 10px !important;
  }
  .search-page .search-form-stacked .quick-row button {
    white-space: nowrap !important;
  }
  .search-page .search-form-stacked .search-line-stacked {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 190px !important;
    gap: 12px !important;
    align-items: center !important;
  }
  .search-page .search-form-stacked .search-line-stacked input {
    height: 62px !important;
    border-radius: 20px !important;
  }
  .search-page .search-form-stacked .search-line-stacked .btn-primary {
    width: 100% !important;
    min-height: 62px !important;
    border-radius: 20px !important;
  }
  .search-page .search-form-stacked .search-bottom-help {
    text-align: left !important;
    margin: -4px 0 0 !important;
  }
}

@media (min-width: 1100px) {
  .search-page .search-card-wide {
    width: min(100%, 1120px) !important;
    max-width: 1120px !important;
  }
}


/* Popular page hero cleanup: keep the section simple and centered. */
.popular-hero .popular-hero-inner {
  display: block !important;
  max-width: 980px;
  text-align: center;
}
.popular-hero h1 {
  margin-left: auto;
  margin-right: auto;
  line-height: 1.04;
}
.popular-hero .lead {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.78;
}
@media (max-width: 720px) {
  .popular-hero .popular-hero-inner { text-align: left; }
  .popular-hero .lead { margin-left: 0; margin-right: 0; }
}


/* Tool pages cleanup: remove right-side helper cards and center the main area. */
@media (min-width: 761px) {
  .sub-hero.compact-hero:not(.tool-search-hero) {
    padding: 72px 0 46px;
  }
  .sub-hero.compact-hero:not(.tool-search-hero) .sub-hero-inner {
    display: block !important;
    max-width: 1040px;
    margin: 0 auto;
    text-align: center;
  }
  .sub-hero.compact-hero:not(.tool-search-hero) .sub-hero-inner > div:first-child {
    max-width: 940px;
    margin: 0 auto;
  }
  .sub-hero.compact-hero:not(.tool-search-hero) h1 {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.05;
    text-wrap: balance;
  }
  .sub-hero.compact-hero:not(.tool-search-hero) .lead {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.78;
    word-break: keep-all;
  }
  .sub-hero.compact-hero:not(.tool-search-hero) .sub-hero-card {
    display: none !important;
  }
  .tool-page .tool-layout {
    grid-template-columns: 1fr !important;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
    gap: 18px;
  }
  .tool-page .rank-layout {
    max-width: 980px;
  }
  .tool-page .tool-layout > .soft-card {
    display: none !important;
  }
  .tool-page .tool-layout > .tool-card {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .sub-hero.compact-hero:not(.tool-search-hero) .sub-hero-card {
    display: none !important;
  }
  .tool-page .tool-layout {
    grid-template-columns: 1fr !important;
  }
  .tool-page .tool-layout > .soft-card {
    display: none !important;
  }
}

/* 일괄 분석 페이지 문구 정리 */
@media (min-width: 900px) {
  .bulk-lead-oneline {
    white-space: nowrap;
  }
}


.progress-indeterminate span { width: 42%; min-width: 120px; animation: kmProgressIndeterminate 1.15s infinite ease-in-out; }
.loading-badge { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 14px; border-radius: 999px; background: #07100b; color: #6fff69; font-weight: 900; margin-bottom: 14px; }
.loading-help { margin-top: 12px; font-size: 14px; }
@keyframes kmProgressIndeterminate {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(250%); }
}

.api-error-message {
  white-space: pre-line;
}

/* MOBILE CLEAN LAYOUT FINAL
   목적: 모바일 화면에서 긴 문구/URL/결과 카드/테이블이 화면 밖으로 밀리는 문제 방지.
   PC 사이드바 레이아웃은 건드리지 않고 1024px 이하에서만 안전하게 재정렬합니다. */
@media (max-width: 1024px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body {
    padding-left: 0 !important;
  }

  main,
  .footer {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  main .container,
  .footer .container,
  .container {
    width: min(100% - 24px, var(--container)) !important;
    max-width: calc(100% - 24px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .site-header {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  .site-header .container,
  .site-header .header-inner {
    max-width: calc(100% - 24px) !important;
    min-width: 0 !important;
  }

  .site-header .header-inner {
    min-height: 0 !important;
    height: 58px !important;
    padding: 0 !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .site-header .brand {
    min-width: 0 !important;
    max-width: calc(100% - 86px) !important;
    border-bottom: 0 !important;
    padding: 0 !important;
  }

  .brand-text {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .menu-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
  }

  .nav,
  .compact-nav.nav,
  .site-header .sidebar-nav {
    position: fixed !important;
    top: 66px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    min-width: 0 !important;
    max-height: calc(100vh - 86px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    display: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
    border: 1px solid var(--line) !important;
    border-radius: 22px !important;
    background: #fff !important;
    box-shadow: 0 28px 80px rgba(11,13,16,.22) !important;
  }

  .nav.open,
  .compact-nav.nav.open,
  .site-header .sidebar-nav.open {
    display: flex !important;
  }

  .sidebar-section,
  .nav-group,
  .guide-group,
  .sidebar-section-links,
  .nav-dropdown {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .sidebar-section-links {
    grid-template-columns: 1fr !important;
  }

  .nav-dropdown {
    position: static !important;
    box-shadow: none !important;
  }

  .sub-hero,
  .hero,
  .compact-hero,
  .section,
  .tool-page,
  .result-block,
  .dashboard,
  .panel,
  .tool-card,
  .rank-result-card,
  .rank-main-card,
  .rank-info-card,
  .notice-card {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .hero-inner,
  .sub-hero-inner,
  .search-only-grid,
  .home-intro-inner,
  .tool-focus-grid,
  .tool-layout,
  .rank-layout,
  .rank-result-grid,
  .metric-grid,
  .strip-grid,
  .popular-grid,
  .faq-grid,
  .feature-link-grid,
  .daily-summary-grid,
  .saved-page-grid,
  .month-grid,
  .mini-card-grid {
    grid-template-columns: 1fr !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .search-card,
  .search-card-wide,
  .search-form,
  .search-form-stacked,
  .tool-card,
  .panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .search-line,
  .search-line-stacked,
  .search-page .search-form-stacked .search-line-stacked {
    grid-template-columns: 1fr !important;
  }

  .search-line input,
  .search-line-stacked input,
  .wide-input,
  textarea,
  select,
  button {
    max-width: 100% !important;
  }

  .btn-primary,
  .btn-secondary,
  .small-btn,
  .link-button {
    white-space: normal !important;
  }

  .tool-actions,
  .panel-actions,
  .toolbar,
  .toolbar-left,
  .toolbar-right,
  .panel-head,
  .tool-result-head {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .tool-result-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    align-items: stretch !important;
  }

  .tool-result-head .tool-actions,
  .tool-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
  }

  .tool-result-head .btn-primary,
  .tool-result-head .btn-secondary,
  .tool-actions .btn-primary,
  .tool-actions .btn-secondary,
  .tool-actions .small-btn,
  .tool-actions .link-button {
    width: 100% !important;
    justify-content: center !important;
  }

  h1,
  h2,
  h3,
  p,
  li,
  strong,
  span,
  small,
  a,
  label,
  input,
  textarea,
  button {
    max-width: 100%;
  }

  h1,
  h2,
  h3,
  .tool-result-head h2,
  .rank-result-card h2,
  .overview-card h2 {
    word-break: keep-all !important;
    overflow-wrap: anywhere !important;
    text-wrap: auto;
  }

  .tool-result-head h2,
  .rank-result-card h2 {
    font-size: clamp(24px, 7.4vw, 34px) !important;
    line-height: 1.22 !important;
    letter-spacing: -.055em !important;
  }

  .rank-main-card strong {
    font-size: clamp(40px, 13vw, 56px) !important;
    line-height: 1.05 !important;
    word-break: keep-all !important;
  }

  .rank-info-card strong,
  .id-merge-row strong,
  .product-id-meta span,
  .rank-list-item strong,
  .rank-list-item p,
  .place-found-card p,
  .product-found-card h3,
  .place-found-card h3,
  .muted-text,
  .notice-card p,
  .api-error-message {
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .rank-list,
  .rank-list-item {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .rank-list-item {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    align-items: start !important;
  }

  .rank-list-item > div,
  .product-found-card > div,
  .place-found-card,
  .rank-info-card,
  .rank-main-card {
    min-width: 0 !important;
  }

  .rank-badge {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
  }

  .product-found-card {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .product-found-card img {
    width: 72px !important;
    height: 72px !important;
    max-width: 72px !important;
    object-fit: cover !important;
  }

  .table-wrap,
  .daily-chart-card,
  .daily-modal-table-wrap {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  table {
    max-width: 100% !important;
  }

  img,
  svg,
  canvas,
  video {
    max-width: 100% !important;
  }

  .toast {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    transform: translateY(30px) !important;
    border-radius: 16px !important;
    white-space: normal !important;
  }

  .toast.show {
    transform: translateY(0) !important;
  }
}

@media (max-width: 640px) {
  main .container,
  .footer .container,
  .container,
  .site-header .container,
  .site-header .header-inner {
    width: min(100% - 20px, var(--container)) !important;
    max-width: calc(100% - 20px) !important;
  }

  .sub-hero.compact-hero:not(.tool-search-hero),
  .search-page .tool-search-hero,
  .home-page .home-intro,
  .intro-only-page .home-intro {
    padding-top: 24px !important;
    padding-bottom: 18px !important;
  }

  .section,
  .tool-page {
    padding-top: 28px !important;
    padding-bottom: 30px !important;
  }

  .tool-card,
  .search-card,
  .search-form,
  .search-page .search-card-wide,
  .panel,
  .rank-main-card,
  .rank-info-card,
  .notice-card {
    padding: 14px !important;
    border-radius: 18px !important;
  }

  .rank-guide-panel {
    padding: 13px !important;
    border-radius: 16px !important;
  }

  .wide-input,
  .search-line input,
  .search-line-stacked input {
    height: 50px !important;
    font-size: 15px !important;
  }

  .rank-url-input {
    min-height: 92px !important;
    font-size: 13.5px !important;
    line-height: 1.55 !important;
  }

  .quick-row button {
    width: 100% !important;
  }

  .metric-grid,
  .strip-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .metric,
  .strip-grid div {
    width: 100% !important;
    min-height: auto !important;
  }

  .tabs {
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  .product-found-card {
    grid-template-columns: 1fr !important;
  }

  .product-found-card img {
    width: 100% !important;
    height: 170px !important;
    max-width: 100% !important;
  }

  .daily-modal {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 380px) {
  main .container,
  .footer .container,
  .container,
  .site-header .container,
  .site-header .header-inner {
    width: min(100% - 16px, var(--container)) !important;
    max-width: calc(100% - 16px) !important;
  }

  h1 { font-size: 26px !important; }
  h2 { font-size: 23px !important; }
  .tool-result-head h2,
  .rank-result-card h2 { font-size: 23px !important; }
  .rank-main-card strong { font-size: 38px !important; }
}

/* MOBILE SEARCH CARD OVERFLOW FIX 20260618
   검색량 확인 카드 안의 추천 키워드/검색창이 모바일 화면 밖으로 밀리는 문제 보정 */
@media (max-width: 760px) {
  html,
  body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .search-page,
  .search-page main,
  .search-page .tool-search-hero,
  .search-page .section,
  .search-page .container,
  .search-page .search-only-grid,
  .search-page .search-card,
  .search-page .search-card-wide,
  .search-page .search-form,
  .search-page .search-form-stacked {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  .search-page .container {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .search-page .tool-search-hero {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .search-page .search-only-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: stretch !important;
    gap: 16px !important;
  }

  .search-page .search-card-wide {
    margin: 0 !important;
    padding: 8px !important;
    border-radius: 20px !important;
    justify-self: stretch !important;
  }

  .search-page .search-form-stacked {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    padding: 14px !important;
    border-radius: 18px !important;
  }

  .search-page .search-form-stacked > *,
  .search-page .quick-box,
  .search-page .quick-title,
  .search-page .quick-row,
  .search-page .search-line,
  .search-page .search-line-stacked,
  .search-page .search-bottom-help {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .search-page .quick-box {
    overflow: hidden !important;
  }

  .search-page .quick-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 0 6px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin;
  }

  .search-page .quick-row button {
    width: auto !important;
    max-width: calc(100vw - 74px) !important;
    min-width: max-content !important;
    flex: 0 0 auto !important;
    justify-content: flex-start !important;
    white-space: nowrap !important;
  }

  .search-page .search-line-stacked {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .search-page .search-line-stacked input,
  .search-page .search-line-stacked .btn-primary {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .search-page .field-help,
  .search-page .search-bottom-help {
    overflow-wrap: anywhere !important;
    word-break: keep-all !important;
  }
}

@media (max-width: 420px) {
  .search-page .container {
    width: calc(100vw - 18px) !important;
    max-width: calc(100vw - 18px) !important;
  }

  .search-page .search-card-wide {
    padding: 6px !important;
  }

  .search-page .search-form-stacked {
    padding: 12px !important;
  }

  .search-page .quick-row button {
    max-width: calc(100vw - 58px) !important;
  }
}
