html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ff4d1f;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.tb {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(100%, 392px);
  height: 204px;
  max-height: calc(100vh - 32px);
  border: 2px solid;
  border-color: rgba(255, 255, 255, 0.95) rgba(23, 20, 26, 0.38) rgba(23, 20, 26, 0.38) rgba(255, 255, 255, 0.95);
  background: #17141a;
}

.tb button {
  font-family: inherit;
  cursor: pointer;
}

.tb button:focus-visible {
  outline: 2px solid #0a4fe8;
  outline-offset: 1px;
}

.tb__desk {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  padding: 8px;
  min-height: 0;
}

.tb__win {
  width: min(100%, 236px);
}

.tb__title {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 4px;
  box-sizing: border-box;
  background: #0a4fe8;
  color: #fff7e6;
}

.tb__tico {
  display: grid;
  place-items: center;
}

.tb__tname {
  flex: 1 1 auto;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
}

.tb__tbtns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tb__gb {
  width: 14px;
  height: 13px;
  box-sizing: border-box;
  border: 2px solid rgba(255, 247, 230, 0.85);
}

.tb__gb--min {
  border: 0;
  border-bottom: 2px solid rgba(255, 247, 230, 0.85);
  width: 12px;
  align-self: flex-end;
}

.tb__body {
  padding: 8px;
  border: 2px solid;
  border-color: rgba(255, 255, 255, 0.95) rgba(23, 20, 26, 0.38) rgba(23, 20, 26, 0.38) rgba(255, 255, 255, 0.95);
  background: #fff7e6;
}

.tb__line {
  margin: 0;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.45;
  color: #17141a;
}

.tb__line + .tb__line {
  margin-top: 4px;
}

.tb__line--mute {
  color: rgba(23, 20, 26, 0.72);
}

.tb__bar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 4px;
  box-sizing: border-box;
  background: #fff7e6;
  border-top: 1px solid rgba(23, 20, 26, 0.3);
}

.tb__start {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: #17141a;
}

.tb__task {
  height: 26px;
  padding: 0 8px;
  box-sizing: border-box;
  background: #fff7e6;
  color: #17141a;
  border: 2px solid;
  border-color: rgba(255, 255, 255, 0.95) rgba(23, 20, 26, 0.38) rgba(23, 20, 26, 0.38) rgba(255, 255, 255, 0.95);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
  transition: transform 220ms ease-out, background-color 220ms ease-out;
}

.tb__task[aria-pressed=true] {
  border-color: rgba(23, 20, 26, 0.38) rgba(255, 255, 255, 0.95) rgba(255, 255, 255, 0.95) rgba(23, 20, 26, 0.38);
  background: rgba(23, 20, 26, 0.07);
  font-weight: 700;
  transform: translateY(1px);
}

.tb__tray {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  height: 26px;
  padding: 0 4px;
  box-sizing: border-box;
  border: 2px solid;
  border-color: rgba(23, 20, 26, 0.38) rgba(255, 255, 255, 0.95) rgba(255, 255, 255, 0.95) rgba(23, 20, 26, 0.38);
  background: rgba(23, 20, 26, 0.05);
}

.tb__spk {
  display: grid;
  place-items: center;
  color: #17141a;
}

.tb__bell {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: #17141a;
  transition: color 220ms ease-out;
}

.tb__bell[aria-pressed=true] {
  color: #c93000;
}

.tb__clock {
  display: grid;
  justify-items: center;
  min-width: 62px;
}

.tb__clock > * {
  grid-area: 1/1;
}

.tb__clockreal, .tb__ck {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.4;
  color: #17141a;
  white-space: nowrap;
}

.tb__clockpre {
  display: grid;
  justify-items: center;
}

.tb__ck {
  opacity: 0;
}

.tb__balloon {
  position: absolute;
  inset: auto 0 calc(100% + 4px) auto;
  box-sizing: border-box;
  padding: 4px 8px;
  background: #ffffff;
  border: 1px solid #17141a;
  border-radius: 8px;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  font-weight: 600;
  font-size: 11px;
  line-height: 1.4;
  color: #17141a;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(5px) scale(0.94);
  transition: opacity 220ms cubic-bezier(0.2, 1.4, 0.4, 1), transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1), visibility 220ms;
}

.tb__bell[aria-pressed=true] ~ .tb__balloon {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.tb__balloon::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: -4px;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-right: 1px solid #17141a;
  border-bottom: 1px solid #17141a;
  transform: rotate(45deg);
}

