.fishid-page {
    max-width: 1088px;
    margin: 0 auto;
    padding: 48px 28px 72px;
    color: var(--fb-ink);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Inter", system-ui, sans-serif;
}

.fishid-header, .fishid-title-row, .fishid-section-heading,
.fishid-file-meta, .fishid-result-heading { display: flex; align-items: center; }
.fishid-header { justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.fishid-title-row { gap: 14px; flex-wrap: wrap; }
.fishid-title-row h1 { margin: 0; font-size: 38px; font-weight: 700; letter-spacing: -.04em; line-height: 1.3; }
.fishid-trial-badge { padding: 5px 10px; border: 1px solid #cfddd8; border-radius: 6px; color: #426358; background: #eaf0e9; font-size: 12px; white-space: nowrap; }
.fishid-mode-badge { padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.fishid-mode-pro { border: 1px solid #f59e0b; background: #fef3c7; color: #b45309; }
.fishid-mode-standard { border: 1px solid #93c5fd; background: #eff6ff; color: #1d4ed8; }
.fishid-record-mode { font-size: 12px; font-weight: 600; color: var(--fb-gray-text, #4b5563); }
.fishid-intro { margin: 12px 0 0; color: var(--fb-ink-soft); font-size: 16px; line-height: 1.7; }
.fishid-history-link { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; white-space: nowrap; color: var(--fb-blue); }
.fishid-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 36px; }
.fishid-workspace { min-width: 0; }
.fishid-upload { padding: 26px; background: #fff; border: 1px solid #dfe6df; border-radius: 20px; box-shadow: 0 8px 32px #2f403805; scroll-margin-top: calc(var(--nav-height) + 20px); }
.fishid-section-heading { justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.fishid-section-heading h2 { margin: 0; font-size: 17px; font-weight: 650; line-height: 1.5; }
.fishid-section-heading > span { color: #68746d; font-size: 12px; white-space: nowrap; }
.fishid-upload-scope { margin: -10px 0 17px; color: #68746d; font-size: 12px; line-height: 1.8; }
.fishid-upload-scope a { color: var(--fb-blue); text-decoration: underline; text-underline-offset: 3px; }
.fishid-dropzone { position: relative; border: 1.5px dashed #bdcfcf; border-radius: 14px; background: #f7faf9; transition: border-color .18s, background-color .18s; }
.fishid-dropzone:hover, .fishid-dropzone.is-dragging { border-color: var(--fb-blue); background: #edf4f5; }
.fishid-dropzone:focus-within { outline: 3px solid var(--fb-blue); outline-offset: 4px; }
.fishid-picker { position: relative; display: flex; align-items: center; justify-content: center; min-height: 320px; padding: 16px; cursor: pointer; text-align: center; border-radius: inherit; overflow: hidden; }
.fishid-placeholder { display: flex; align-items: center; flex-direction: column; width: 100%; }
.fishid-photo-icon { color: var(--fb-blue); flex-shrink: 0; margin-bottom: 10px; }
.fishid-picker-title { font-size: 18px; font-weight: 600; color: var(--fb-heading); line-height: 1.6; }
.fishid-picker-note { margin-top: 7px; color: #66766e; font-size: 13px; line-height: 1.7; }
.fishid-choose { display: none; align-items: center; gap: 8px; margin-top: 22px; padding: 10px 18px; border: 1px solid var(--fb-blue); border-radius: 8px; color: #fff; background: var(--fb-blue); font-size: 14px; font-weight: 600; box-shadow: 0 2px 3px #2f403805; }
.fishid-drop-hint { display: none; margin-top: 12px; color: #68776e; font-size: 12px; }
.fishid-file { display: block; max-width: calc(100% - 32px); margin: 16px; font: inherit; font-size: 14px; }
.fishid-file::file-selector-button { margin-right: 12px; padding: 9px 12px; border: 1px solid #c5d6dc; border-radius: 7px; background: #fff; color: var(--fb-blue); font: inherit; }
.fishid-upload.is-enhanced .fishid-file { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.fishid-upload.is-enhanced .fishid-choose { display: inline-flex; }
.fishid-upload.is-enhanced .fishid-drop-hint { display: block; }
.fishid-preview { display: block; width: 100%; max-height: 320px; object-fit: contain; border-radius: 8px; }
.fishid-replace { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); padding: 7px 13px; border: 1px solid #d9e2dc; border-radius: 7px; background: #fffffff2; color: #315f77; font-size: 12px; white-space: nowrap; }
.fishid-file-meta { justify-content: space-between; gap: 12px; padding: 12px 0 0; }
.fishid-file-details { display: flex; align-items: baseline; gap: 10px; min-width: 0; font-size: 13px; }
#fishid-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fishid-file-size { flex-shrink: 0; color: #68746d; font-size: 12px; }
.fishid-remove { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; border: 0; border-radius: 7px; color: #576b60; background: #f0f4ef; cursor: pointer; }
.fishid-remove:hover { background: #e5ede6; }
.fishid-hint { margin: 15px 0 20px; color: #68746d; font-size: 12px; line-height: 1.7; }
.fishid-submit { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; padding: 12px 20px; border: 0; border-radius: 9px; background: var(--fb-blue); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color .18s; }
.fishid-submit:hover { background: var(--fb-accent-dark); }
.fishid-submit:disabled { background: #e9eeeb; color: #68746d; cursor: not-allowed; }
.fishid-privacy { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 0; color: #68746d; font-size: 12px; }
.fishid-status { margin: 14px 0 0; padding: 10px 12px; border-radius: 7px; background: #fff4ee; color: #893e27; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.fishid-status:empty { display: none; }
.fishid-spinner { display: none; width: 17px; height: 17px; border: 2px solid #ffffff60; border-top-color: #fff; border-radius: 50%; animation: fishid-spin .8s linear infinite; }
.fishid-upload[aria-busy="true"] .fishid-submit { background: var(--fb-blue); color: #fff; cursor: wait; }
.fishid-upload[aria-busy="true"] .fishid-spinner { display: block; }
.fishid-upload[aria-busy="true"] .fishid-submit-arrow { display: none; }
.fishid-upload[aria-busy="true"] .fishid-picker { cursor: wait; }
.fishid-upload[aria-busy="true"] .fishid-status { background: #eff5f6; color: #315f77; }
.fishid-guide { padding-top: 5px; }
.fishid-scope { padding-bottom: 25px; border-bottom: 1px solid #dce4dc; }
.fishid-scope .fishid-section-heading { margin-bottom: 15px; }
.fishid-species { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 0; list-style: none; }
.fishid-species li { padding: 7px 9px; border: 1px solid #d9e3dc; border-radius: 7px; background: #fcfdfb; font-size: 13px; line-height: 1.4; text-align: center; }
.fishid-scope-note { margin: 14px 0 0; color: #68746d; font-size: 12px; line-height: 1.8; }
.fishid-tips { padding-top: 25px; }
.fishid-tips h2 { margin: 0; font-size: 17px; font-weight: 650; }
.fishid-tips ol { list-style: none; margin: 18px 0 0; padding: 0; }
.fishid-tips li { display: flex; gap: 13px; margin-top: 21px; }
.fishid-tip-number { color: #678c91; font-size: 12px; font-weight: 600; line-height: 24px; }
.fishid-tips h3 { margin: 0; color: var(--fb-heading); font-size: 14px; font-weight: 600; line-height: 24px; }
.fishid-tips p { margin: 4px 0 0; font-size: 13px; line-height: 1.7; color: #68746d; }
.fishid-trial-note { max-width: 680px; margin: 10px 0 0; color: #68746d; font-size: 12px; line-height: 1.9; }
.fishid-page-disclaimer { max-width: 660px; margin: 21px 0 0; color: #68746d; font-size: 12px; line-height: 1.9; }
.fishid-result { margin-top: 24px; padding: 26px; border: 1px solid #d3e0dd; border-radius: 20px; background: #fff; scroll-margin-top: calc(var(--nav-height) + 20px); }
.fishid-result:focus { outline: none; }
.fishid-result-heading { gap: 13px; }
.fishid-result-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: #edf4f3; color: var(--fb-blue); }
.fishid-eyebrow { margin: 0 0 3px; color: #68746d; font-size: 12px; }
.fishid-headline { margin: 0; color: var(--fb-heading); font-size: 20px; line-height: 1.5; font-weight: 650; }
.fishid-body { margin: 18px 0; color: var(--fb-ink-soft); font-size: 14px; line-height: 1.8; }
.fishid-candidates { margin: 0; padding: 0; list-style-position: inside; }
.fishid-candidates li { margin-top: 10px; padding: 14px; border: 1px solid #e0e8e3; border-radius: 9px; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.fishid-candidates li::marker { color: #6a8b83; font-size: 13px; }
.fishid-pick, .fishid-selected-badge, .fishid-waters-link { display: inline-block; margin-left: 8px; font-size: 12px; }
.fishid-pick, .fishid-retry, .fishid-waters-link { color: var(--fb-blue); text-decoration: underline; text-underline-offset: 4px; }
.fishid-selected-badge { padding: 1px 7px; border-radius: 5px; background: #e2ede5; color: #426657; }
.fishid-retry { display: inline-block; padding: 6px 0; font-size: 14px; }
.fishid-disclaimer { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid #e6ece6; color: #68746d; font-size: 12px; line-height: 1.9; }
.fishid-links { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 18px; }
.fishid-links a { color: var(--fb-blue); font-size: 13px; line-height: 1.8; }
.fishid-links a:hover, .fishid-history-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.fishid-history { margin-top: 40px; padding-top: 28px; border-top: 1px solid #dce4dc; scroll-margin-top: calc(var(--nav-height) + 20px); }
.fishid-history-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fishid-history-item { padding: 20px; border: 1px solid #e0e7df; border-radius: 12px; background: #ffffffb3; }
.fishid-history-item h3 { margin: 0; font-size: 14px; font-weight: 600; }
.fishid-history-candidate { margin: 10px 0 0; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.fishid-history-item .fishid-disclaimer { margin-top: 14px; padding-top: 12px; }
.fishid-page [hidden] { display: none; }
.fishid-record-photo { display: block; width: 100%; max-height: 380px; object-fit: contain; margin-top: 18px; border-radius: 9px; }
.fishid-history-photo { display: block; width: 100%; height: 150px; object-fit: contain; margin: 12px 0; border-radius: 8px; background: #f7faf9; }
.fishid-history-item time { display: block; margin-bottom: 10px; font-size: 12px; color: #68746d; }
.fishid-species { grid-template-columns: 1fr; max-height: 360px; overflow-y: auto; }
.fishid-species li { text-align: left; overflow-wrap: anywhere; }
.fishid-sci { display: block; color: #68746d; font-size: 12px; }
.fishid-species-search, .fishid-feedback form { display: grid; gap: 8px; }
.fishid-species-search label, .fishid-feedback label { margin-top: 8px; font-size: 13px; }
.fishid-species-search input, .fishid-species-search select,
.fishid-feedback input, .fishid-feedback select, .fishid-feedback textarea {
    width: 100%; min-width: 0; box-sizing: border-box; padding: 10px; font: inherit;
    border: 1px solid #bdcfcf; border-radius: 6px; background: #fff;
}
.fishid-species-search button, .fishid-feedback button, .fishid-delete-form button {
    width: fit-content; min-height: 40px; padding: 8px 12px; border: 1px solid #bdcfcf;
    border-radius: 6px; font: inherit; font-size: 13px; color: #315f77; background: #fff; cursor: pointer;
}
.fishid-pick-form { display: inline; }
.fishid-pick-form button { padding: 4px; border: 0; background: none; cursor: pointer; font: inherit; font-size: 12px; }
.fishid-feedback { padding-top: 16px; margin-top: 20px; border-top: 1px solid #e6ece6; }
.fishid-feedback h3 { font-size: 16px; }
.fishid-feedback-saved { color: #426657; font-size: 13px; line-height: 1.8; }
.fishid-delete-form { margin-top: 18px; }
.fishid-quality-hints { padding-left: 20px; color: #68746d; font-size: 13px; line-height: 1.8; }
.fishid-history-pages { display: flex; gap: 16px; margin-top: 18px; font-size: 14px; }
.fishid-page button:focus-visible, .fishid-page a:focus-visible { outline: 3px solid var(--fb-blue); outline-offset: 4px; }

@keyframes fishid-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .fishid-spinner { animation: none; }
    .fishid-dropzone, .fishid-submit { transition: none; }
}
@media (pointer: coarse) {
    .fishid-upload.is-enhanced .fishid-drop-hint { display: none; }
    .fishid-remove { width: 44px; height: 44px; }
}
@media (max-width: 820px) {
    .fishid-page { max-width: 680px; padding: 30px 20px 48px; }
    .fishid-header { margin-bottom: 24px; }
    .fishid-title-row h1 { font-size: 32px; }
    .fishid-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .fishid-guide { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
    .fishid-scope { padding: 0; border-bottom: 0; }
    .fishid-tips { padding: 0; }
    .fishid-tips ol { margin-top: 0; }
    .fishid-tips li { margin-top: 16px; }
    .fishid-upload.is-enhanced .fishid-drop-hint { display: none; }
}
@media (max-width: 480px) {
    .fishid-page { padding: 24px 16px 40px; }
    .fishid-header { gap: 12px; align-items: start; }
    .fishid-title-row { gap: 10px; }
    .fishid-title-row h1 { font-size: 29px; }
    .fishid-trial-badge, .fishid-mode-badge { padding: 4px 7px; font-size: 11px; }
    .fishid-intro { font-size: 14px; margin-top: 10px; }
    .fishid-history-link { padding-top: 9px; font-size: 12px; }
    .fishid-history-link svg { display: none; }
    .fishid-upload, .fishid-result { padding: 18px; border-radius: 16px; }
    .fishid-section-heading { margin-bottom: 16px; }
    .fishid-picker { min-height: 260px; padding: 14px 10px; }
    .fishid-photo-icon { width: 138px; height: 94px; margin-bottom: 6px; }
    .fishid-picker-title { font-size: 16px; }
    .fishid-picker-note { font-size: 12px; }
    .fishid-choose { margin-top: 16px; }
    .fishid-hint { margin: 13px 0 17px; }
    .fishid-guide { grid-template-columns: minmax(0, 1fr); gap: 25px; }
    .fishid-scope { padding-bottom: 23px; border-bottom: 1px solid #dce4dc; }
    .fishid-headline { font-size: 18px; }
    .fishid-file-details { align-items: start; flex-direction: column; gap: 2px; }
    #fishid-file-name { max-width: 100%; }
    .fishid-history-list { grid-template-columns: minmax(0, 1fr); }
    .fishid-history { margin-top: 28px; padding-top: 24px; }
}

.fishid-scientific-name {
  font-style:italic;
  font-size:.85rem;
  color:#64748b;
  margin:.35rem 0}
.fishid-match-score {
  color:#0f766e;
  font-weight:600}
.fishid-reference {
  margin:1rem 0}
.fishid-reference img {
  display:block;
  width:100%;
  max-width:340px;
  height:160px;
  object-fit:contain;
  background:#f8fafc;
  border-radius:12px}
.fishid-reference figcaption {
  font-size:.75rem;
  color:#64748b;
  margin-top:.5rem;
  line-height:1.6}
.fishid-compare-dialog {
  width:min(900px,94vw);
  max-height:90vh;
  border:0;
  border-radius:16px;
  padding:1rem}
.fishid-compare-dialog::backdrop {
  background:#0f172ab8}
.fishid-compare-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.75rem}
.fishid-compare-grid figure {
  margin:0;
  min-width:0}
.fishid-compare-grid img {
  display:block;
  width:100%;
  height:clamp(180px,35vw,360px);
  object-fit:contain;
  background:#f8fafc}
.fishid-compare-grid figcaption {
  font-size:.8rem;
  margin:.5rem 0;
  overflow-wrap:anywhere}
.fishid-compare-dialog button {
  display:block;
  margin:0 0 .75rem auto;
  padding:.5rem 1rem}
