/* 字体观测器板块样式（自动从 字体工坊/css/style.css 转出，作用域 #panel-fontview） */
/* =========================================================
   字体工坊 · 样式
   ========================================================= */
#panel-fontview .hidden{ display: none !important; }

/* ---------- 按钮 ---------- */
#panel-fontview .btn{
  display: inline-flex; align-items: center; gap: 7px;
  border: none; cursor: pointer;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; font-family: inherit;
  transition: all .16s ease; white-space: nowrap;
}
#panel-fontview .btn svg{ width: 16px; height: 16px; }
#panel-fontview .btn:disabled{ opacity: .45; cursor: not-allowed; }
#panel-fontview .btn-primary{ background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(66,147,229,.32); }
#panel-fontview .btn-primary:hover:not(:disabled){ background: var(--primary-dark); }
#panel-fontview .btn-success{ background: var(--success); color: #fff; box-shadow: 0 4px 14px rgba(43,182,115,.3); }
#panel-fontview .btn-success:hover:not(:disabled){ filter: brightness(1.05); }
#panel-fontview .btn-ghost{ background: var(--surface-2); color: var(--text-2); }
#panel-fontview .btn-ghost:hover:not(:disabled){ background: var(--border); color: var(--text); }
#panel-fontview .btn-sm{ padding: 6px 12px; font-size: 13px; }
#panel-fontview .btn-danger{ background: var(--danger); color: #fff; }

/* ---------- 上传页 ---------- */
#panel-fontview .hero{ text-align: center; padding: 44px 0 28px; }
#panel-fontview .hero h1{ font-size: 32px; font-weight: 800; letter-spacing: .5px; }
#panel-fontview .hero p{ color: var(--text-2); margin-top: 10px; font-size: 15px; }

#panel-fontview .dropzone{
  background: var(--surface); border: 2px dashed var(--border);
  border-radius: var(--radius); padding: 52px 20px; text-align: center;
  cursor: pointer; transition: all .2s ease;
}
#panel-fontview .dropzone:hover, #panel-fontview .dropzone.dragover{ border-color: var(--primary); background: var(--primary-soft); }
#panel-fontview .dropzone-inner{ pointer-events: none; }
#panel-fontview .dropzone-icon{ width: 56px; height: 56px; color: var(--text-3); margin-bottom: 12px; }
#panel-fontview .dropzone-title{ font-size: 16px; font-weight: 600; }
#panel-fontview .dropzone-title .link{ color: var(--primary); }
#panel-fontview .dropzone-sub{ font-size: 13px; color: var(--text-3); margin-top: 6px; }

#panel-fontview .features{
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin-top: 28px;
}
#panel-fontview .feature-card{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
#panel-fontview .feature-icon{ font-size: 26px; margin-bottom: 8px; }
#panel-fontview .feature-card h3{ font-size: 16px; margin-bottom: 6px; }
#panel-fontview .feature-card p{ font-size: 13px; color: var(--text-2); }

/* ---------- 页面切换 ---------- */
#panel-fontview .page{ animation: fv_fadeIn .25s ease; }
@keyframes fv_fadeIn{ from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 字体摘要 ---------- */
#panel-fontview .font-summary{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 20px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
#panel-fontview .font-sample-badge{
  width: 74px; height: 74px; border-radius: 14px; background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; color: var(--primary); flex-shrink: 0; overflow: hidden;
}
#panel-fontview .font-summary-info{ flex: 1; min-width: 220px; }
#panel-fontview .font-summary-info h2{ font-size: 21px; }
#panel-fontview .font-summary-info .sub{ color: var(--text-2); font-size: 13px; margin-top: 2px; }
#panel-fontview .font-summary-stats{ display: flex; gap: 22px; margin-top: 10px; flex-wrap: wrap; }
#panel-fontview .stat-item{ font-size: 12.5px; color: var(--text-3); }
#panel-fontview .stat-item b{ color: var(--text); font-size: 14px; display: block; }

