/* HexaWord Web Edition — Dual-Column Writing & Lexicon Studio */

html.web-mode {
  background: #f1f5f9;
}

html.web-mode body {
  background: radial-gradient(circle at 12% 8%, #e8f0fe 0%, #f3f6fb 42%, #eef2f7 100%) !important;
  min-height: 100vh;
  height: auto !important;
  width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 16px 24px 26px !important;
  gap: 16px !important;
}

/* 顶部统一导航栏 */
html.web-mode .web-topbar {
  width: 100%;
  max-width: 1380px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 16px;
  padding: 12px 20px;
  box-shadow: 0 6px 20px -6px rgba(15, 23, 42, 0.07);
  flex-shrink: 0;
}

html.web-mode .web-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

html.web-mode .web-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

html.web-mode .web-brand-icon {
  border-radius: 9px;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.22);
}

html.web-mode .web-brand-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

html.web-mode .web-badge {
  font-size: 11px;
  font-weight: 600;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 1px 8px;
  border-radius: 999px;
}

html.web-mode .web-brand-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

html.web-mode .web-quick-examples {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

html.web-mode .web-quick-label {
  font-size: 12px;
  color: #64748b;
  margin-right: 2px;
}

html.web-mode .web-sample-chip {
  height: 29px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.14s ease;
}

html.web-mode .web-sample-chip:hover {
  border-color: #3b82f6;
  color: #1d4ed8;
  background: #f8fafc;
}

html.web-mode .web-sample-chip.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}

/* 双栏工作台主舞台 */
html.web-mode .web-workspace {
  width: 100%;
  max-width: 1380px;
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  flex: 1;
}

/* 左侧栏：写作演练台 + 足迹 + 指南 */
html.web-mode .web-left-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

html.web-mode .web-studio-card,
html.web-mode .web-history-card,
html.web-mode .web-guide-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: 16px;
  box-shadow: 0 10px 28px -10px rgba(15, 23, 42, 0.08);
}

html.web-mode .web-studio-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  min-height: 360px;
}

html.web-mode .web-studio-header {
  padding: 13px 16px;
  background: rgba(248, 250, 252, 0.95);
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

html.web-mode .web-studio-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

html.web-mode .web-studio-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

html.web-mode .web-mini-btn {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.12s ease;
}

html.web-mode .web-mini-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
}

html.web-mode .web-template-bar {
  padding: 9px 16px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

html.web-mode .web-template-label {
  font-size: 11.5px;
  color: #64748b;
}

html.web-mode .web-tpl-btn {
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
}

html.web-mode .web-tpl-btn:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
}

html.web-mode .web-tpl-btn.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  font-weight: 600;
}

html.web-mode .web-pad-host {
  flex: 1;
  display: flex;
  flex-direction: column;
}

html.web-mode .web-pad-host .practice-pad {
  flex: 1;
  display: flex !important;
  flex-direction: column;
  padding: 14px 16px;
  background: #ffffff;
  border-bottom: none;
}

html.web-mode .web-pad-host .pad-desc,
html.web-mode .web-pad-host .pad-footer {
  display: none !important;
}

html.web-mode .web-pad-host textarea {
  flex: 1;
  min-height: 220px;
  height: 100% !important;
  padding: 14px 15px;
  font-size: 14.5px;
  line-height: 1.7;
  border: 1.5px solid #dbe4f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
}

html.web-mode .web-pad-host textarea:focus {
  background: #ffffff;
  border-color: #2563eb;
}

html.web-mode .web-studio-footer {
  padding: 10px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

html.web-mode .web-selection-status {
  font-size: 11.5px;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.web-mode .web-selection-status strong {
  color: #2563eb;
}

html.web-mode .web-word-counter {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 左下：查词足迹 & 使用提示 */
html.web-mode .web-history-card {
  padding: 13px 16px;
}

html.web-mode .web-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 10px;
}

html.web-mode .web-mini-link {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 11.5px;
  cursor: pointer;
}

html.web-mode .web-mini-link:hover {
  color: #ef4444;
}

html.web-mode .web-history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

html.web-mode .web-history-empty {
  font-size: 11.5px;
  color: #94a3b8;
}

html.web-mode .web-history-chip {
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
}

html.web-mode .web-history-chip:hover {
  border-color: #3b82f6;
  color: #1d4ed8;
  background: #eff6ff;
}

html.web-mode .web-history-chip.active {
  background: #1e40af;
  color: #ffffff;
  border-color: #1e40af;
}

html.web-mode .web-guide-card {
  padding: 13px 16px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.85), rgba(248, 250, 252, 0.95));
}

html.web-mode .web-guide-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 6px;
}

html.web-mode .web-guide-steps {
  padding-left: 18px;
  font-size: 12px;
  color: #475569;
  line-height: 1.65;
}

/* 右侧栏：六维语义矩阵主舞台 */
html.web-mode .web-right-pane {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

html.web-mode #floating-pill {
  display: none !important;
}

html.web-mode .result-panel {
  width: 100% !important;
  height: calc(100vh - 114px) !important;
  min-height: 660px;
  max-height: none !important;
  border-radius: 16px !important;
  box-shadow: 0 18px 44px -14px rgba(15, 23, 42, 0.12), 0 4px 14px -4px rgba(15, 23, 42, 0.05) !important;
  border: 1px solid rgba(203, 213, 225, 0.85) !important;
}

html.web-mode .panel-header {
  cursor: default !important;
}

/* 隐藏仅属于 macOS 桌面浮窗的控件 */
html.web-mode .panel-drag-handle,
html.web-mode #btn-toggle-pad,
html.web-mode #btn-toggle-pin,
html.web-mode #btn-close-panel,
html.web-mode #panel-sync-badge,
html.web-mode .shortcut-tip,
html.web-mode .bulk-cache-group,
html.web-mode .checkbox-group {
  display: none !important;
}

html.web-mode .settings-modal,
html.web-mode .vocab-modal {
  position: fixed !important;
}

/* 窄屏与移动端适配：自动切换为上下堆叠 */
@media (max-width: 1024px) {
  html.web-mode body {
    padding: 12px 12px 24px !important;
  }

  html.web-mode .web-workspace {
    grid-template-columns: 1fr;
  }

  html.web-mode .web-studio-card {
    min-height: 240px;
  }

  html.web-mode .web-pad-host textarea {
    min-height: 140px;
  }

  html.web-mode .web-guide-card {
    display: none;
  }

  html.web-mode .result-panel {
    height: auto !important;
    min-height: 600px;
  }
}
