:root {
  color-scheme: light;
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans SC",
    system-ui,
    sans-serif;
  background: #eef2f6;
  color: #17202a;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.app {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 76px;
  overflow: hidden;
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    repeating-linear-gradient(0deg, transparent 0, transparent 39px, #dce4ec 40px),
    repeating-linear-gradient(90deg, transparent 0, transparent 39px, #dce4ec 40px);
  overflow: hidden;
}

#demoCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.timeBadge {
  position: absolute;
  top: clamp(14px, 1.6vw, 28px);
  right: clamp(18px, 2.4vw, 44px);
  display: grid;
  gap: 2px;
  min-width: clamp(132px, 9vw, 178px);
  padding: 10px 16px;
  border: 1px solid #c7d4df;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(38, 56, 73, 0.12);
  text-align: right;
}

.timeBadge span {
  font-size: 13px;
  color: #5e6d7c;
}

.timeBadge strong {
  font-size: clamp(28px, 2.2vw, 42px);
  line-height: 1;
  color: #0f766e;
  font-variant-numeric: tabular-nums;
}

.controls {
  display: grid;
  grid-template-columns: 132px 132px 132px minmax(260px, 1fr);
  align-items: center;
  gap: 14px;
  height: 76px;
  padding: 12px clamp(22px, 4vw, 72px);
  border-top: 1px solid #d1dbe5;
  background: #ffffff;
  box-shadow: 0 -12px 30px rgba(24, 36, 48, 0.08);
}

button {
  width: 100%;
  height: 48px;
  border: 1px solid #b7c5d1;
  border-radius: 8px;
  background: #f7fafc;
  color: #1d2b36;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: #edf3f7;
}

button:disabled {
  color: #98a6b3;
  cursor: not-allowed;
  background: #f2f5f7;
}

button.primary {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

button.primary:hover:not(:disabled) {
  background: #0b625c;
}

button.primary:disabled {
  border-color: #b7c5d1;
  background: #f2f5f7;
  color: #98a6b3;
}

.statusText {
  min-width: 0;
  color: #3d4b57;
  font-size: clamp(15px, 1.15vw, 18px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .app {
    min-height: 100vh;
    height: auto;
    grid-template-rows: minmax(560px, 1fr) auto;
    overflow: visible;
  }

  .controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: auto;
    min-height: 112px;
    padding: 12px 18px;
  }

  .statusText {
    grid-column: 1 / -1;
    white-space: normal;
  }

  button {
    min-width: 0;
  }

  .timeBadge {
    top: 12px;
    right: 12px;
    min-width: 110px;
  }

  .timeBadge strong {
    font-size: 24px;
  }
}
