:root {
  --ink-green-dark: #1a3d2e;
  --ink-green: #2d5a4a;
  --ink-green-light: #3d7a5e;
  --ink-gold: #c4a265;
  --ink-gold-light: #d4b87a;
  --ink-paper: #faf7f2;
  --ink-paper-trans: rgba(250, 247, 242, 0.92);
  --ink-text: #2c2c2c;
  --ink-text-secondary: #6b6b6b;
  --ink-border: rgba(196, 162, 101, 0.28);
}

/* 水墨宣纸背景图 */
body {
  background:
    linear-gradient(180deg, rgba(247, 243, 235, 0.78) 0%, rgba(237, 230, 216, 0.82) 60%, rgba(232, 224, 212, 0.86) 100%),
    url("../images/bg-ink-new.jpg") center top / cover no-repeat fixed;
  min-height: 100vh;
}

/* 水墨装饰 SVG */
.ink-decor {
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

.decor-cloud-top {
  top: 0;
  left: 0;
  width: 280px;
  height: auto;
}

.decor-mountain-bottom {
  bottom: 0;
  right: 0;
  width: 360px;
  height: auto;
}

@media (max-width: 768px) {
  .decor-cloud-top { width: 160px; }
  .decor-mountain-bottom { width: 200px; }
}

/* 手机框内背景增强 */
.page-ink-bg {
  background:
    linear-gradient(180deg, rgba(250, 247, 242, 0.45) 0%, rgba(240, 235, 227, 0.85) 100%),
    var(--bg);
  border-radius: 48px;
}

.page-ink-bg-image {
  opacity: 0.35;
  border-radius: 48px;
}

.page-ink-bg-overlay {
  height: 120px;
  background: linear-gradient(to top, rgba(240, 235, 227, 0.98), rgba(240, 235, 227, 0.7), transparent);
  border-radius: 0 0 48px 48px;
}

.container {
  padding: 42px 16px 16px;
}

.top-bar {
  padding: 12px 16px 0;
}

/* 今日日期栏：墨绿卷轴 + 祥云 */
.current-date-bar {
  position: relative;
  background: linear-gradient(135deg, rgba(26, 61, 46, 0.88), rgba(45, 90, 74, 0.78));
  border: 1px solid rgba(196, 162, 101, 0.35);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(26, 61, 46, 0.18);
  overflow: hidden;
  color: #fff;
}

.current-date-bar::before,
.current-date-bar::after {
  content: '';
  position: absolute;
  width: 64px;
  height: 32px;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.22;
}

.current-date-bar::before {
  top: -4px;
  left: -4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 32'%3E%3Cpath d='M4 24c8-10 20-12 30-6s20 4 26-6' fill='none' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E");
}

.current-date-bar::after {
  bottom: -4px;
  right: -4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 32'%3E%3Cpath d='M4 12c8 8 20 10 30 4s20-6 26 4' fill='none' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E");
}

.current-date-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 3px 0;
  position: relative;
  z-index: 1;
}

.current-date-label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  letter-spacing: 1px;
}

.current-date-value {
  color: #fff;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.current-date-ganzhi {
  color: var(--ink-gold-light);
  font-weight: 700;
  letter-spacing: 1px;
}

/* 品牌区 */
.brand-header {
  text-align: center;
  padding: 6px 0 12px;
}

.brand-logo {
  width: 56px;
  height: 56px;
  line-height: 52px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ink-green), var(--ink-green-light));
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  border: 2px solid var(--ink-gold);
  box-shadow:
    0 0 0 3px rgba(196, 162, 101, 0.15),
    0 5px 14px rgba(26, 61, 46, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.brand-title {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-green-dark);
  letter-spacing: 4px;
  margin-bottom: 4px;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--ink-text-secondary);
  letter-spacing: 2px;
}

/* 表单卡片 */
.form-card {
  background: var(--ink-paper-trans);
  border: 1px solid var(--ink-border);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(26, 61, 46, 0.08);
  padding: 4px 16px 8px;
  margin-bottom: 10px;
  position: relative;
}

.form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ink-gold), transparent);
  opacity: 0.6;
}

.form-card .form-item {
  display: flex;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid rgba(196, 162, 101, 0.18);
}

.form-card .form-item:last-child {
  border-bottom: none;
}

.form-label {
  width: 76px;
  color: var(--ink-text-secondary);
  font-size: 13px;
  flex-shrink: 0;
  letter-spacing: 1px;
}

.form-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--ink-text);
  outline: none;
  font-family: inherit;
  text-align: right;
}

