:root {
  --dk-bar: #0b0f14;
  --dk-bar-text: #e8eef6;
  --dk-bar-muted: #9aabbd;
  --dk-accent: #5ee0a0;
  --dk-line: #2a3544;
  --dk-warn: #f0c674;
  --dk-danger: #ff7b72;
  --dk-radius: 10px;
  --dk-font: "IBM Plex Sans", "Noto Sans TC", "PingFang TC", sans-serif;
  --dk-mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.dk-body {
  font-family: var(--dk-font);
  padding-top: 44px;
}

.dk-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  min-height: 44px;
  padding: 0.4rem 0.75rem;
  background: var(--dk-bar);
  color: var(--dk-bar-text);
  border-bottom: 1px solid var(--dk-line);
  font-size: 0.85rem;
}

.dk-bar a {
  color: var(--dk-accent);
}

.dk-bar-brand {
  font-weight: 600;
}

.dk-bar-muted {
  color: var(--dk-bar-muted);
}

.dk-bar-spacer {
  flex: 1;
}

.dk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--dk-line);
  background: transparent;
  color: var(--dk-bar-text);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.dk-btn:hover,
.dk-btn:focus-visible {
  border-color: var(--dk-accent);
  color: var(--dk-accent);
}

.dk-btn[aria-pressed="true"],
.dk-btn.is-active {
  background: rgba(94, 224, 160, 0.14);
  border-color: var(--dk-accent);
  color: var(--dk-accent);
}

.dk-badge {
  display: inline-flex;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--dk-accent);
  color: #0b0f14;
  font-size: 0.72rem;
  font-weight: 700;
  align-items: center;
  justify-content: center;
}

.dk-toast-host {
  position: fixed;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 1100;
  display: grid;
  gap: 0.45rem;
  max-width: min(22rem, calc(100vw - 1.5rem));
}

.dk-toast {
  border: 1px solid rgba(94, 224, 160, 0.45);
  background: #121820;
  color: var(--dk-bar-text);
  border-radius: var(--dk-radius);
  padding: 0.7rem 0.85rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.dk-toast button {
  margin-top: 0.4rem;
  font: inherit;
  color: var(--dk-accent);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  min-height: 44px;
}

.dk-finish {
  margin: 1rem;
  padding: 1rem;
  border: 1px solid var(--dk-accent);
  border-radius: var(--dk-radius);
  background: rgba(94, 224, 160, 0.08);
}

.dk-finish[hidden] {
  display: none !important;
}

.dk-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 700px) {
  body.dk-body {
    padding-top: 40px;
  }

  .dk-bar {
    min-height: 40px;
    font-size: 0.8rem;
  }

  .dk-bar-hide-sm {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dk-toast {
    transition: none;
  }
}
