/* ============================================================
   ★ 老板 2026-06-30 改造：macOS 系统色（参考 macOS Sonoma）
   ============================================================ */
:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --border: #d2d2d7;
  --border-light: #e5e5e7;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --primary: #0071e3;
  --primary-hover: #0077ed;
  --primary-active: #006edb;
  --danger: #ff3b30;
  --danger-hover: #ff453a;
  --warn: #ff9500;
  --radius-card: 12px;
  --radius-btn: 8px;
  --radius-small: 6px;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.08), 0 8px 20px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  padding: 12px 0;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

header {
  text-align: center;
  margin-bottom: 20px;
  padding: 16px 0 6px;
}

header h1 {
  font-size: 1.6rem;
  color: var(--text);
  margin-bottom: 6px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.title-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  font-size: 0.7rem;
  font-weight: 500;
  color: #b7791f;
  background: #fef5e7;
  border: 1px solid #f6e05e;
  border-radius: 10px;
  vertical-align: middle;
  position: relative;
  top: -3px;
  letter-spacing: 0.5px;
}

header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.upload-area,
#progressSection,
#errorSection,
#reportSection {
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.upload-area {
  position: relative;
  border: 2px dashed var(--border);
  padding: 24px 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary);
  background: #fafbfc;
  transform: translateY(-2px);
}

.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.upload-area label {
  display: block;
  cursor: pointer;
}

.upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 16px;
  margin: 0 auto 10px;
  background: #e8f1fd;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.upload-text {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 4px;
  font-weight: 600;
}

.upload-hint,
.note {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.usage-note,
.usage-tip {
  font-size: 0.86rem;
  text-align: center;
  color: var(--primary);
  font-weight: 400;
}

footer .note {
  margin-top: 10px;
  padding-top: 10px;
}

.file-info {
  margin-top: 10px;
  color: var(--primary);
  font-size: 0.9rem;
}

.btn-submit,
.btn-back,
.btn-cancel {
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.btn-submit {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 16px auto 0;
  padding: 11px 24px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.25);
}

.btn-submit:hover:not(:disabled),
.btn-back:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 16px rgba(0, 113, 227, 0.35);
}

.btn-submit:active:not(:disabled) {
  background: var(--primary-active);
  transform: scale(0.98);
}

.btn-submit:disabled,
.btn-cancel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-back {
  display: inline-block;
  padding: 8px 18px;
  background: var(--primary);
  color: #fff;
  font-weight: 500;
}

/* ★ 老板 2026-06-30 改造：取消按钮改为 macOS 红实心（系统危险风格）+ 居中 */
.btn-cancel {
  margin-top: 16px;
  margin-left: auto;
  margin-right: auto;
  padding: 9px 22px;
  background: var(--danger);
  color: #fff;
  border: none;
  font-weight: 500;
  display: block;
  box-shadow: 0 2px 6px rgba(255, 59, 48, 0.25);
}

.btn-cancel:hover:not(:disabled) {
  background: var(--danger-hover);
  box-shadow: 0 4px 10px rgba(255, 59, 48, 0.35);
}

.btn-cancel:active:not(:disabled) {
  transform: scale(0.98);
}

#progressSection,
#errorSection,
#reportSection {
  padding: 24px 20px;
}

#progressSection h2 {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 8px;
}

#progressSection > h2 {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
}

.progress-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.progress-meta-item,
.progress-card {
  background: #f5f5f7;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px 14px;
}

.meta-label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.progress-meta-item strong,
.card-title {
  color: var(--text);
}

.progress-meta-item strong {
  display: block;
  font-size: 0.92rem;
  word-break: break-word;
}

.progress-card + .progress-card {
  margin-top: 12px;
}

/* 进度记录列表：往上滚动，最新在顶部 */
/* ============================================================
   ★ 老板 2026-06-29 重写：真·终端命令行进度框（仿 macOS Terminal.app）
   ============================================================ */

/* 整体外壳：圆角 + 深色阴影 + 仿 macOS 窗口样式 */
.terminal-window {
  margin: 14px 0;
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 4px 12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(0, 0, 0, 0.4);
  font-family: "JetBrains Mono", "SF Mono", "Cascadia Code", "Menlo",
               "Consolas", "Source Code Pro", "Monaco", "Courier New", monospace;
  font-size: 0.84rem;
  line-height: 1.6;
  color: #d4d4d4;
}

