/* ============================================================
 * responsive.css · 响应式增强层
 *
 * 统一断点系统 + 移动端适配 + 触摸优化 + 可访问性
 * 加载在 style.css 之后，作为渐进增强补充
 * ============================================================ */

/* ============================================================
   1. 统一断点变量 & 流体排版
   ============================================================ */
:root {
  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;

  /* 触摸目标最小尺寸 */
  --touch-min: 44px;

  /* 安全区 */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  /* 底部导航栏高度 */
  --mobile-nav-h: 56px;
}

/* ============================================================
   2. 移动端导航栏（汉堡菜单）
   ============================================================ */
.nav-toggle {
  display: none;
  width: var(--touch-min);
  height: var(--touch-min);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  border-radius: var(--radius-sm);
  position: relative;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--text-0);
  border-radius: 2px;
  transition: all 0.25s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 移动端遮罩 */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.nav-overlay.visible {
  display: block;
  opacity: 1;
}

/* ============================================================
   3. 移动端底部导航栏
   ============================================================ */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--mobile-nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(11, 14, 26, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-soft);
  z-index: 90;
  justify-content: space-around;
  align-items: flex-start;
  padding-top: 6px;
}

.mobile-bottom-nav .mbn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: var(--touch-min);
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s;
  flex: 1;
  padding: 2px;
}

.mobile-bottom-nav .mbn-item .mbn-icon {
  font-size: 18px;
  line-height: 1;
}

.mobile-bottom-nav .mbn-item.active {
  color: var(--accent);
}

.mobile-bottom-nav .mbn-item:active {
  color: var(--text-0);
}

/* ============================================================
   4. Skip Link（可访问性）
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 999;
  padding: 8px 16px;
  background: var(--accent);
  color: #2a1c00;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 8px;
}

/* ============================================================
   5. focus-visible 增强（可访问性）
   ============================================================ */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
*:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================================
   6. reduced-motion 支持
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .view {
    animation: none;
  }
}

/* ============================================================
   7. 加载骨架屏
   ============================================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-3) 25%,
    var(--bg-2) 50%,
    var(--bg-3) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
  pointer-events: none;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  border-radius: 4px;
}
.skeleton-text.short { width: 40%; }
.skeleton-text.medium { width: 65%; }
.skeleton-text.long { width: 90%; }

.skeleton-card {
  height: 160px;
  border-radius: var(--radius);
}

.skeleton-line {
  height: 1px;
  background: var(--border-soft);
  margin: 16px 0;
}

/* 骨架屏容器 */
.skeleton-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ============================================================
   8. 滚动到顶部按钮
   ============================================================ */
.scroll-top-btn {
  position: fixed;
  bottom: calc(var(--mobile-nav-h) + var(--safe-bottom) + 16px);
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--text-0);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.25s ease;
  z-index: 80;
  box-shadow: var(--shadow-soft);
}
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ============================================================
   9. 入场动画（Intersection Observer 驱动）
   ============================================================ */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.fade-in.in-view {
  opacity: 1;
}

/* ============================================================
   10. Toast 增强
   ============================================================ */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  animation: toastSlideIn 0.3s ease;
}

.toast.fade-out {
  animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(120%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(120%);
  }
}

/* Toast 进度条 */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  width: 100%;
  transform-origin: left;
  animation: toastProgress linear forwards;
}
@keyframes toastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* ============================================================
   11. 响应式断点
   ============================================================ */

/* ---- 大屏 (> 1280px) ---- */
@media (min-width: 1281px) {
  :root {
    --maxw: 1320px;
  }
  .home-hero-copy {
    max-width: 600px;
  }
}

/* ---- 平板 (768px - 1023px) ---- */
@media (min-width: 768px) and (max-width: 1023px) {
  .home-actions {
    flex-wrap: wrap;
  }
  .cover-showcase20 {
    margin-top: 32px;
  }
}