/* ---------- 元数据表单 ---------- */
#panel-fontview .panel-block{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px;
}
#panel-fontview .panel-block-head{ margin-bottom: 16px; }
#panel-fontview .panel-block-head h2{ font-size: 19px; }
#panel-fontview .panel-block-head p{ font-size: 13px; color: var(--text-2); margin-top: 3px; }

#panel-fontview .meta-grid{
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px 18px;
}
#panel-fontview .meta-field label{
  display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 5px; font-weight: 600;
}
#panel-fontview .meta-field label .en{ color: var(--text-3); font-weight: 400; font-size: 11.5px; margin-left: 4px; }
#panel-fontview .meta-field input, #panel-fontview .meta-field textarea{
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 11px; font-size: 13.5px; font-family: inherit; color: var(--text);
  background: var(--surface); outline: none; transition: border-color .15s ease;
}
#panel-fontview .meta-field textarea{ resize: vertical; min-height: 60px; }
#panel-fontview .meta-field input:focus, #panel-fontview .meta-field textarea:focus{ border-color: var(--primary); box-shadow: 0 0 0 3px rgba(66,147,229,.1); }
#panel-fontview .meta-field input.dirty, #panel-fontview .meta-field textarea.dirty{ border-color: var(--warning); background: #fffdf5; }
#panel-fontview .meta-actions{ margin-top: 16px; display: flex; gap: 10px; }

/* ---------- 字型工具条 ---------- */
#panel-fontview .glyph-toolbar{
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; box-shadow: var(--shadow);
}
#panel-fontview .search-input{
  flex: 1; min-width: 180px; max-width: 320px;
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px;
  font-size: 14px; font-family: inherit; outline: none;
}
#panel-fontview .search-input:focus{ border-color: var(--primary); }
#panel-fontview .glyph-count{ font-size: 13px; color: var(--text-2); }
#panel-fontview .pager{ display: flex; gap: 6px; align-items: center; margin-left: auto; }
#panel-fontview .pager button{
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  padding: 5px 11px; border-radius: 7px; font-size: 13px; font-family: inherit; color: var(--text-2);
}
#panel-fontview .pager button:hover:not(:disabled){ border-color: var(--primary); color: var(--primary); }
#panel-fontview .pager button:disabled{ opacity: .4; cursor: not-allowed; }
#panel-fontview .pager .page-ind{ font-size: 12.5px; color: var(--text-2); padding: 0 6px; }

/* ---------- 字型网格 ---------- */
#panel-fontview .glyph-grid{
  display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
}
#panel-fontview .glyph-cell{
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  aspect-ratio: 1; cursor: pointer; overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
#panel-fontview .glyph-cell:hover{ transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary); }
#panel-fontview .glyph-cell svg{ width: 82%; height: 82%; }
#panel-fontview .glyph-cell .unicode-tag{
  position: absolute; bottom: 3px; right: 5px; font-size: 9px; color: var(--text-3);
}
#panel-fontview .glyph-cell.edited{ border-color: var(--warning); }
#panel-fontview .glyph-cell.edited::after{
  content: '已编辑'; position: absolute; top: 3px; left: 4px;
  font-size: 9px; color: #fff; background: var(--warning);
  padding: 1px 5px; border-radius: 99px;
}
#panel-fontview .glyph-empty{ color: var(--text-3); text-align: center; padding: 60px 0; grid-column: 1/-1; }

/* ---------- 弹窗 ---------- */
#panel-fontview .modal-mask{
  position: fixed; inset: 0; background: rgba(20,24,34,.55);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
#panel-fontview .modal{
  background: var(--surface); border-radius: 16px; width: min(1060px, 94vw);
  max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: fv_popIn .22s ease;
}
@keyframes fv_popIn{ from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
#panel-fontview .modal-head{
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--border);
}
#panel-fontview .modal-title{ display: flex; align-items: center; gap: 14px; }
#panel-fontview .editor-char{
  width: 56px; height: 56px; border-radius: 12px; background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; color: var(--primary); overflow: hidden;
}
#panel-fontview .editor-char svg{ width: 48px; height: 48px; }
#panel-fontview .editor-name{ font-size: 15px; font-weight: 700; }
#panel-fontview .editor-unicode{ font-size: 12px; color: var(--text-3); }
#panel-fontview .modal-close{
  border: none; background: var(--surface-2); width: 34px; height: 34px;
  border-radius: 9px; cursor: pointer; font-size: 15px; color: var(--text-2);
}
#panel-fontview .modal-close:hover{ background: var(--border); }