.form-input::placeholder {
  color: #b0a99a;
}

/* 分段选择器：胶囊式，宽度贴合内容并靠右 */
.segmented {
  display: inline-flex;
  flex: 0 0 auto;
  margin-left: auto;
  background: rgba(26, 61, 46, 0.05);
  border-radius: 20px;
  padding: 3px;
  border: 1px solid rgba(196, 162, 101, 0.18);
}

.seg-item {
  min-width: 64px;
  padding: 6px 16px;
  text-align: center;
  border-radius: 17px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink-text-secondary);
  transition: all 0.2s;
  letter-spacing: 1px;
  white-space: nowrap;
}

.seg-item.active {
  background: linear-gradient(135deg, var(--ink-green), var(--ink-green-light));
  color: #fff;
  box-shadow: 0 2px 8px rgba(26, 61, 46, 0.22);
  border: 1px solid rgba(196, 162, 101, 0.35);
}

/* 选择值 */
.picker-value {
  flex: 1;
  text-align: right;
  color: var(--ink-text);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  cursor: pointer;
}

.picker-value .arrow {
  color: var(--ink-text-secondary);
  font-size: 13px;
}

/* 开关 */
.switch-wrap {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.switch-wrap input[type="checkbox"] {
  width: 46px;
  height: 26px;
  appearance: none;
  background: #ccc;
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  outline: none;
}

.switch-wrap input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.switch-wrap input[type="checkbox"]:checked {
  background: var(--ink-green);
}

.switch-wrap input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

/* 免责声明 */
.disclaimer-bar {
  text-align: center;
  color: var(--ink-text-secondary);
  font-size: 10px;
  padding: 2px 0 10px;
  letter-spacing: 1px;
  opacity: 0.85;
}

/* 提交按钮 */
.submit-btn-wrap {
  padding: 0 0 16px;
}

.submit-btn {
  background: linear-gradient(135deg, var(--ink-green-dark), var(--ink-green));
  color: #fff;
  border-radius: 28px;
  height: 44px;
  line-height: 44px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 4px;
  box-shadow: 0 6px 18px rgba(26, 61, 46, 0.28);
  cursor: pointer;
  border: 1px solid rgba(196, 162, 101, 0.4);
  display: block;
  width: 100%;
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(26, 61, 46, 0.32);
}

.submit-btn:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(26, 61, 46, 0.22);
}

/* 顶部语言切换 */
.top-bar {
  padding: 10px 16px;
}

.lang-switch {
  display: inline-flex;
  background: rgba(250, 247, 242, 0.92);
  border: 1px solid var(--ink-border);
  border-radius: 20px;
  overflow: hidden;
}

.lang-btn {
  width: 58px;
  padding: 5px 0;
  font-size: 12px;
  color: var(--ink-text-secondary);
  text-align: center;
  border: none;
  background: transparent;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--ink-green);
  color: #fff;
}

/* 页脚 */
.page-footer {
  text-align: center;
  padding: 12px 16px 30px;
  color: var(--ink-text-secondary);
  font-size: 10px;
  opacity: 0.75;
}

.page-footer a {
  color: var(--ink-green);
  text-decoration: none;
}

/* 文章侧边栏卡片微调 */
.article-sidebar-title {
  display: block;
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--ink-green-dark);
  margin-bottom: 16px;
  text-align: center;
}

.article-card {
  border-radius: 12px;
  border: 1px solid var(--ink-border);
  background: var(--ink-paper-trans);
}

.article-card-title {
  font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
  font-size: 14px;
  color: var(--ink-green-dark);
}

/* 位置模态框保持 */
.location-tabs {
  display: inline-flex;
  background: rgba(26, 61, 46, 0.05);
  border-radius: 20px;
  padding: 3px;
  margin-bottom: 4px;
  border: 1px solid rgba(196, 162, 101, 0.18);
}

.location-tab {
  padding: 6px 18px;
  border-radius: 17px;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink-text-secondary);
  transition: all 0.2s;
}

.location-tab.active {
  background: #fff;
  color: var(--ink-text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

.location-search {
  display: flex;
  align-items: center;
  background: rgba(26, 61, 46, 0.04);
  border-radius: 20px;
  padding: 8px 12px;
  margin: 12px 0;
  border: 1px solid rgba(196, 162, 101, 0.15);
}

.location-search-icon {
  color: var(--ink-text-secondary);
  font-size: 18px;
  margin-right: 8px;
}

.location-search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink-text);
}

.location-search-results {
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 8px;
}

