html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: var(--audience-background-color);
  background-image: var(--page-background);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
[hidden] {
  display: none !important;
}

#screen-login {
  display: block;
  min-height: 100dvh;
  font-family: SalesforceSansRegular, Helvetica, Arial, sans-serif;
}
#screen-login.screen {
  min-height: 100dvh;
  background-color: var(--audience-background-color);
  background-image: var(--login-background);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
#screen-login .scroll {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
  padding-right: calc(24px + env(safe-area-inset-right, 0px));
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  padding-left: calc(24px + env(safe-area-inset-left, 0px));
}
#screen-login .group {
  box-sizing: border-box;
  width: min(420px, 100%);
  margin: clamp(72px, 14vh, 160px) auto 0;
}
#screen-login .footer {
  width: min(420px, 100%);
  margin-top: auto;
  margin-right: auto;
  margin-left: auto;
  padding-top: 24px;
}
#screen-login .heading {
  margin: 0;
  color: var(--login-heading);
  max-width: 9ch;
  font-size: clamp(2.8rem, 12vw, 3.4rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
#screen-login .subtitle {
  margin: 0.7rem 0 1.85rem;
  color: var(--login-subtitle);
  font-size: 1.28rem;
  line-height: 1.3;
}
#screen-login .panel {
  background: var(--login-panel);
  padding: 0;
  box-shadow: none;
}
#screen-login .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 18px;
}
#screen-login .label {
  color: var(--login-label);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.2;
}
#screen-login input {
  box-sizing: border-box;
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 0 18px;
  border: 1.5px solid var(--login-input-border);
  border-radius: 16px;
  background: var(--login-input-background);
  color: var(--login-input-color);
  font: inherit;
  font-size: 16px;
  box-shadow: var(--audience-field-shadow);
}
#screen-login input::placeholder {
  color: var(--login-placeholder);
}
#screen-login .error {
  margin: 0 0 14px;
  color: var(--login-error);
  font-size: 0.95rem;
  line-height: 1.35;
}
#screen-login .submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  margin-top: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 16px;
  background: var(--login-button-background);
  color: var(--login-button-color);
  font: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--audience-button-shadow);
}
#screen-login .submit:disabled {
  opacity: 1;
  cursor: default;
  background: var(--login-button-background);
  color: var(--login-button-color);
}
#screen-login .submit.isBusy {
  opacity: 0.7;
  cursor: default;
}

#screen-lobby {
  min-height: 100dvh;
  background-color: var(--audience-background-color);
  background-image: var(--audience-background);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: var(--audience-heading);
  font-family: SalesforceSansRegular, Helvetica, Arial, sans-serif;
}
#screen-lobby .scroll {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
  padding-right: calc(24px + env(safe-area-inset-right, 0px));
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  padding-left: calc(24px + env(safe-area-inset-left, 0px));
}
#screen-lobby .exit {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--audience-heading);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
}
#screen-lobby .group {
  box-sizing: border-box;
  width: min(420px, 100%);
  margin: clamp(36px, 8vh, 88px) auto 24px;
}
#screen-lobby .kicker {
  margin: 0 0 0.35rem;
  color: var(--audience-muted);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}
#screen-lobby .title {
  margin: 0;
  color: var(--audience-heading);
  font-size: clamp(2.8rem, 12vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
#screen-lobby .actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 2.4rem;
}
#screen-lobby .action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  margin: 0;
  padding: 0 16px;
  border: 1.5px solid var(--audience-wait-border);
  border-radius: 16px;
  background: var(--audience-wait-background);
  color: var(--audience-heading);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--audience-field-shadow);
}
#screen-lobby .action:disabled {
  opacity: 0.45;
  cursor: default;
}
#screen-lobby .action.isOpen {
  border-color: transparent;
  background: var(--audience-button-background);
  color: var(--audience-button-color);
  box-shadow: var(--audience-button-shadow);
}
#screen-lobby .footer {
  width: min(420px, 100%);
  margin: auto auto 0;
}