/* ---- 移动端 (< 768px) ---- */
@media (max-width: 767px) {
  .audience-persona-grid,
  .audience-persona-preview {
    grid-template-columns: 1fr;
  }
  .audience-persona-preview > p { grid-column: 1; }
  .analysis-revision-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .analysis-revision-compare { grid-template-columns: 1fr; }
  /* 基础布局 */
  :root {
    --maxw: 100%;
  }

  body {
    font-size: 15px;
    padding-bottom: calc(var(--mobile-nav-h) + var(--safe-bottom));
  }

  .app-container {
    padding: 16px 14px calc(var(--mobile-nav-h) + var(--safe-bottom) + 20px);
  }

  /* 显示底部导航 */
  .mobile-bottom-nav {
    display: flex;
  }

  /* 显示汉堡菜单 */
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .navbar .nav-inner {
    padding: 0 12px;
    gap: 8px;
  }

  /* 导航链接收起为侧边面板 */
  .navbar.expanded .nav-links {
    display: flex;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-1);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    gap: 4px;
    z-index: 100;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    box-shadow: var(--shadow);
    animation: navSlideDown 0.25s ease;
  }

  @keyframes navSlideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .navbar:not(.expanded) .nav-links {
    display: none;
  }

  .nav-link {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: var(--radius-sm);
  }

  /* 首页 */
  #view-home {
    margin-top: -16px;
    margin-bottom: calc(-1 * (var(--mobile-nav-h) + var(--safe-bottom)));
  }

  .home-hero {
    min-height: 900px;
    padding: 20px 0 40px;
  }

  .home-title {
    font-size: clamp(22px, 6vw, 30px);
    line-height: 1.35;
  }

  .home-kicker {
    font-size: 12px;
  }

  #view-home .home-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    margin-top: 20px;
    margin-bottom: 64px;
  }

  #view-home .home-primary-btn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    padding: 0 5px;
    font-size: 11px;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
  }

  /* 封面海报墙移动端 */
  .cover-showcase20 {
    top: 540px;
    margin-top: 0;
  }

  .cover-wall {
    gap: 12px !important;
  }

  /* 页面头部 */
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .page-title {
    font-size: clamp(20px, 5.5vw, 26px);
  }

  .page-header .btn,
  .page-header .btn-group {
    width: 100%;
  }

  .page-header .btn-group {
    flex-direction: row;
  }

  .page-header .btn-group .btn {
    flex: 1;
  }

  /* 卡片 */
  .card {
    padding: 16px 14px;
    border-radius: var(--radius);
  }

  /* 表单 */
  .form-grid,
  .analysis-param-grid,
  .home-topic-config.inspiration-config-grid,
  .inspiration-config-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .batch-controls {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .batch-controls > *:nth-child(3),
  .batch-controls > *:nth-child(4) {
    grid-column: span 1;
  }

  .batch-controls > *:nth-child(5) {
    grid-column: 1 / -1;
  }

  /* 表单字段间距 */
  .form-field {
    margin-bottom: 14px;
  }

  /* 按钮触摸优化 */
  .btn {
    min-height: var(--touch-min);
    padding: 10px 16px;
  }

  .btn-sm {
    min-height: 36px;
    padding: 6px 12px;
  }

  /* Stepper 移动端 */
  .stepper-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 12px 4px;
    gap: 8px 4px;
    overflow: visible;
  }

  .stepper-step {
    min-width: 0;
    width: 100%;
    padding: 6px 2px;
  }

  .stepper-circle {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .stepper-label {
    font-size: 11px;
  }

  .stepper-desc {
    font-size: 9px;
    display: none;
  }

  .stepper-connector {
    display: none;
  }

  /* 工作台顶栏 */
  .workspace-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .ws-top-left {
    gap: 8px;
  }

  .ws-project-meta {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ws-top-right {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  /* 步骤内容 */
  .step-content {
    padding: 0;
  }

  .step-footer {
    flex-direction: column;
    gap: 10px;
    padding: 14px;
  }

  .step-footer .btn {
    width: 100%;
  }

  .step-footer .hint {
    text-align: center;
    font-size: 12px;
  }

  /* 项目网格 */
  .project-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* 脚本管理工具栏 */
  .script-manager-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .modal.title-engine-modal {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
  }

  .title-engine-body {
    padding: 14px;
  }

  .title-engine-context,
  .title-engine-controls,
  .title-engine-results {
    padding: 14px;
  }

  .title-engine-section-head,
  .title-engine-generate-row,
  .title-engine-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .title-engine-context-grid,
  .title-engine-control-grid {
    grid-template-columns: 1fr;
  }

  .title-engine-sources {
    grid-template-columns: 1fr;
  }

  .title-engine-generate-row .btn,
  .title-engine-footer .btn {
    width: 100%;
  }

  .title-engine-portfolio {
    justify-content: flex-start;
  }

  .title-candidate-card {
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .title-candidate-side,
  .title-candidate-actions {
    grid-column: 2;
  }

  .title-candidate-actions {
    justify-content: flex-start;
  }

  /* 知识库 */
  .tabs {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    gap: 4px;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* 榜单 */
  .ranking-filter-bar {
    flex-direction: column;
    gap: 8px;
  }

  .ranking-filter-bar .filter-group {
    width: 100%;
  }

  .ranking-filter-bar select {
    width: 100%;
  }

  /* 模态框移动端底部弹出 */
  .modal-mask {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation: modalSlideUp 0.3s ease;
  }

  @keyframes modalSlideUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 16px;
  }

  .modal-footer {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .modal-footer .btn {
    width: 100%;
  }

  /* 连续性面板 */
  .continuity-grid {
    grid-template-columns: 1fr !important;
  }

  /* 文件行 */
  .file-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  /* 表格滚动容器 */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 加载遮罩 */
  .loading-overlay {
    padding: 20px;
  }

  .spinner {
    width: 40px;
    height: 40px;
  }

  /* auth状态 */
  .home-auth-status {
    top: 10px;
    right: 10px;
    padding: 5px 8px;
  }

  /* 爆款雷达 */
  .ranking-agent-card {
    padding: 14px;
  }

  /* 排行榜表格 */
  .ranking-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  /* Markdown 内容 */
  .markdown-body {
    font-size: 14px;
    word-break: break-word;
  }

  .markdown-body pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .markdown-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  /* 滚动到顶部按钮位置调整 */
  .scroll-top-btn {
    bottom: calc(var(--mobile-nav-h) + var(--safe-bottom) + 12px);
    right: 12px;
  }

  /* 工具栏 */
  .stage-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .stage-toolbar .btn {
    flex: 1 1 auto;
    min-width: 120px;
  }

  /* 角色面板 */
  .character-board,
  .character-form-grid,
  .character-grid,
  .character-info-list {
    grid-template-columns: 1fr !important;
  }

  /* 工作区布局 */
  .workspace-layout,
  .new-project-layout {
    grid-template-columns: 1fr !important;
  }

  .params-sidebar,
  .stages-panel {
    position: static !important;
  }

  /* 上游失效横幅 */
  .invalid-banner {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  /* 灵感结果 */
  .topic-result {
    padding: 14px;
  }

  /* KPI 网格 */
  .ranking-kpi-grid,
  .ranking-analysis-grid,
  .breakdown-grid,
  .platform-grid,
  .structure-list,
  .ranking-agent-body,
  .ranking-filter-bar,
  .import-grid,
  .admin-overview-grid,
  .admin-inline-form,
  .trend-row,
  .idea-seed-card,
  .character-qc-grid,
  .s-rating-columns,
  .script-analysis-layout {
    grid-template-columns: 1fr !important;
  }

  /* 大号标题缩小 */
  h1 { font-size: clamp(20px, 5.5vw, 26px); }
  h2 { font-size: clamp(18px, 5vw, 22px); }
  h3 { font-size: clamp(16px, 4.5vw, 18px); }

  /* 间距统一收紧 */
  .page-header { margin-bottom: 16px; }
  .card-title { margin-bottom: 12px; }
  .form-actions { margin-top: 16px; gap: 8px; }
  .form-actions .btn { flex: 1; }

  #view-script-analysis {
    padding-bottom: calc(var(--mobile-nav-h) + 86px);
  }

  .script-analysis-report {
    min-height: 380px;
    padding: 14px 12px;
  }

  .script-analysis-action-bar {
    position: sticky;
    z-index: 30;
    bottom: calc(var(--mobile-nav-h) + 8px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 14px -12px -12px;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    background: var(--bg-2);
    box-shadow: 0 -8px 22px rgba(0, 0, 0, .18);
  }

  .script-analysis-action-bar .btn {
    min-height: 44px;
    padding-inline: 8px;
  }

  .script-analysis-action-bar .script-analysis-primary-action {
    grid-column: 1 / -1;
  }

  .script-analysis-working-copy {
    align-items: stretch;
    flex-direction: column;
  }

  .script-analysis-working-copy .btn-group {
    display: grid;
    grid-template-columns: 1fr;
  }

  .analysis-coverage-grid {
    grid-template-columns: 1fr;
  }

  .analysis-center-tabs {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .analysis-center-tab {
    min-height: 44px;
  }

  .analysis-center-header h2 {
    font-size: 20px;
  }

  .analysis-center-header .btn,
  .analysis-local-badge {
    flex: 0 0 auto;
  }

  .analysis-section-block {
    padding: 13px 12px;
  }

  .analysis-summary-card {
    min-height: 96px;
  }

  .analysis-issue-card-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .analysis-issue-state {
    display: none;
  }

  .standalone-report-nav {
    position: sticky;
    z-index: 24;
    top: 0;
    margin-right: -12px;
    margin-left: -12px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
  }

  .standalone-report-nav button {
    min-width: 0;
    min-height: 44px;
    padding-inline: 4px;
  }

  .standalone-creator-summary-grid,
  .standalone-creator-safety,
  .analysis-issue-safety-summary,
  .standalone-revision-safety-grid,
  .consultation-pair {
    grid-template-columns: 1fr;
  }

  .standalone-technical-evidence dl > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .standalone-revision-option-head,
  .standalone-revision-select-row {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ---- 小屏手机 (< 480px) ---- */
@media (max-width: 479px) {
  #view-home .home-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-hero {
    min-height: 1040px;
  }

  .home-actions {
    margin-bottom: 72px;
  }

  .cover-showcase20 {
    top: 690px;
  }

  .nav-inner {
    padding: 0 10px !important;
  }

  .brand-logo {
    font-size: 18px;
  }

  /* 更紧凑的卡片 */
  .card {
    padding: 14px 12px;
  }

  /* Toast 占满宽度 */
  .toast-container {
    left: 8px;
    right: 8px;
    top: 8px;
    max-width: none;
  }

  .toast {
    width: 100%;
  }

  /* 脚本分析 */
  .script-analysis-textarea {
    min-height: 120px !important;
    font-size: 13px;
  }

  /* 分集生成 */
  .continuity-textarea {
    min-height: 140px !important;
  }

  .user-input-box {
    min-height: 80px !important;
    font-size: 13px;
  }
}

/* ---- 横屏手机 ---- */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .mobile-bottom-nav {
    height: var(--mobile-nav-h);
  }

  .home-hero {
    min-height: 760px;
  }

  .modal {
    max-height: 95vh;
  }
}

/* ---- 打印样式 ---- */
@media print {
  .navbar,
  .mobile-bottom-nav,
  .nav-overlay,
  .nav-toggle,
  .scroll-top-btn,
  .toast-container,
  .loading-overlay,
  .home-actions,
  .step-footer,
  .invalid-banner {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .card {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}

/* ============================================================
   12. 暗色/亮色滚动条适配
   ============================================================ */
@media (prefers-color-scheme: light) {
  /* 如果未来支持亮色主题，滚动条适配 */
  ::-webkit-scrollbar-track {
    background: #f0f0f0;
  }
  ::-webkit-scrollbar-thumb {
    background: #ccc;
  }
}

/* ============================================================
   13. 高对比度模式
   ============================================================ */
@media (prefers-contrast: high) {
  .btn {
    border-width: 2px;
  }
  .card {
    border-width: 2px;
  }
  .input,
  textarea.input,
  select.input {
    border-width: 2px;
  }
}

/* V1.9 小说市场雷达：平板两列，窄屏单列。 */
@media (max-width: 900px) {
  .novel-market-opportunity-grid,
  .novel-market-summary-grid,
  .novel-market-rhythm-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .novel-market-panel,
  .novel-market-rhythm-panel,
  .novel-market-opportunity-card,
  .novel-market-summary-grid,
  .novel-market-rhythm-summary {
    min-width: 0;
    max-width: 100%;
  }

  .novel-market-panel .ranking-table-wrap,
  .novel-market-rhythm-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 600px) {
  .novel-market-opportunity-grid,
  .novel-market-summary-grid,
  .novel-market-rhythm-summary {
    grid-template-columns: 1fr !important;
  }

  .novel-market-rhythm-panel {
    padding: 12px;
  }
}