#panel-fontview .editor-body{ display: flex; min-height: 0; flex: 1; }
#panel-fontview .editor-canvas-wrap{
  flex: 1; min-width: 0; background:
    repeating-conic-gradient(#f0f1f5 0% 25%, #f8f9fb 0% 50%) 50% / 22px 22px;
  display: flex; align-items: center; justify-content: center; padding: 14px;
}
#panel-fontview #editorSvg{
  width: 100%; height: 100%; max-height: 62vh;
  background: #fff; border-radius: 10px; border: 1px solid var(--border);
  touch-action: none; cursor: crosshair;
}
#panel-fontview #editorSvg .outline{ fill: #4293e5; fill-opacity: .13; stroke: #4293e5; stroke-width: 1.5; }
#panel-fontview #editorSvg .guide{ stroke: #e2544f; stroke-width: 1; stroke-dasharray: 5 4; opacity: .65; }
#panel-fontview #editorSvg .guide-metric{ stroke: #9aa3b2; stroke-width: 1; stroke-dasharray: 3 4; opacity: .5; }
#panel-fontview #editorSvg .metric-label{ font-size: 26px; fill: #9aa3b2; }
#panel-fontview #editorSvg .handle-line{ stroke: rgba(66,147,229,.45); stroke-width: 1.2; }
#panel-fontview #editorSvg .handle-on{
  fill: #fff; stroke: #4293e5; stroke-width: 2; cursor: grab;
}
#panel-fontview #editorSvg .handle-off{ fill: #4293e5; opacity: .75; cursor: grab; }
#panel-fontview #editorSvg .handle-on:hover, #panel-fontview #editorSvg .handle-off:hover{ stroke: #e2544f; fill: #ffe1e0; }
#panel-fontview #editorSvg .advance-line{ stroke: #2bb673; stroke-width: 1.6; stroke-dasharray: 7 5; cursor: ew-resize; }
#panel-fontview #editorSvg .advance-handle{ fill: #2bb673; cursor: ew-resize; }

#panel-fontview .editor-side{
  width: 250px; flex-shrink: 0; border-left: 1px solid var(--border);
  padding: 16px; overflow-y: auto;
}
#panel-fontview .side-group{ margin-bottom: 18px; }
#panel-fontview .side-group h4{ font-size: 13px; color: var(--text-2); margin-bottom: 9px; letter-spacing: .3px; }
#panel-fontview .transform-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
#panel-fontview .side-hint{ font-size: 12px; color: var(--text-3); line-height: 1.6; margin-top: 6px; }
#panel-fontview .side-field{ margin-bottom: 9px; }
#panel-fontview .side-field label{ display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
#panel-fontview .side-field input{
  width: 100%; border: 1px solid var(--border); border-radius: 7px;
  padding: 6px 9px; font-size: 13px; font-family: inherit; outline: none;
}
#panel-fontview .side-field input:focus{ border-color: var(--primary); }
#panel-fontview .checkbox{ display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; margin-top: 7px; }
#panel-fontview .checkbox input{ width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }
#panel-fontview .side-btn-row{ display: flex; gap: 7px; }

#panel-fontview .modal-foot{
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 22px; border-top: 1px solid var(--border);
}
#panel-fontview .editor-status{ font-size: 12.5px; color: var(--text-3); }

/* ---------- 响应式 ---------- */
@media (max-width: 860px){
  #panel-fontview .editor-body{ flex-direction: column; }
  #panel-fontview .editor-side{ width: 100%; border-left: none; border-top: 1px solid var(--border); }
  #panel-fontview #editorSvg{ max-height: 44vh; }
}

/* ---------- 面板内工具条（集成版新增） ---------- */
#panel-fontview .fontview-toolbar{ display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
#panel-fontview .fontview-toolbar .btn.active-tab{ background: var(--primary-soft); color: var(--primary); }