#screen-add {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  height: 100svh;
  overflow: hidden;
  background-color: var(--audience-background-color);
  background-image: var(--audience-background);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: var(--audience-heading);
  font-family: SalesforceSansRegular, Helvetica, Arial, sans-serif;
}
#screen-add .bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  min-height: 56px;
  padding: env(safe-area-inset-top, 0px) 16px 0 8px;
  background: var(--audience-bar-background);
  color: var(--audience-bar-color);
}
#screen-add .back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--audience-bar-icon);
  cursor: pointer;
}
#screen-add .back svg {
  width: 26px;
  height: 26px;
}
#screen-add .barTitle {
  overflow: hidden;
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#screen-add .sheet {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
#screen-add .scroll {
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 16px 24px 8px;
}
#screen-add .heading {
  margin: 0 0 4px;
  color: var(--audience-heading);
  font-size: clamp(2rem, 7.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
#screen-add .subtitle {
  margin: 0 0 14px;
  color: var(--audience-muted);
  font-size: 1.05rem;
  line-height: 1.3;
}
#screen-add .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 12px;
}
#screen-add .label {
  color: var(--audience-heading);
  font-size: 1.02rem;
  font-weight: 700;
}
#screen-add input,
#screen-add textarea {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--audience-field-background);
  color: var(--audience-field-color);
  font: inherit;
  font-size: 16px;
}
#screen-add textarea {
  min-height: 64px;
  resize: none;
}
#screen-add input {
  min-height: 44px;
}
#screen-add input::placeholder,
#screen-add textarea::placeholder {
  color: var(--audience-field-placeholder);
}
#screen-add .check {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 0;
  color: var(--audience-heading);
  font-size: 1.02rem;
  font-weight: 700;
}
#screen-add .check input {
  appearance: none;
  display: grid;
  place-content: center;
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  background: var(--audience-field-background);
}
#screen-add .check input::before {
  content: "";
  width: 10px;
  height: 6px;
  border-bottom: 2px solid transparent;
  border-left: 2px solid transparent;
  transform: rotate(-45deg) translate(1px, -1px);
}
#screen-add .check input:checked::before {
  border-bottom-color: var(--audience-button-color);
  border-left-color: var(--audience-button-color);
}
#screen-add .response {
  margin-top: 16px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.35;
}
#screen-add .error-row {
  color: var(--audience-wrong);
}
#screen-add .message-row {
  color: var(--audience-heading);
}
#screen-add .footer {
  box-sizing: border-box;
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  padding: 8px 24px calc(12px + env(safe-area-inset-bottom, 0px));
}
#screen-add .submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(240px, 100%);
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  background: var(--audience-button-background);
  color: var(--audience-button-color);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--audience-button-shadow);
}
#screen-add .submit:disabled {
  opacity: 0.7;
  cursor: default;
}

#screen-question {
  min-height: 100dvh;
  background-color: var(--audience-background-color);
  background-image: var(--audience-background);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: var(--audience-heading);
  font-family: SalesforceSansRegular, Helvetica, Arial, sans-serif;
}
#screen-question .bar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 56px;
  padding: env(safe-area-inset-top, 0px) 16px 0 8px;
  background: var(--audience-bar-background);
  color: var(--audience-bar-color);
}
#screen-question .back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--audience-bar-icon);
  cursor: pointer;
}
#screen-question .back svg {
  width: 26px;
  height: 26px;
}
#screen-question .barTitle {
  overflow: hidden;
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#screen-question .sheet {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 56px);
}
#screen-question .scroll {
  box-sizing: border-box;
  flex: 1 1 auto;
  padding: 28px 24px 16px;
}
#screen-question .progressLabel {
  margin: 0 0 10px;
  color: var(--audience-heading);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
}
#screen-question .progressTrack {
  display: flex;
  gap: 4px;
  width: 100%;
  margin: 0 0 8px;
}
#screen-question .segment {
  flex: 1 1 auto;
  height: 7px;
  border-radius: 99px;
  background: var(--audience-progress-empty);
}
#screen-question .segment.isFilled {
  background: var(--audience-progress-filled);
}
#screen-question .prompt {
  margin: 28px 0 22px;
  color: var(--audience-heading);
  font-size: clamp(1.7rem, 6.5vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
#screen-question .choices {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#screen-question .choice {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 12px 20px;
  border: 1.5px solid var(--audience-choice-border);
  border-radius: 16px;
  background: var(--audience-choice-background);
  color: var(--audience-heading);
  font: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
#screen-question .choice.isSelected {
  border-color: var(--audience-choice-selected-border);
  background: var(--audience-choice-selected);
  box-shadow: var(--audience-choice-glow);
}
#screen-question .note {
  margin: 14px 0 0;
  color: var(--audience-soft);
  font-size: 0.95rem;
}
#screen-question .footer {
  box-sizing: border-box;
  padding: 12px 24px calc(24px + env(safe-area-inset-bottom, 0px));
}
#screen-question .submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 16px;
  background: var(--audience-button-background);
  color: var(--audience-button-color);
  font: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--audience-button-shadow);
}
#screen-question .submit:disabled {
  opacity: 0.45;
  cursor: default;
}

