:root {
  --compass-shell-blue: #1764f5;
  --compass-shell-navy: #10213f;
  --compass-shell-line: #dce4ef;
}

body.compass-tool-page {
  padding-top: 84px !important;
  overflow-x: hidden !important;
}

.compass-tool-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 9999;
  height: 68px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--compass-shell-line);
  backdrop-filter: blur(14px);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.compass-tool-header * { box-sizing: border-box; }
.compass-tool-header__inner {
  width: min(calc(100% - 32px), 1200px);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.compass-tool-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--compass-shell-navy);
  text-decoration: none;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.compass-tool-brand svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--compass-shell-blue);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.compass-tool-title {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: #60708a;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compass-tool-actions { display: flex; align-items: center; gap: 8px; }
.compass-tool-actions a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid var(--compass-shell-line);
  border-radius: 10px;
  background: white;
  color: #32445f;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.compass-tool-actions a:hover { color: var(--compass-shell-blue); border-color: #b6cced; }
.compass-tool-actions svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

body.compass-tool-page .flex,
body.compass-tool-page .grid,
body.compass-tool-page .flex-1 { min-width: 0; }
body.compass-tool-page #pdf-export-container { max-width: 100%; overflow-x: auto; }

@media (max-width: 640px) {
  body.compass-tool-page { padding-top: 76px !important; }
  body.compass-tool-page h1 {
    font-size: 28px !important;
    line-height: 1.3 !important;
    word-break: keep-all;
    overflow-wrap: break-word;
  }
  .compass-tool-header { height: 60px; }
  .compass-tool-header__inner { width: calc(100% - 24px); gap: 10px; }
  .compass-tool-brand { font-size: 15px; }
  .compass-tool-brand svg { width: 29px; height: 29px; }
  .compass-tool-title { display: none; }
  .compass-tool-actions a { width: 42px; min-height: 42px; padding: 0; }
  .compass-tool-actions a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  body.compass-tool-page input,
  body.compass-tool-page textarea,
  body.compass-tool-page select,
  body.compass-tool-page button { max-width: 100%; }
  body.compass-tool-page #auth-section .flex > input { min-width: 0 !important; }
  body.compass-tool-page #auth-section .flex > button { flex: 0 0 auto; }
  body.compass-tool-page .pdf-page { max-width: none; }
}

@media print {
  body.compass-tool-page { padding-top: 0 !important; }
  .compass-tool-header { display: none !important; }
}
