/* ── 语言切换：CSS 驱动，无闪烁 ── */
html.lang-zh [data-lang="ja"] { display: none !important; }
html.lang-ja [data-lang="zh"] { display: none !important; }

/* ── CSS 变量（全局共享） ── */
:root {
  --primary:    #1A3D6B;
  --primary-l:  #2C5F8A;
  --primary-d:  #0E2540;
  --accent:     #E8A838;
  --accent-l:   #F5C355;
  --green:      #1D8A4E;
  --green-bg:   #E6F7EE;
  --red:        #C92B2B;
  --blue:       #3A82C4;
  --bg:         #F0F2F5;
  --surface:    #FFFFFF;
  --surface2:   #F5F7FA;
  --border:     #DEE2E8;
  --text:       #111827;
  --text2:      #4B5563;
  --text3:      #9CA3AF;
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.06);
  --shadow:     0 4px 20px rgba(0,0,0,0.09);
  --shadow-lg:  0 12px 48px rgba(0,0,0,0.14);
  --radius:     12px;
  --radius-sm:  8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
html.lang-ja body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
}
a { text-decoration: none; color: inherit; }

/* 锁定日文时隐藏选择框（与 lang.js 的 LOCK_LANG_TO_JA 配套；恢复切换时删本规则） */
html.lang-ja-only .lang-switch {
  display: none !important;
}

/* ── 语言下拉（各页顶栏位置不变） ── */
.lang-switch {
  position: relative;
  flex-shrink: 0;
}
.lang-switch::after {
  content: '▾';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 10px;
  line-height: 1;
}
.lang-select {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 28px 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  letter-spacing: 0.3px;
  transition: background 0.18s, border-color 0.18s;
}
.lang-select:hover,
.lang-select:focus {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}
.lang-select option {
  color: var(--text);
  background: #fff;
}

/* ── 应用顶栏（/welcome、/client、/tasks 共用）────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--primary);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}
.app-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
}
.app-header-inner--fluid {
  max-width: none;
}
.app-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.app-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  flex-shrink: 0;
}
.app-logo-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.app-logo--static {
  cursor: default;
}

/* ── 页脚免责链接 + 模态 ── */
body.disclaimer-lock { overflow: hidden; }

.site-footer-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  column-gap: 24px;
}
.site-footer-end {
  grid-column: 3;
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  width: max-content;
  max-width: 100%;
}
.site-footer-copy,
.site-footer-link {
  font-size: 13px;
  line-height: 1.5;
}
.site-footer-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.45);
  text-align: right;
}
.lp-footer { background: #0A1C31; padding: 44px 40px; }
.site-footer-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 18px;
  width: max-content;
  max-width: 100%;
}
.site-footer-link {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer-link:hover,
.site-footer-link:focus-visible {
  color: rgba(255, 255, 255, 0.92);
  outline: none;
}

.disclaimer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(14, 37, 64, 0.48);
  backdrop-filter: blur(3px);
}
.disclaimer-overlay.open { display: flex; }

.disclaimer-modal {
  width: 640px;
  max-width: 100%;
  max-height: min(86vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}

.disclaimer-modal-header {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.disclaimer-modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--primary-d);
}

.disclaimer-modal-body {
  padding: 18px 24px 8px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.disclaimer-modal-body h3 {
  margin: 0 0 8px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--primary);
}
.disclaimer-modal-body p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text2);
}

.disclaimer-modal-footer {
  padding: 14px 24px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}
.disclaimer-modal-ok {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
}
.disclaimer-modal-ok:hover,
.disclaimer-modal-ok:focus-visible {
  background: var(--primary-l);
  outline: none;
}

/* 联系我们弹窗：沿用遮罩，外观与首页深蓝 / 金色对齐 */
.contact-modal { width: 480px; }
.contact-modal-header {
  padding: 26px 28px 22px;
  background: linear-gradient(135deg, var(--primary-d) 0%, var(--primary) 62%, var(--primary-l) 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}
.contact-modal-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
}
.contact-modal-body {
  padding: 26px 28px 8px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-mail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.contact-mail-addr {
  min-width: 0;
  color: var(--primary);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.contact-mail-addr:hover,
.contact-mail-addr:focus-visible {
  color: var(--primary-l);
  outline: none;
}
.contact-mail-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--primary-d);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.contact-mail-btn:hover,
.contact-mail-btn:focus-visible {
  background: var(--accent-l);
  outline: none;
}

/* 导出成功弹窗：复用联系弹窗外观，仅补文件名与正文段落 */
.export-done-file {
  margin: 0;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-d);
  overflow-wrap: anywhere;
}
.export-done-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text2);
}

@media (max-width: 900px) {
  .lp-footer { padding: 40px 24px; }
  .site-footer-bar {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .site-footer-end {
    align-self: flex-end;
  }
}
@media (max-width: 420px) {
  .contact-mail { flex-wrap: wrap; }
}