#screen-qresult {
  min-height: 100dvh;
  background-color: var(--audience-background-color);
  background-image: var(--audience-background);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: var(--audience-heading);
  font-family: SalesforceSansRegular, Helvetica, Arial, sans-serif;
}
#screen-qresult .bar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 56px;
  padding: env(safe-area-inset-top, 0px) 16px 0 8px;
  background: var(--audience-bar-background);
  color: var(--audience-bar-color);
}
#screen-qresult .back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--audience-bar-icon);
  cursor: pointer;
}
#screen-qresult .back svg {
  width: 26px;
  height: 26px;
}
#screen-qresult .barTitle {
  overflow: hidden;
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#screen-qresult .sheet {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: calc(100dvh - 56px);
  padding: 28px 24px calc(28px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}
#screen-qresult .progressLabel {
  margin: 0 0 10px;
  color: var(--audience-heading);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
}
#screen-qresult .progressTrack {
  display: flex;
  align-self: stretch;
  gap: 4px;
  width: 100%;
  margin: 0 0 8px;
}
#screen-qresult .segment {
  flex: 1 1 auto;
  height: 7px;
  border-radius: 99px;
  background: var(--audience-progress-empty);
}
#screen-qresult .segment.isFilled {
  background: var(--audience-progress-filled);
}
#screen-qresult .stage {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
}
#screen-qresult .mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 148px;
  height: 148px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--audience-glass);
  border: 1px solid var(--audience-glass-border);
  box-shadow: var(--audience-glass-shadow);
}
#screen-qresult .mark[hidden] {
  display: none;
}
#screen-qresult .mark svg {
  width: 72px;
  height: 72px;
  display: none;
}
#screen-qresult .mark.isWrong .markWrong {
  display: block;
  color: var(--audience-wrong);
}
#screen-qresult .mark.isCorrect .markCorrect {
  display: block;
  color: var(--audience-correct);
}
#screen-qresult .message {
  max-width: 9.5ch;
  margin: 18px auto 0;
  color: var(--audience-heading);
  font-size: 3.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
#screen-qresult .submessage {
  margin: 12px 0 0;
  color: var(--audience-soft);
  font-size: 1.45rem;
  font-weight: 700;
}
#screen-qresult .score {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: max-content;
  min-width: 4.75rem;
  aspect-ratio: 1;
  margin: 22px auto 0;
  padding: 0.7rem 0.9rem;
  border: 3px solid var(--audience-ring-border);
  border-radius: 50%;
  color: var(--audience-heading);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
#screen-qresult .score[hidden] {
  display: none;
}
#screen-qresult .feedback {
  width: 100%;
  margin-top: auto;
  padding-top: 16px;
}
#screen-qresult .feedback[hidden] {
  display: block !important;
  visibility: hidden;
  pointer-events: none;
}
#screen-qresult .feedbackTitle {
  margin: 0 0 14px;
  color: var(--audience-soft);
  font-size: 1.15rem;
  font-weight: 700;
}
#screen-qresult .feedbackRow {
  display: flex;
  gap: 10px;
}
#screen-qresult .feedbackRow button {
  flex: 1 1 0;
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  background: var(--audience-button-background);
  color: var(--audience-button-color);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--audience-button-shadow);
}

#screen-score {
  min-height: 100dvh;
  background-color: var(--audience-background-color);
  background-image: var(--audience-background);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: var(--audience-heading);
  font-family: SalesforceSansRegular, Helvetica, Arial, sans-serif;
}
#screen-score .bar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 56px;
  padding: env(safe-area-inset-top, 0px) 16px 0 8px;
  background: var(--audience-bar-background);
  color: var(--audience-bar-color);
}
#screen-score .back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--audience-bar-icon);
  cursor: pointer;
}
#screen-score .back svg {
  width: 26px;
  height: 26px;
}
#screen-score .barTitle {
  overflow: hidden;
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#screen-score .sheet {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: calc(100dvh - 56px);
  padding: 28px 24px calc(24px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}
#screen-score .stage {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
}
#screen-score .place {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 148px;
  height: 148px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--audience-glass);
  border: 1px solid var(--audience-glass-border);
  box-shadow: var(--audience-glass-shadow);
  color: var(--audience-heading);
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
#screen-score .place[hidden] {
  display: none;
}
#screen-score .message {
  margin: 0;
  color: var(--audience-heading);
  font-size: clamp(2.4rem, 9vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
#screen-score .summary {
  max-width: 18rem;
  margin: 14px auto 0;
  color: var(--audience-soft);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
}
#screen-score .footer {
  width: 100%;
  margin-top: auto;
  padding-top: 16px;
}
#screen-score .submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 16px;
  background: var(--audience-button-background);
  color: var(--audience-button-color);
  font: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--audience-button-shadow);
}

#screen-login.screen,
#screen-lobby,
#screen-add,
#screen-question,
#screen-qresult,
#screen-score {
  box-sizing: border-box;
  width: min(100%, calc(100dvh * 9 / 16));
  margin-right: auto;
  margin-left: auto;
  background-color: transparent;
  background-image: none;
}
