.ctb { max-width: 760px; }

.ctb-section {
  margin-bottom: 22px; padding: 14px; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 8px;
}
.ctb-section-title {
  margin: 0 0 12px; font-size: 15px; font-weight: 700; color: #27331f;
  display: flex; align-items: center; gap: 8px;
}
.ctb-tag {
  font-size: 11.5px; font-weight: 700; color: #19616a; background: #fff; border: 1px solid #d9e0d4;
  border-radius: 4px; padding: 2px 6px;
}

.ctb-coord-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.ctb-coord-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: #27331f; }
.ctb-coord-row input {
  padding: 9px 11px; font-size: 14.5px; border: 1px solid #d9e0d4; border-radius: 6px; width: 100%; box-sizing: border-box;
}
.ctb-coord-row input:focus { outline: 2px solid #19616a; outline-offset: 1px; }

.ctb-btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.ctb-copy-btn {
  padding: 7px 12px; font-size: 12.5px; font-weight: 700; border: 1px solid #d9e0d4;
  border-radius: 6px; background: #fff; color: #19616a; cursor: pointer;
}
.ctb-copy-btn:hover { border-color: #19616a; }
.ctb-copy-small { padding: 5px 10px; font-size: 11.5px; align-self: center; }

.ctb-result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 8px; }
.ctb-result-grid-wide { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ctb-result-cell {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 10px 12px;
  background: #fff; border: 1px solid #d9e0d4; border-radius: 6px;
}
.ctb-result-label { font-size: 12px; font-weight: 700; color: #5b6b56; }
.ctb-formula { font-weight: 400; color: #5b6b56; }
.ctb-result-value { font-family: ui-monospace, monospace; font-size: 15px; font-weight: 700; color: #19616a; }

.ctb-note-inline { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: #5b6b56; }
.ctb-note-inline code { font-family: ui-monospace, monospace; background: #fff; border: 1px solid #d9e0d4; border-radius: 4px; padding: 1px 4px; }

.ctb-two-point-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.ctb-point-block { display: flex; flex-direction: column; gap: 6px; }
.ctb-point-label { font-size: 12.5px; font-weight: 700; color: #27331f; }

.ctb-compass-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.ctb-compass {
  position: relative; width: 84px; height: 84px; border-radius: 50%; background: #fff;
  border: 1px solid #d9e0d4; flex-shrink: 0;
}
.ctb-compass span {
  position: absolute; font-size: 11px; font-weight: 700; color: #5b6b56;
}
.ctb-compass-n { top: 4px; left: 50%; transform: translateX(-50%); }
.ctb-compass-s { bottom: 4px; left: 50%; transform: translateX(-50%); }
.ctb-compass-e { right: 6px; top: 50%; transform: translateY(-50%); }
.ctb-compass-w { left: 6px; top: 50%; transform: translateY(-50%); }
.ctb-compass-arrow {
  position: absolute; top: 50%; left: 50%; width: 3px; height: 32px; background: #19616a;
  transform-origin: 50% 0; margin-left: -1.5px; border-radius: 2px; transition: transform 0.15s ease;
}
.ctb-compass-arrow::after {
  content: ""; position: absolute; top: -2px; left: 50%; width: 0; height: 0;
  transform: translateX(-50%);
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 9px solid #19616a;
}
.ctb-heading-text { margin: 0; font-size: 13.5px; font-weight: 700; color: #27331f; }
.ctb-heading-16pt { margin: 4px 0 0; font-size: 12px; color: #5b6b56; }
.ctb-heading-16pt:empty { display: none; }

.ctb-ref-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.ctb-ref-table th, .ctb-ref-table td { text-align: left; padding: 9px 10px; border: 1px solid #d9e0d4; }
.ctb-ref-table th { background: #f3f4f8; color: #27331f; font-weight: 700; }
.ctb-ref-table td { color: #27331f; }
.ctb-ref-table tbody tr:nth-child(even) td { background: #f3f4f8; }

.ctb-prose { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.ctb-prose h3 { margin: 14px 0 2px; font-size: 15px; font-weight: 700; color: #27331f; }
.ctb-prose h3:first-child { margin-top: 0; }
.ctb-prose p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.55; color: #27331f; }
.ctb-prose code { font-family: ui-monospace, monospace; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 4px; padding: 1px 4px; }

.ctb-note { margin-top: 16px; font-size: 13px; color: #5b6b56; }

@media (max-width: 640px) {
  .ctb-two-point-row { grid-template-columns: 1fr; }
  .ctb-result-grid { grid-template-columns: 1fr; }
}
