body {
  font-family: 'Segoe UI', 'Microsoft JhengHei', Arial, sans-serif;
  background: #f9fafb;
  padding: 24px 4vw 24px 4vw;
}
h2 {
  text-align:center;
  color:#2763c6;
  margin-bottom:12px;
  letter-spacing:2px;
  font-size: 1.3em;
}
form {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  gap:6px;
}
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 28px 0 18px 0;
}
.loading-spinner::after {
  content: "";
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 5px solid #c6d5f6;
  border-top: 5px solid #3979f6;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

#code-input {
  font-size:1.1em;
  padding:7px 14px;
  border-radius:6px;
  border:1px solid #b2bec3;
  width: 160px;
  max-width:50vw;
  outline:none;
  transition: border .13s;
}
#code-input:focus { border-color:#2763c6;}
#search-btn {
  background: #3979f6;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 16px;
  cursor: pointer;
  font-size: 1.05em;
  transition: background .15s;
}
#search-btn:hover {
  background: #1849a8;
}

.result-block {
  background: none;
  box-shadow: none;
  border-radius: 0;
  max-width: 98vw;
  margin:0 auto 32px auto;
  padding:0;
  text-align:left;
}

/* 標題：H11→室內外通信異常 */
.err-title {
  font-size: 1.15em;
  color: #1849a8;
  margin-bottom: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
}
.err-code {
  background: none;
  color: #225bc8;
  font-size: 1.18em;
  font-weight: 700;
  padding-right: 2px;
  letter-spacing:1.5px;
}
.err-desc {
  color: #24375a;
  font-size: 1.08em;
  font-weight: 500;
  padding-left:4px;
}

/* 按鈕 */
.show-md-btn {
  display:block;
  margin: 0 0 18px 0;
  background: #3979f6;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 20px;
  font-size:1.05em;
  cursor: pointer;
  transition: background .15s;
}
.show-md-btn:hover {
  background: #1849a8;
}

/* 檢查重點 */
.focus-title {
  margin: 12px 0 6px 2px;
  color: #335;
  font-size:1em;
  font-weight: 1000;
}
.focus-list {
  text-align: left;
  margin: 0 0 0 18px;
  padding-left: 1.2em;
  font-size: 1em;
}
.focus-list li {
  margin-bottom: 6px;
  line-height: 1.7;
}
.focus-list a {
  color: #2562e6;
  text-decoration: none;
  background: none;
  cursor: pointer;
  padding: 0 2px;
  border-radius: 3px;
  transition: color .15s;
}
.focus-list a:hover {
  color: #1849a8;
}
.no-result {
  color:#b62b19;
  background: #fff;
  text-align:center;
  padding:32px 0 28px 0;
  border-radius:8px;
  box-shadow: 0 3px 16px #0001;
  font-size:1.1em;
}

/* Modal 彈窗 */
#modal {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  z-index: 999;
  background: rgba(0,0,0,.18);
  display: none;
  justify-content: center;
  align-items: center;
}
#modal.show {
  display: flex;
}
#modal-content {
  background: #fff;
  padding: 18px 5vw 16px 5vw;
  min-width: 220px;
  max-width: 95vw;
  max-height: 85vh;
  border-radius: 14px;
  box-shadow: 0 10px 48px #0002;
  position: relative;
  overflow-y: auto;
  animation: popIn .21s;
  font-size: 1em;
}
@keyframes popIn { from { transform: scale(.92); opacity: 0; } }
#modal-close {
  position: absolute;
  top: 7px;
  right: 10px;
  font-size: 1.6em;
  color: #bbb;
  cursor: pointer;
  transition: color .16s;
  z-index: 9;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}
#modal-close:hover {
  color: #3979f6;
}

/* Markdown 美化 */
.markdown-body {
  font-size: 1em;
  line-height: 1.75;
  color: #23354b;
  margin: 0;
  padding: 0 14px;   /* 左右留點空間，避免貼邊，手機/桌機皆合適 */
  box-sizing: border-box;
  max-width: 100%;
}
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  color: #3979f6;
  border-bottom: 1px solid #e4e8ee;
  margin-top: 1.2em;
  margin-bottom: .6em;
  font-weight: 600;
  padding-left: 0;
}
.markdown-body ul, .markdown-body ol {
  margin-left: 1.1em;   /* 刻意降低縮排 */
  margin-bottom: 1em;
  padding-left: 1.1em;
}
.markdown-body ul ul, .markdown-body ol ol {
  margin-left: 0.7em;
  padding-left: 1em;
}
.markdown-body li {
  margin-bottom: 2px;
  word-break: break-word;
}
.markdown-body code {
  background: #f1f6ff;
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 0.95em;
  color: #3d4d6d;
}
.markdown-body pre {
  background: #f5f5f5;
  padding: 10px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.95em;
}
.markdown-body table {
  border: 1px solid #e4e8ee;
  width: 100%;
  margin: 10px 0;
  border-radius: 5px;
  overflow: hidden;
}
.markdown-body th, .markdown-body td {
  border: 1px solid #e4e8ee;
  padding: 7px 10px;
  text-align: left;
  word-break: break-all;
}

.markdown-body img {
  max-width: 600px;   /* 固定最大寬度 */
  width: 100%;        /* 手機還是自適應 */
  height: auto;
  display: block;
  margin: 14px auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px #0001;
}


.bubble-list {
  margin: 32px 0 12px 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 11px 10px;
  justify-content: start;
  align-items: stretch;
}
.code-bubble {
  background: #e7edfc;
  color: #2456ae;
  border: none;
  border-radius: 18px;
  padding: 7px 0;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 6px #0001;
  transition: background .13s, color .13s;
  outline: none;
  width: 100%;
}
.code-bubble:hover, .code-bubble:focus {
  background: #3979f6;
  color: #fff;
}

/* 可選：手機再細調縮排 */
@media (max-width: 600px) {
  .markdown-body {
    font-size: 0.97em;
    padding: 0 6px;
  }
  .markdown-body ul, .markdown-body ol {
    margin-left: 0.7em;
    padding-left: 0.8em;
  }
  .markdown-body ul ul, .markdown-body ol ol {
    margin-left: 0.3em;
    padding-left: 0.7em;
  }
    .bubble-list {
    gap: 7px;
  }
  .code-bubble {
    font-size: 0.98em;
    padding: 6px 12px;
  }
  .markdown-body img {
  max-width: 100%;   /* 固定最大寬度 */
  }
}