.location-search-results.hidden {
  display: none;
}

.location-result-item {
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-text);
}

.location-result-item:active {
  background: rgba(26, 61, 46, 0.04);
}

.location-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--ink-text-secondary);
  font-size: 13px;
}

.location-picker {
  display: flex;
  height: 220px;
  overflow: hidden;
  gap: 4px;
  margin: 8px -8px 0;
}

.location-picker.two-column .picker-column-wrap {
  flex: 1;
}

.picker-column-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.picker-column-label {
  text-align: center;
  color: var(--ink-text-secondary);
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.picker-column {
  flex: 1;
  text-align: center;
  overflow-y: auto;
  scrollbar-width: none;
}

.picker-column::-webkit-scrollbar {
  display: none;
}

.picker-item {
  padding: 10px 4px;
  font-size: 14px;
  color: var(--ink-text);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.picker-item.selected {
  color: var(--ink-green);
  font-weight: 700;
  background: rgba(26, 61, 46, 0.06);
  border-radius: 6px;
}

.location-summary-bar {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background: rgba(26, 61, 46, 0.04);
  border-radius: var(--radius);
  margin-top: 12px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid rgba(196, 162, 101, 0.15);
}

.location-summary-bar .unknown {
  color: var(--ink-text-secondary);
}

.location-confirm-wrap {
  margin-top: 12px;
}

.location-confirm-btn {
  height: 44px;
  line-height: 44px;
  font-size: 15px;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--ink-green-dark), var(--ink-green));
  border-radius: 22px;
  border: 1px solid rgba(196, 162, 101, 0.35);
}

/* 时区信息 */
.timezone-info {
  margin-top: 8px;
  padding: 10px;
  background: rgba(26, 61, 46, 0.03);
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink-text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid rgba(196, 162, 101, 0.12);
}

.timezone-info strong {
  color: var(--ink-text);
}

/* 日期时间选择器 */
.datetime-picker {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.datetime-picker select {
  padding: 6px 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  min-width: 0;
  color: var(--ink-text);
}

.time-picker {
  display: flex;
  height: 240px;
  gap: 4px;
  margin: 8px -8px 0;
}

.wheel-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.wheel-label {
  text-align: center;
  font-size: 13px;
  color: var(--ink-text-secondary);
  padding: 6px 0;
  letter-spacing: 1px;
}

.wheel-viewport {
  height: 200px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
  mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
}

.wheel-viewport::-webkit-scrollbar {
  display: none;
}

.wheel-items {
  padding: 77px 0; /* (viewport 200 - item 46) / 2 */
}

.wheel-item {
  height: 46px;
  line-height: 46px;
  text-align: center;
  scroll-snap-align: center;
  font-size: 17px;
  color: #b8b0a0;
  transition: all 0.15s;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wheel-item.active {
  color: var(--ink-text);
  font-size: 20px;
  font-weight: 600;
}

.time-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.btn-time-cancel,
.btn-time-confirm {
  flex: 1;
  height: 44px;
  line-height: 44px;
  border-radius: 22px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  letter-spacing: 2px;
}

.btn-time-cancel {
  background: rgba(26, 61, 46, 0.06);
  color: var(--ink-green);
  border: 1px solid rgba(26, 61, 46, 0.18);
}

.btn-time-confirm {
  background: linear-gradient(135deg, var(--ink-green-dark), var(--ink-green));
  color: #fff;
  box-shadow: 0 4px 12px rgba(26, 61, 46, 0.25);
}

@media (max-width: 400px) {
  .datetime-picker {
    gap: 4px;
  }
  .datetime-picker select {
    padding: 4px 2px;
    font-size: 13px;
  }
  .time-picker {
    gap: 2px;
    margin: 8px -12px 0;
  }
  .wheel-item {
    font-size: 15px;
  }
  .wheel-item.active {
    font-size: 18px;
  }
  .brand-title {
    font-size: 22px;
    letter-spacing: 3px;
  }
  .seg-item {
    min-width: 56px;
    padding: 6px 12px;
  }
}

/* 文章详情 iframe 容器 */
.article-frame-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 48px;
  overflow: hidden;
}

.article-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: transparent;
}

body.article-frame-open .page-ink-bg {
  overflow: hidden !important;
}

/* 侧边栏底部广告容器 */
.ad-sidebar-bottom {
  margin-top: 8px;
  padding: 10px;
  min-height: 55px;
  background: rgba(250, 247, 242, 0.92);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 1199px) {
  .ad-sidebar-bottom {
    display: none;
  }
}
