/* =========================================================
   指针式时钟（取自 Material You NewTab，颜色改用 mdui 令牌）
   ========================================================= */
.analog-clock {
  width: min(240px, 54vw);
  aspect-ratio: 1 / 1;
  position: relative;
  margin: 0 auto 6px;
  display: none;                 /* 由开关控制显隐（默认启用） */
}
.analog-clock.enabled { display: block; }
#analogClock.enabled { cursor: pointer; }   /* 首页点击指针时钟可进入大界面 */
.analog-clock svg.ac-bg {
  width: 100%; height: 100%;
  display: block;
  position: absolute; inset: 0;
}
/* 花瓣背景：浅色用主色浅色调，深色用深色调，随主题自适应 */
.ac-petal {
  fill: rgb(var(--mdui-color-primary-container));
}
:root:not(.mdui-theme-light):not(.mdui-theme-dark) .ac-petal { fill: rgb(var(--mdui-color-primary-container)); }
html.mdui-theme-dark .ac-petal { fill: rgb(var(--mdui-color-primary-container)); }

.analog-clock .ac-center {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 20px; height: 20px;
}
.analog-clock .ac-hand {
  position: absolute;
  left: 0;
  width: 20px;
  height: 100px;
  background-color: rgb(var(--mdui-color-on-primary-container));
  top: -90px;
  transform-origin: bottom center;
  border-radius: 10px;
}
.ac-hour {
  height: 80px !important;
  top: -70px !important;
  background-color: rgb(var(--mdui-color-primary)) !important;
}
/* 轴心旁不再叠加短棒：原先 ::after 会在中心侧面形成小突起 */
.ac-hour::after,
.ac-minute::after { display: none; }
/* 分针加长并越过轴心，让中心定位点被自身盖住；轴心仍严格在表盘中心 */
.analog-clock .ac-minute {
  z-index: 3;
  height: 110px !important;
  transform-origin: center 100px;
}
.ac-second { background-color: transparent !important; z-index: 4; }
.ac-second::after {
  content: ""; position: absolute;
  left: 0;
  width: 20px; height: 20px;
  background-color: rgb(var(--mdui-color-primary));
  top: 2px; border-radius: 100%;   /* 向轴心内移约1.5个点长(30px)，避免溢出花瓣 */
}
/* 中心轴点压在分针之下，由加长后的分针自然遮盖 */
.ac-pin {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgb(var(--mdui-color-on-primary-container));
  z-index: 2;
}
/* 焦点大时间界面里的指针时钟：直接复用首页 .analog-clock 的样式与驱动。
   不要单独放大容器——花瓣 SVG 会跟着放大，但指针是固定 px 尺寸，
   比例会错位（指针显短、秒针圆点脱离），所以此处不做任何尺寸覆盖。 */

/* =========================================================
   标准样式时钟（移植自 exam-dashboard.html）
   - 刻度、数字、日期与指针均为 SVG，随容器等比缩放
   - 表盘数字与日期数字统一使用 XiaolaiMono，与倒计时数字字体一致
   ========================================================= */
.round-clock-wrap {
  display: none;                 /* 由时钟样式设置控制显隐 */
  justify-content: center;
  margin: 0 auto 6px;
  cursor: pointer;
}
.round-clock-wrap.enabled { display: flex; }
#standardClock.enabled { cursor: pointer; }
.round-clock {
  width: min(260px, 58vw);
  aspect-ratio: 1;
  display: block;
  border-radius: 50%;
  background: rgb(var(--mdui-color-surface-container));
  filter: drop-shadow(0 8px 14px rgb(var(--mdui-color-on-surface) / .10));
}
.clock-face-border {
  fill: rgb(var(--mdui-color-surface-container));
  stroke: rgb(var(--mdui-color-outline));
  stroke-width: 5;
}
.clock-tick { stroke: rgb(var(--mdui-color-outline)); stroke-width: 1.2; stroke-linecap: round; }
.clock-tick.major { stroke: rgb(var(--mdui-color-on-surface-variant)); stroke-width: 1.8; }
.clock-number {
  fill: rgb(var(--mdui-color-on-surface));
  font-size: 32px;
  font-weight: 400;
  font-family: 'XiaolaiMono', 'Consolas', 'Menlo', monospace;
  font-variant-numeric: tabular-nums;
  text-anchor: middle;
  dominant-baseline: middle;
}
.clock-date {
  fill: rgb(var(--mdui-color-on-surface-variant));
  font-size: 18px;
  font-weight: 400;
  font-family: 'XiaolaiMono', 'Consolas', 'Menlo', monospace;
  font-variant-numeric: tabular-nums;
  text-anchor: middle;
  dominant-baseline: middle;
}
.clock-hour { stroke: rgb(var(--mdui-color-on-surface)); stroke-width: 7; stroke-linecap: round; }
.clock-minute { stroke: rgb(var(--mdui-color-on-surface)); stroke-width: 5; stroke-linecap: round; }
.clock-second { stroke: rgb(var(--mdui-color-error)); stroke-width: 2; stroke-linecap: round; }
.clock-pin-outer {
  fill: rgb(var(--mdui-color-surface-container));
  stroke: rgb(var(--mdui-color-error));
  stroke-width: 2;
}
/* 时钟样式分段按钮：长标签缩小字号，避免换行 */
.clock-style-segmented mdui-segmented-button {
  --mdui-comp-segmented-button-label-font-size: 12px;
}