/* 标题栏（仿 macOS 窗口控制按钮） */
.terminal-titlebar {
  display: flex;
  align-items: center;
  background: #2d2d2d;
  padding: 8px 12px;
  border-bottom: 1px solid #1a1a1a;
  user-select: none;
}

.terminal-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.term-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.term-btn-close { background: #ff5f57; border: 1px solid #e0443e; }
.term-btn-min   { background: #febc2e; border: 1px solid #dea123; }
.term-btn-max   { background: #28c840; border: 1px solid #1aab29; }

/* 标题（命令行提示） */
.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
  color: #a0a0a0;
  letter-spacing: 0.02em;
}
.terminal-user { color: #7ec699; font-weight: 500; }
.terminal-colon { color: #a0a0a0; }
.terminal-path { color: #79b8ff; }
.terminal-dollar { color: #d4d4d4; margin: 0 2px; }
.terminal-cmd { color: #d4d4d4; font-weight: 500; }

/* 右上角时间 */
.terminal-elapsed {
  color: #888;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  min-width: 60px;
  text-align: right;
}

/* 终端主体（黑底） */
.terminal-body {
  background: #0c0c0c;
  padding: 12px 14px 8px;
  min-height: 180px;
  max-height: 320px;
  overflow-y: auto;
  scroll-behavior: smooth;
  /* 自定义滚动条（细、暗色） */
  scrollbar-width: thin;
  scrollbar-color: #3a3a3a #0c0c0c;
}
.terminal-body::-webkit-scrollbar { width: 6px; }
.terminal-body::-webkit-scrollbar-track { background: #0c0c0c; }
.terminal-body::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 3px; }
.terminal-body::-webkit-scrollbar-thumb:hover { background: #555; }

/* 终端输出行 */
.terminal-output {
  display: block;
}

.term-line {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 1px 0;
  white-space: pre-wrap;
  word-break: break-word;
  /* ★ 老板 2026-06-30 改造：删除 term-in 动画（每次 innerHTML 整体重写会让所有行重复触发，造成整块闪烁） */
}

/* 前缀标签（$ / [OK] / [WARN] / [FAIL] / [INFO]） */
.term-prefix-cmd,
.term-prefix-ok,
.term-prefix-warn,
.term-prefix-err,
.term-prefix-info {
  font-weight: 600;
  flex-shrink: 0;
  min-width: 56px;
  font-size: 0.78rem;
}
.term-prefix-cmd  { color: #7ec699; }       /* 绿色 $：命令（备用，前缀已移除） */
.term-prefix-ok   { color: #28c840; }       /* 绿色 [ OK ]：成功（备用，前缀已移除） */
.term-prefix-warn { color: #febc2e; }       /* 黄色 [WARN]：警告（备用，前缀已移除） */
.term-prefix-err  { color: #ff5f57; }       /* 红色 [FAIL]：错误（备用，前缀已移除） */
.term-prefix-info { color: #79b8ff; }       /* 蓝色 [INFO]：信息（备用，前缀已移除） */

/* ★ 老板 2026-06-30 新增：ok 状态追加到文字后方的绿色 OK 标记 */
.term-ok-suffix {
  color: #28c840;
  font-weight: 600;
  margin-left: 6px;
}

/* 时间戳 */
.term-time {
  color: #6e6e6e;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 64px;
}

/* 消息文本 */
.term-text {
  color: #d4d4d4;
  flex: 1;
}

/* 级别颜色（覆盖默认色） */
.term-line-ok   .term-text { color: #d4d4d4; }
.term-line-warn .term-text { color: #febc2e; }
.term-line-err  .term-text { color: #ff7878; }
.term-line-info .term-text { color: #d4d4d4; }
.term-line-cmd  .term-text { color: #d4d4d4; font-weight: 500; }

/* 命令行输入行（底部，永远显示） */
.terminal-inputline {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #1f1f1f;
}

.term-prompt {
  color: #7ec699;
  font-weight: 600;
  user-select: none;
}

/* 闪烁光标 */
.term-cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: #d4d4d4;
  animation: cursor-blink 1s steps(2) infinite;
}

@keyframes cursor-blink {
  0%, 50%   { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

/* 覆盖式进度（不闪动画） */
.term-line.term-stage-ocr-render,
.term-line.term-stage-ocr-upload,
.term-line.term-stage-img-convert,
.term-line.term-stage-text-extract {
  animation: none;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.report-header h1 {
  font-size: 1.2rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 标题前的小色块作为点缀（macOS 系统蓝纯色） */
.report-header h1::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
}

/* 报告区操作按钮组（复制 / 再分析） */
.report-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  background: white;
  color: var(--text);
  white-space: nowrap;
  line-height: 1.2;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-action .btn-icon {
  font-size: 1rem;
  line-height: 1;
  font-weight: 400;
}

.btn-action.btn-secondary {
  border-color: var(--border);
  color: var(--text);
  background: white;
}

.btn-action.btn-secondary:hover:not(:disabled) {
  background: #f5f5f7;
  border-color: var(--text-secondary);
  color: var(--text);
}

.btn-action.btn-secondary:active:not(:disabled) {
  background: #ececef;
  transform: scale(0.97);
}

.btn-action.btn-secondary.copied {
  background: #f0fff4;
  border-color: #30b755;
  color: #1f7a3a;
}

.btn-action.btn-secondary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-action.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(0, 113, 227, 0.22);
}

.btn-action.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 113, 227, 0.32);
}

.btn-action.btn-primary:active {
  transform: translateY(0);
  background: var(--primary-active);
  box-shadow: 0 1px 3px rgba(0, 113, 227, 0.28);
}

.report-plain {
  /* 不使用等宽字体：避免 Courier New / 部分系统中 0 带斜杠的问题 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans CN",
               "Noto Sans CJK SC", sans-serif;
  font-size: 13.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f5f5f7;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 16px 18px;
  color: var(--text);
  overflow-x: auto;
}

.report-footer {
  text-align: center;
  margin-top: 16px;
  padding-top: 12px;
}

.report-footer .note + .note {
  margin-top: 4px;
}

.error-message {
  font-size: 0.95rem;
  color: var(--danger);
  margin: 12px 0 14px;
  padding: 12px 14px;
  background: #fff5f5;
  border-left: 3px solid var(--danger);
  border-radius: 6px;
}

.error-hint-wrap {
  margin-top: 12px;
  padding: 12px 14px;
  background: #fffaf0;
  border-left: 3px solid #ed8936;
  border-radius: 6px;
}

.error-hint-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #c05621;
  margin-bottom: 6px;
}

.error-hint {
  font-size: 0.9rem;
  color: #744210;
  line-height: 1.5;
}

details {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f5f5f7;
  border-radius: 8px;
}

details summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
  font-size: 0.85rem;
}

details pre {
  margin-top: 10px;
  padding: 10px;
  background: #1a202c;
  color: #e2e8f0;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

footer {
  margin: 18px 0 12px;
  text-align: center;
}

.hidden,
[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .container {
    padding: 0 12px;
  }

  header h1 {
    font-size: 1.35rem;
  }

  .progress-meta {
    grid-template-columns: 1fr;
  }

  .progress-info,
  .report-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .report-header h1 {
    font-size: 1.1rem;
  }

  .report-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .btn-action {
    justify-content: center;
    padding: 9px 10px;
  }

  .progress-info {
    align-items: center;
  }

  #progressSection,
  #errorSection,
  #reportSection {
    padding: 18px 14px;
  }

/* ========== 微信端上传选择面板（底部弹窗）========== */
.upload-chooser-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: upload-chooser-fade-in 0.2s ease;
}

@keyframes upload-chooser-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.upload-chooser {
  background: #fff;
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 500px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.upload-chooser-title {
  text-align: center;
  font-size: 13px;
  color: #888;
  padding: 8px 0 12px;
}

.upload-chooser-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text);
  border: none;
  border-radius: 12px;
  background: #f5f5f7;
  margin-bottom: 8px;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}

.upload-chooser-btn:active {
  background: #ececef;
}

.upload-chooser-btn-icon {
  font-size: 20px;
  margin-right: 12px;
  line-height: 1;
}

.upload-chooser-btn-text {
  flex: 1;
}

.upload-chooser-cancel {
  background: #fff;
  border: 1px solid var(--border-light);
  color: var(--text);
  margin-top: 4px;
  justify-content: center;
}

.upload-chooser-cancel .upload-chooser-btn-icon,
.upload-chooser-cancel .upload-chooser-btn-text {
  margin: 0;
  text-align: center;
  flex: 0;
}

@media (min-width: 600px) {
  .upload-chooser-mask {
    align-items: center;
  }
  .upload-chooser {
    border-radius: 16px;
    margin: 16px;
  }
}

  .upload-area {
    padding: 20px 14px;
  }
}

/* ============================================================
   ★ 老板 2026-06-30 新增：“原始本文”按钮 + markdown 弹窗
   ============================================================ */

/* 报告底部那行里的内联按钮（“AI 生成仅供参考” 后面的“原始本文”） */
.btn-inline-secondary {
  margin-left: 8px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--primary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  cursor: pointer;
  vertical-align: baseline;
  font-family: inherit;
  transition: all 0.15s ease;
}

.btn-inline-secondary:hover {
  background: #e8f1fd;
  border-color: var(--primary);
}

.btn-inline-secondary:active {
  transform: scale(0.97);
}

/* Modal 遮罩（黑色半透明 + 居中） */
.raw-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: raw-modal-fade-in 0.2s ease;
}

@keyframes raw-modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Modal 卡片（macOS 风：白底 + 圆角 + 阴影） */
.raw-modal {
  background: var(--card);
  border-radius: var(--radius-card);
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-hover);
  animation: raw-modal-zoom-in 0.2s ease;
}

@keyframes raw-modal-zoom-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.raw-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.raw-modal-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.raw-modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.raw-modal-close:hover {
  background: #ececef;
  color: var(--text);
}

.raw-modal-body {
  padding: 16px 20px;
  margin: 0;
  font-family: "JetBrains Mono", "SF Mono", "Cascadia Code", "Menlo",
               "Consolas", "Source Code Pro", "Monaco", "Courier New", monospace;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  background: #f5f5f7;
  border-bottom-left-radius: var(--radius-card);
  border-bottom-right-radius: var(--radius-card);
  min-height: 200px;
}

/* --- 底部 3 个链接（macOS 系统色风格，2026-07-09 重新设计） --- */
footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 18px;
  margin: 16px 0 12px;
  padding: 0;
}
footer .footer-link {
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  padding: 4px 0;
  transition: color 0.15s ease;
}
footer .footer-link:hover,
footer .footer-link:focus {
  color: var(--primary);
}
footer .footer-link.footer-link-icp {
  color: var(--text-secondary);
  opacity: 0.7;
  font-size: 12px;
}
footer .footer-link.footer-link-icp:hover {
  opacity: 1;
}

/* ============================================================
   底部"意见反馈"弹窗（移植自 dkjsq，2026-07-09）
   ============================================================ */
.contact-modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  box-sizing: border-box;
}
.contact-modal-show {
  visibility: visible;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 1;
}
.contact-modal-content {
  background: var(--card);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 420px;
  position: relative;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  border: 1px solid rgba(255,255,255,0.8);
  box-sizing: border-box;
}
.contact-modal-show .contact-modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.mail-brand { text-align: center; margin-bottom: 1.5rem; }
.mail-brand h1 {
  font-size: 1.25rem;
  margin: 0;
  color: var(--primary);
  font-weight: 600;
}
.input-area { display: grid; gap: 15px; transition: opacity 0.3s; }
.field { display: grid; gap: 8px; }
.textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  font-size: 14px;
  outline: none;
  background: #f9f9f9;
  font-family: inherit;
  resize: vertical;
  transition: all 0.2s;
  box-sizing: border-box;
}
.textarea:focus {
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}
.actions { display: flex; gap: 12px; justify-content: center; margin-top: 10px; }
.btn {
  padding: 10px 24px;
  border: 0;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
  min-width: 100px;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.25);
}
.btn-primary:hover {
  box-shadow: 0 6px 16px rgba(0, 113, 227, 0.35);
  transform: translateY(-1px);
}
.btn-secondary {
  background: #f0f2f5;
  color: #555;
}
.btn-secondary:hover {
  background: #e4e6eb;
  color: #333;
}
.note { text-align: center; color: var(--text-secondary); font-size: 12px; margin-top: 10px; }
.status-area {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  animation: fadeIn 0.3s forwards;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid #eef2ff;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 15px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.checkmark {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: #fff;
  stroke-miterlimit: 10;
  margin-bottom: 15px;
  box-shadow: inset 0 0 0 #10b981;
  animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}
.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: #10b981;
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}
@keyframes stroke { 100% { stroke-dashoffset: 0; } }
@keyframes scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.1, 1.1, 1); } }
@keyframes fill { 100% { box-shadow: inset 0 0 0 30px #10b981; } }
.status-text { font-size: 15px; color: var(--text); font-weight: 500; margin-bottom: 20px; }
.hidden { display: none !important; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
