/* ============================================================
   看板样式 —— 双目标：Chrome 81 (平板) + Chromium 33 (4.4 WebView)
   红线：不用 CSS 变量 / 不用 grid / 不用 flex gap / 不用 clamp()
   基准：1024 x 768 CSS px（2048x1536 @ DPR2），横屏
   ============================================================ */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #0d1014;
  color: #e8edf3;
  font-family: "Noto Sans CJK SC", "Source Han Sans SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

.root {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 26px 30px 18px 30px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-transition: -webkit-transform 0.8s ease;
  transition: transform 0.8s ease;
}

/* ---------------- 上半：时钟 + 天气 ---------------- */
.top {
  height: 268px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  -webkit-align-items: flex-start;
  align-items: flex-start;
}

.clock-col {
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  padding-top: 6px;
}

.clock {
  font-size: 150px;
  line-height: 0.92;
  font-weight: 200;
  letter-spacing: -4px;
  color: #f2f6fa;
}

.date {
  margin-top: 14px;
  font-size: 34px;
  font-weight: 400;
  color: #7d8b9e;
  letter-spacing: 1px;
}

.wx-col {
  width: 420px;
  -webkit-flex: 0 0 420px;
  flex: 0 0 420px;
  text-align: right;
}

.wx-main {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: flex-end;
  justify-content: flex-end;
}

.wx-icon {
  width: 92px;
  height: 92px;
  color: #ffb457;
  margin-right: 10px;
  -webkit-flex: 0 0 92px;
  flex: 0 0 92px;
}
.wx-icon svg { display: block; width: 100%; height: 100%; }

.wx-temp {
  font-size: 104px;
  line-height: 1;
  font-weight: 200;
  letter-spacing: -2px;
  color: #f2f6fa;
}

.wx-side {
  margin-left: 16px;
  text-align: left;
}

.wx-desc {
  font-size: 30px;
  color: #c8d3e0;
  white-space: nowrap;
}

.wx-aqi {
  margin-top: 8px;
  font-size: 24px;
  color: #7d8b9e;
  white-space: nowrap;
}
.wx-aqi .aqi-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 6px;
  background: #63d18a;
  margin-right: 8px;
  vertical-align: 1px;
}

.wx-hours {
  margin-top: 26px;
  height: 108px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  -webkit-justify-content: flex-end;
  justify-content: flex-end;
  -webkit-align-items: flex-end;
  align-items: flex-end;
}

.hbar {
  width: 44px;
  margin-left: 6px;
  text-align: center;
  -webkit-flex: 0 0 44px;
  flex: 0 0 44px;
}

.hbar .hbar-t {
  font-size: 20px;
  color: #aab6c6;
  line-height: 24px;
}

.hbar .hbar-bar-wrap {
  height: 52px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: flex-end;
  justify-content: flex-end;
}

.hbar .hbar-bar {
  width: 100%;
  background: #2c3a4b;
  border-radius: 3px;
}
.hbar.hot .hbar-bar { background: #5a3f2e; }
.hbar .hbar-h {
  font-size: 18px;
  color: #5f6d7e;
  line-height: 26px;
}

/* ---------------- 中部：待办 + 消息 ---------------- */
.mid {
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-height: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  padding-top: 22px;
  border-top: 1px solid #1b2430;
  margin-top: 4px;
}

.panel {
  -webkit-flex: 1 1 0;
  flex: 1 1 0;
  min-width: 0;
  padding-right: 34px;
  overflow: hidden;
}

.panel-r {
  border-left: 1px solid #1b2430;
  padding-left: 34px;
  padding-right: 0;
}

.panel-head {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: baseline;
  align-items: baseline;
  margin-bottom: 18px;
}

.panel-title {
  font-size: 26px;
  font-weight: 500;
  color: #8b98a9;
  letter-spacing: 2px;
}

.panel-meta {
  margin-left: 12px;
  font-size: 22px;
  color: #4f5c6b;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 待办 */
.todo-item {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  padding: 0 0 0 14px;
  margin-bottom: 16px;
  border-left: 4px solid #2a3441;
  min-height: 40px;
}

.todo-badge {
  -webkit-flex: 0 0 26px;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  margin-right: 16px;
  border: 3px solid #3d4a5a;
  border-radius: 6px;
  box-sizing: border-box;
}

.todo-title {
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  font-size: 31px;
  color: #dfe7ef;
  line-height: 1.28;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.todo-time {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  margin-left: 14px;
  font-size: 26px;
  color: #7d8b9e;
  font-variant-numeric: tabular-nums;
}

.todo-item.done .todo-badge {
  background: #2f4a3a;
  border-color: #2f4a3a;
}
.todo-item.done .todo-title {
  color: #5f6d7e;
  text-decoration: line-through;
}
.todo-item.overdue { border-left-color: #e05b5b; }
.todo-item.overdue .todo-time { color: #e05b5b; }
.todo-item.overdue .todo-badge { border-color: #e05b5b; }

.todo-item.t-high { border-left-color: #e05b5b; }
.todo-item.t-work { border-left-color: #4d8fd6; }
.todo-item.t-errand { border-left-color: #4fa87a; }
.todo-item.t-life { border-left-color: #b07dd6; }

.empty {
  font-size: 26px;
  color: #3f4b59;
  padding: 4px 0 0 2px;
}

/* 消息 */
.notice {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: baseline;
  align-items: baseline;
  margin-bottom: 15px;
  font-size: 27px;
  line-height: 1.3;
}

.notice-src {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  font-size: 22px;
  color: #6f7d8e;
  background: #171f29;
  border-radius: 5px;
  padding: 3px 9px;
  margin-right: 12px;
}

.notice-text {
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  color: #d7e0ea;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.notice-age {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  margin-left: 12px;
  font-size: 21px;
  color: #4f5c6b;
}

.notice.fresh .notice-src {
  background: #3a2a10;
  color: #ffb457;
}
.notice.fresh .notice-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: #ffb457;
  margin-right: 10px;
  vertical-align: 2px;
  -webkit-animation: blink 2.4s ease-in-out infinite;
  animation: blink 2.4s ease-in-out infinite;
}

@-webkit-keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

/* ---------------- 底部 ---------------- */
.bottom {
  height: 56px;
  -webkit-flex: 0 0 56px;
  flex: 0 0 56px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  border-top: 1px solid #1b2430;
  margin-top: 12px;
}

.next-up {
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  font-size: 27px;
  color: #9fadbe;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.next-up b {
  color: #ffb457;
  font-weight: 500;
}

.status {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  font-size: 20px;
  color: #3f4b59;
  letter-spacing: 0.5px;
}
.status.offline { color: #8a5a2a; }

/* ---------------- 夜间模式：23:00-07:00 ---------------- */
body.night { background: #000; }
body.night .root { padding: 0; }
body.night .top { height: 100%; }
body.night .wx-col,
body.night .mid,
body.night .bottom,
body.night .date {
  display: none;
}
body.night .clock-col {
  -webkit-align-self: center;
  align-self: center;
  margin: auto;
  text-align: center;
}
body.night .clock {
  font-size: 64px;
  font-weight: 200;
  letter-spacing: 2px;
  color: #2e3a48;
}
