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

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

.sm {
  --menu-w: 176px;
  position: relative;
  box-sizing: border-box;
  width: min(100%, 448px);
  height: 236px;
  padding: 12px;
  border: 1px solid rgba(23, 20, 26, 0.14);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.sm__desk {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 180px;
}

.sm__dwin {
  padding: 8px;
  border: 1px solid rgba(23, 20, 26, 0.14);
  border-radius: 8px;
  background: #fff7e6;
}

.sm__dttl {
  color: #17141a;
  font-weight: 700;
  font-size: 11px;
  line-height: 1.4;
}

.sm__drow {
  height: 8px;
  margin-top: 8px;
  border-radius: 4px;
  background: rgba(23, 20, 26, 0.12);
}

.sm__drow--s {
  width: 72%;
}

.sm__drow--m {
  width: 48%;
}

.sm__hint {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 192px;
  margin: 0;
  color: rgba(23, 20, 26, 0.72);
  font-weight: 500;
  font-size: 10px;
  line-height: 1.5;
}

.sm__menu {
  position: absolute;
  left: 120px;
  bottom: 56px;
  width: var(--menu-w);
  display: none;
  z-index: 3;
  border: 1px solid rgba(23, 20, 26, 0.14);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  transform-origin: 50% 100%;
}

.sm__menu.is-open {
  display: flex;
}

.sm__menu.is-open {
  animation-name: smMenuOnce;
  animation-duration: 220ms;
  animation-timing-function: ease-out;
  animation-iteration-count: 1;
}

.sm__band {
  display: grid;
  place-items: center;
  width: 28px;
  padding: 4px 0;
  border-radius: 8px 0 0 8px;
  background: #0a4fe8;
  color: #ffffff;
  writing-mode: vertical-rl;
  font-weight: 700;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.sm__rows {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 8px;
}

.sm__row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 8px;
  margin: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #17141a;
  font-family: inherit;
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  text-align: left;
}

.sm__row:hover, .sm__row:focus-visible, .sm__row.is-hot {
  background: #0a4fe8;
  color: #ffffff;
}

.sm__row:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: -2px;
}

.sm__rico {
  display: grid;
  place-items: center;
  font-size: 15px;
}

.sm__rtxt {
  flex: 1 1 auto;
}

.sm__rarr {
  display: grid;
  place-items: center;
  font-size: 12px;
}

.sm__sep {
  height: 1px;
  margin: 4px 8px;
  background: rgba(23, 20, 26, 0.14);
}

.sm__row--power {
  color: #c2361a;
}

.sm__row--power:hover, .sm__row--power:focus-visible, .sm__row--power.is-hot {
  background: #c2361a;
  color: #ffffff;
}

.sm__sub {
  position: absolute;
  top: 6px;
  left: 100%;
  width: 104px;
  display: none;
  padding: 4px;
  border: 1px solid rgba(23, 20, 26, 0.14);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.sm__sub--1 {
  top: 6px;
  transform-origin: 0 50%;
}

.sm__sub--2 {
  top: 64px;
  transform-origin: 100% 50%;
}

.sm__sub.is-on {
  display: block;
}

.sm__sub.is-on {
  animation-name: smSubOnce;
  animation-duration: 220ms;
  animation-timing-function: ease-out;
  animation-iteration-count: 1;
}

.sm__sub.is-flip {
  left: auto;
  right: 100%;
}

.sm__sitem {
  display: block;
  width: 100%;
  height: 28px;
  padding: 0 8px;
  margin: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #17141a;
  font-family: inherit;
  font-weight: 500;
  font-size: 12px;
  line-height: 28px;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}

.sm__sitem:hover, .sm__sitem:focus-visible {
  background: #0a4fe8;
  color: #ffffff;
}

.sm__sitem:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: -2px;
}

.sm__bar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border-radius: 4px;
  background: #17141a;
  z-index: 2;
}

.sm__app {
  display: grid;
  place-items: center;
  width: 46px;
  height: 28px;
  border-radius: 4px;
  color: #fff7e6;
  font-size: 14px;
}

.sm__start {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 12px;
  margin: 0;
  border: 0;
  border-radius: 4px;
  background: #0a4fe8;
  color: #ffffff;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.sm__start:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 1px;
}

.sm__sico {
  display: grid;
  place-items: center;
  font-size: 14px;
}

.sm__grow {
  flex: 1 1 auto;
}

.sm__clock {
  padding-right: 4px;
  color: rgba(255, 247, 230, 0.72);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
  font-weight: 500;
  font-size: 11px;
  line-height: 1;
}

