@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url(fonts/rubik-latin.woff2) format('woff2');
}

:root {
  --bg: #fff7ec;
  --ink: #2b1d14;
  --primary: #6BAB90;
  --primary-dark: #55917F;
  --accent: #f5b301;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Rubik', system-ui, sans-serif;
}

main {
  width: 100%;
  max-width: 720px;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(1.6rem, 6vw, 2.6rem);
}

.machine {
  display: flex;
  gap: 10px;
  padding: 16px;
  width: 100%;
  background: var(--primary);
  border: 6px solid var(--primary-dark);
  border-radius: 24px;
  box-shadow: 0 8px 0 var(--primary-dark), 0 16px 24px rgba(0, 0, 0, .2);
}

.reel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reel-label {
  text-align: center;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .75rem;
}

.reel-window {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
  border: 3px solid var(--primary-dark);
  box-shadow: inset 0 6px 10px rgba(0, 0, 0, .25), inset 0 -6px 10px rgba(0, 0, 0, .25);
}

.reel-strip {
  will-change: transform;
}

.reel-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 4px;
  text-align: center;
}

.emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 130px;
  height: 130px;
  font-size: 110px;
  line-height: 1;
}

.pic {
  width: 130px;
  height: 130px;
  object-fit: contain;
}

.name {
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.1;
}

.spin {
  font: inherit;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: .05em;
  padding: 14px 56px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 6px 0 #b98700;
  transition: transform .08s, box-shadow .08s;
}

.spin:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #b98700;
}

.spin:disabled {
  opacity: .6;
  cursor: default;
}

.spin:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.result {
  min-height: 1.5em;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 480px) {
  .emoji {
    width: 90px;
    height: 90px;
    font-size: 76px;
  }

  .pic {
    width: 90px;
    height: 90px;
  }

  .name {
    font-size: .72rem;
  }

  .machine {
    padding: 10px;
    gap: 6px;
  }
}