:root {
  --color-red: #e9282b;
  --color-ink: #000000;
  --color-grey: rgba(0, 0, 0, 0.2);
  --color-white: #ffffff;

  --font-base: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --rule-row-height: clamp(2.4rem, 3.4vw, 3.4rem);
}

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

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

body {
  font-family: var(--font-base);
  color: var(--color-ink);
  overflow: hidden;
}

.screen {
  display: none;
  width: 100vw;
  height: 100vh;
  border: 0.6rem dashed var(--color-red);
}

.screen#screen-2 {
  border-color: var(--color-white);
}

.screen.is-active {
  display: flex;
}

.screen--rules {
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  padding: 45px;
}

.rules-frame {
  width: 100%;
  height: 100%;
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rules-header {
  flex: none;
  margin-bottom: 2vh;
}

.rules-title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: bold;
}

.rules-intro {
  margin: 0;
  color: var(--color-ink);
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  line-height: 1.4;
}

.rules-list {
  flex: 1;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.4em;
  overflow: hidden;
}

.rules-list li {
  font-size: clamp(0.85rem, 1.15vw, 1.05rem);
  line-height: 1.4;
  padding-left: 1.4em;
  position: relative;
}

.rules-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-ink);
}

.rules-list li.rule--new::before {
  content: " ";
}

li.rule--new {
  color: var(--color-red);
  font-weight: bold;
}

.screen--generator {
  align-items: center;
  justify-content: flex-start;
  background: var(--color-red);
  color: var(--color-white);
  padding: 40px;
  flex-direction: column;
  gap: 40px;
}

.generator {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.generator-title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: bold;
}

.generator-intro {
  margin: 0;
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  line-height: 1.4;
  font-weight: bold;
  opacity: 0.9;
}

.reels {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2vh;
}

.reel {
  background: var(--color-white);
  color: var(--color-ink);
  border-radius: 1.4rem;
  padding: 1.2rem 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  overflow: hidden;
  filter: blur(0);
  transition: filter 150ms ease-out;
}

.reel.is-spinning {
  filter: blur(3px);
}

.reel-row {
  width: 100%;
  min-height: var(--rule-row-height);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1rem;
  line-height: 1.3;
}

.reel-row--current {
  font-weight: bold;
  color: var(--color-ink);
}

.reel-row--prev,
.reel-row--next {
  color: var(--color-grey);
}

.generator-status {
  min-height: 1.4em;
  margin: 0;
  font-style: italic;
  font-weight: bold;
  text-align: center;
}

.switch-lang {
  font-size: 14px;
  text-decoration: underline;
  text-align: center;
  font-weight: bold;
}

@media (prefers-reduced-motion: reduce) {
  .reel-row,
  .reel {
    transition: none !important;
  }

  .reel.is-spinning {
    filter: none;
  }
}