.sm.is-demo .sm__menu {
  display: flex;
  animation-name: smMenuO;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.sm.is-demo .sm__sub {
  display: block;
  opacity: 0;
}

.sm.is-demo .sm__sub--1 {
  animation-name: smSub1O, smSub1X;
  animation-duration: 2s, 2s;
  animation-timing-function: steps(1, end), ease-out;
  animation-iteration-count: infinite, infinite;
  animation-fill-mode: backwards, backwards;
}

.sm.is-demo .sm__sub--2 {
  animation-name: smSub2O, smSub2F;
  animation-duration: 2s, 2s;
  animation-timing-function: steps(1, end), ease-out;
  animation-iteration-count: infinite, infinite;
  animation-fill-mode: backwards, backwards;
}

.sm.is-demo .sm__rows .sm__row:nth-child(1) {
  animation-name: smRowA;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.sm.is-demo .sm__rows .sm__row:nth-child(3) {
  animation-name: smRowB;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.sm.is-demo .sm__start {
  animation-name: smBtnY;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

@keyframes smMenuO {
  0%, 6% {
    clip-path: inset(100% 0 0 0);
  }
  12%, 77% {
    clip-path: inset(0 0 0 0);
  }
  83%, 100% {
    clip-path: inset(100% 0 0 0);
  }
}
@keyframes smMenuOnce {
  0% {
    transform: scaleY(0.6);
  }
  100% {
    transform: scaleY(1);
  }
}
@keyframes smRowA {
  0%, 17.9% {
    background: transparent;
    color: #17141a;
  }
  18%, 43.9% {
    background: #0a4fe8;
    color: #ffffff;
  }
  44%, 100% {
    background: transparent;
    color: #17141a;
  }
}
@keyframes smRowB {
  0%, 45.9% {
    background: transparent;
    color: #17141a;
  }
  46%, 67.9% {
    background: #0a4fe8;
    color: #ffffff;
  }
  68%, 100% {
    background: transparent;
    color: #17141a;
  }
}
@keyframes smSub1O {
  0%, 17.9% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  18%, 43.9% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
  44%, 100% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
}
@keyframes smSub1X {
  0%, 18% {
    transform: translateX(-10px) scaleX(0.92);
  }
  25%, 100% {
    transform: translateX(0) scaleX(1);
  }
}
@keyframes smSub2O {
  0%, 45.9% {
    opacity: 0;
    clip-path: inset(0 0 0 100%);
  }
  46%, 67.9% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
  68%, 100% {
    opacity: 0;
    clip-path: inset(0 0 0 100%);
  }
}
@keyframes smSub2F {
  0%, 46% {
    transform: translateX(calc(-100% - var(--menu-w) + 12px)) scaleX(0.92);
  }
  53%, 100% {
    transform: translateX(calc(-100% - var(--menu-w))) scaleX(1);
  }
}
@keyframes smBtnY {
  0%, 5.9% {
    transform: translateY(0);
  }
  6%, 8% {
    transform: translateY(1px);
  }
  9%, 100% {
    transform: translateY(0);
  }
}
@keyframes smSubOnce {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}
@media (max-width: 340px) {
  .sm {
    --menu-w: 136px;
    height: 166px;
    padding: 8px;
  }
  .sm__desk {
    display: none;
  }
  .sm__hint {
    top: 8px;
    left: 8px;
    width: 150px;
    font-size: 9px;
  }
  .sm__menu {
    left: 16px;
    bottom: 34px;
  }
  .sm__row {
    height: 22px;
    gap: 4px;
    padding: 0 4px;
    font-size: 11px;
  }
  .sm__rico {
    font-size: 12px;
  }
  .sm__rarr {
    font-size: 10px;
  }
  .sm__band {
    width: 18px;
    font-size: 8px;
  }
  .sm__sub {
    width: 84px;
  }
  .sm__sub--2 {
    top: 44px;
  }
  .sm__sitem {
    height: 22px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 22px;
  }
  .sm__bar {
    left: 8px;
    right: 8px;
    bottom: 8px;
    height: 26px;
    padding: 0 4px;
  }
  .sm__app {
    display: none;
  }
  .sm__start {
    height: 22px;
    padding: 0 8px;
    font-size: 11px;
  }
  .sm__sico {
    font-size: 12px;
  }
  .sm__clock {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sm.is-demo .sm__menu, .sm.is-demo .sm__sub--1, .sm.is-demo .sm__sub--2,
  .sm.is-demo .sm__rows .sm__row:nth-child(1), .sm.is-demo .sm__rows .sm__row:nth-child(3),
  .sm.is-demo .sm__start {
    animation: none !important;
  }
  .sm.is-demo .sm__menu {
    clip-path: none !important;
  }
  .sm.is-demo .sm__sub {
    opacity: 0 !important;
    clip-path: inset(0 100% 0 0) !important;
  }
}
