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

:root {
  --ru: 1.3;
  --default-anim-easing: cubic-bezier(0.19, 1, 0.22, 1);
  --font-size-base: 24px;
  --color-text: #f0e6d2;
  --color-bg: #000;
  --color-accent: #e8d5c4;
  --font-family-base: "EB Garamond", Georgia, "Times New Roman", Times, serif;
  --font-family-body: var(--font-family-base);
  --font-family-button: var(--font-family-body);
  --page-margin-mobile: calc(var(--ru) * 0.5rem);
  --page-margin-desktop: calc(var(--ru) * 1rem);
}

:root {
  --page-margin: var(--page-margin-mobile);
}

@media all and (min-width: 420px) {
  :root {
    --page-margin: var(--page-margin-desktop);
  }
}

@media all and (min-width: 800px) {
  :root {
    --font-size-base: 40px;
  }
}

body,
html {
  padding: 0;
  margin: 0;
  font-size: var(--font-size-base);
  font-family: var(--font-family-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: var(--ru);
  height: 100%;
  width: 100%;
}

#root {
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.header {
  position: absolute;
  top: 20px;
  width: 100%;
  text-align: center;
}

.app-title {
  font-size: 20px;
  font-weight: normal;
  margin: 0;
}

.button {
  appearance: none;
  margin: 0;
  border: none;
  border-radius: 100rem;
  font-family: var(--font-family-button);
  font-size: 1rem;
  padding: 0.25rem 1rem 0.3rem;
  font-weight: 300;
  vertical-align: bottom;
  cursor: pointer;
  transition: 0.3s opacity, 0.2s transform;
}

.button-primary {
  background-color: var(--color-text);
  color: var(--color-bg);
}

.button-secondary {
  background-color: var(--color-bg);
  color: var(--color-text);
}

.button:hover {
  opacity: 0.9;
}

.button:active {
  transform: scale(0.97);
}

.select-container {
  position: relative;
  display: inline-block;
}

.select {
  background-color: transparent;
  text-align: center;
  color: var(--color-text);
  padding: 0 0.5rem 0 0;
  margin: 0 0.25rem;
  font-size: 1rem;
  font-family: var(--font-family-body);
  appearance: none;
  border: none;
  opacity: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.select-overlay {
  padding: 0 0.3rem 0 0;
  background-image: url("data:image/svg+xml,%3csvg%20width='35'%20height='59'%20viewBox='0%200%2035%2059'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.5%2059L0%2041.2604L3.00781%2038.2114L15.3516%2050.7638V8.23624L3.00781%2020.7886L0%2017.7396L17.5%200L35%2017.7396L32.0313%2020.7886L19.6484%208.23624V50.7638L32.0313%2038.2114L35%2041.2604L17.5%2059Z'%20fill='%23f0e6d2'/%3e%3c/svg%3e");
  background-size: 0.3rem;
  background-repeat: no-repeat;
  background-position: 98% 56%;
  pointer-events: none;
  text-align: right;
  transition: 0.2s opacity;
}

.select-value {
  padding: 0 0.25rem;
  border-bottom: 1px dashed;
}

.select-container:hover {
  cursor: pointer;
  opacity: 0.9;
}

.text {
  font-size: 1rem;
  line-height: calc(var(--ru) * 1em);
  text-align: center;
}

.text strong {
  font-weight: 600;
}

.text-dimmed {
  opacity: 0.3;
}

.text-inline {
  display: inline;
  margin: 0;
}

.text-s {
  font-size: 0.75rem;
}

.text-xs {
  font-size: 0.5rem;
}

.text-start {
  text-align: start;
}

.text-center {
  text-align: center;
}

.text a {
  color: var(--color-text);
  opacity: 0.6;
  font-weight: 300;
  font-style: italic;
  text-decoration: none;
  transition: 0.3s opacity;
}

.text a:hover {
  opacity: 1;
}

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.footer {
  position: fixed;
  bottom: 24px;
  width: 100%;
  text-align: center;
}

@media all and (max-width: 800px) {
  .footer .text {
    font-size: 16px;
  }
}

.footer a {
  text-decoration: none;
  font-style: unset;
}

.footer span {
  font-style: italic;
}

.spacer {
  flex: 0;
}

.main-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 600px;
  padding: 0 20px;
}

@media all and (max-width: 800px) {
  .main-container {
    padding: 0 20px 0;
  }
}

@media all and (max-width: 420px) {
  .main-container {
    padding: 0 10px 0;
  }
}

.homepage-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.start-button-container {
  margin-top: 40px;
  margin-bottom: 40px;
}

@media all and (max-width: 800px) {
  .start-button-container .button {
    width: 160px;
  }
}

@media all and (max-width: 420px) {
  .start-button-container {
    margin-top: 30px;
    margin-bottom: 30px;
  }
}

.instructions-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  padding: 20px;
  border: 2px solid var(--color-text);
  border-radius: 20px;
  background-color: var(--color-bg);
  margin: 0 20px;
}

@media all and (max-width: 600px) {
  .instructions-container {
    max-width: calc(100% - 40px);
    margin: 0 auto;
    padding: 15px;
  }
}

.instructions-container .text {
  text-align: left;
  margin: 0;
}

@media all and (min-width: 801px) {
  .instructions-container .text {
    font-size: 28px;
  }
}

.instructions-container .button {
  margin-top: 48px;
  width: 100%;
}

@media all and (max-width: 420px) {
  .instructions-container .button {
    margin-top: 30px;
  }
}

.instructions-view {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  padding: 1rem;
}

.main-instruction-wrapper {
  white-space: nowrap;
  text-align: center;
}

@media all and (max-width: 600px) {
  .main-instruction-wrapper {
    font-size: 0.9rem;
  }
}

.view {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

/* Animation classes */
.view-entering {
  animation: view-enter 1.2s;
}

.view-exiting {
  animation: view-exit 1.2s;
}

@keyframes view-enter {
  0% {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes view-exit {
  0% {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Main view specific styles */
.main-instruction {
  margin: 0;
  width: 100%;
  text-align: center;
}

.sub-text {
  margin: 0;
  height: 39px;
  width: 100%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  padding-top: 12px;
}

@media all and (max-width: 600px) {
  .sub-text {
    height: 30px;
  }
}

.sub-text em {
  margin-right: 3px;
}

/* Active view specific styles */
.center-message {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.bottom-controls {
  margin-top: auto;
  margin-bottom: 40px;
  width: 100%;
  display: flex;
  justify-content: center;
}

@media all and (max-width: 420px) {
  .bottom-controls {
    margin-bottom: 20px;
  }
}

/* Complete view specific styles */
.thank-you {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.link-list {
  margin-top: calc(var(--ru) * 0.25rem);
  display: flex;
  gap: 0.5em;
  justify-content: center;
  width: 100%;
}

.link-list > *:not(:first-child) {
  position: relative;
  padding-left: 0.9em;
}

.link-list > *:not(:first-child):before {
  content: "";
  position: absolute;
  width: 0.1rem;
  height: 0.1rem;
  border-radius: 100rem;
  background-color: var(--color-text);
  top: 50%;
  left: 0.05rem;
  opacity: 0.3;
} 