.tb.is-demo .tb__clockreal {
  color: transparent;
}

.tb.is-demo .tb__ck {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.tb.is-demo .tb__ck--1 {
  animation-name: tbCk1;
}

.tb.is-demo .tb__ck--2 {
  animation-name: tbCk2;
}

.tb.is-demo .tb__bell {
  animation-name: tbBell;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.tb.is-demo .tb__balloon {
  visibility: visible;
  transition: none;
  animation-name: tbBalO, tbBalX;
  animation-duration: 2s, 2s;
  animation-timing-function: steps(1, end), cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite, infinite;
  animation-fill-mode: backwards, backwards;
}

.tb.is-demo .tb__task {
  transition: none;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.tb.is-demo #task1 {
  animation-name: tbT1;
}

.tb.is-demo #task2 {
  animation-name: tbT2;
}

@keyframes tbCk1 {
  0%, 29% {
    opacity: 1;
  }
  30%, 100% {
    opacity: 0;
  }
}
@keyframes tbCk2 {
  0%, 29% {
    opacity: 0;
  }
  30%, 100% {
    opacity: 1;
  }
}
@keyframes tbBell {
  0%, 15% {
    color: #17141a;
  }
  16%, 79% {
    color: #c93000;
  }
  80%, 100% {
    color: #17141a;
  }
}
@keyframes tbBalO {
  0%, 15% {
    opacity: 0;
  }
  16%, 75% {
    opacity: 1;
  }
  76%, 100% {
    opacity: 0;
  }
}
@keyframes tbBalX {
  0%, 16% {
    transform: translateY(5px) scale(0.94);
  }
  24%, 75% {
    transform: none;
  }
  76%, 100% {
    transform: translateY(5px) scale(0.94);
  }
}
@keyframes tbT1 {
  0%, 39% {
    border-color: rgba(23, 20, 26, 0.38) rgba(255, 255, 255, 0.95) rgba(255, 255, 255, 0.95) rgba(23, 20, 26, 0.38);
    background: rgba(23, 20, 26, 0.07);
    font-weight: 700;
    transform: translateY(1px);
  }
  40%, 86% {
    border-color: rgba(255, 255, 255, 0.95) rgba(23, 20, 26, 0.38) rgba(23, 20, 26, 0.38) rgba(255, 255, 255, 0.95);
    background: #fff7e6;
    font-weight: 500;
    transform: translateY(0);
  }
  87%, 100% {
    border-color: rgba(23, 20, 26, 0.38) rgba(255, 255, 255, 0.95) rgba(255, 255, 255, 0.95) rgba(23, 20, 26, 0.38);
    background: rgba(23, 20, 26, 0.07);
    font-weight: 700;
    transform: translateY(1px);
  }
}
@keyframes tbT2 {
  0%, 39% {
    border-color: rgba(255, 255, 255, 0.95) rgba(23, 20, 26, 0.38) rgba(23, 20, 26, 0.38) rgba(255, 255, 255, 0.95);
    background: #fff7e6;
    font-weight: 500;
    transform: translateY(0);
  }
  40%, 86% {
    border-color: rgba(23, 20, 26, 0.38) rgba(255, 255, 255, 0.95) rgba(255, 255, 255, 0.95) rgba(23, 20, 26, 0.38);
    background: rgba(23, 20, 26, 0.07);
    font-weight: 700;
    transform: translateY(1px);
  }
  87%, 100% {
    border-color: rgba(255, 255, 255, 0.95) rgba(23, 20, 26, 0.38) rgba(23, 20, 26, 0.38) rgba(255, 255, 255, 0.95);
    background: #fff7e6;
    font-weight: 500;
    transform: translateY(0);
  }
}
@media (max-width: 340px) {
  .tb {
    height: 168px;
  }
  .tb__win {
    width: min(100%, 216px);
  }
  .tb__task {
    padding: 0 4px;
  }
  .tb__clock {
    min-width: 54px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tb.is-demo .tb__ck, .tb.is-demo .tb__bell, .tb.is-demo .tb__balloon, .tb.is-demo .tb__task {
    animation: none !important;
  }
  .tb.is-demo .tb__clockreal {
    color: #17141a !important;
  }
  .tb.is-demo .tb__ck {
    opacity: 0 !important;
  }
  .tb.is-demo .tb__balloon {
    opacity: 0 !important;
    visibility: hidden !important;
  }
  .tb.is-demo .tb__task {
    transition: none !important;
  }
}
