/* FINAL/FROZEN-referens: IUP MÅLSÄTTNING MOBILE. Isolerad från HOME och uppföljningsläget. */
.iup-goal-setting-screen {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  padding: max(18px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overflow-anchor: none;
  color: #f9fbff;
  background: transparent;
  scrollbar-width: thin;
}

.iup-goal-setting-screen button,
.iup-goal-setting-screen textarea {
  font: inherit;
}

.iup-goal-setting-screen button {
  min-width: 44px;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.iup-goal-setting-screen button:focus-visible,
.iup-goal-setting-screen textarea:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.iup-goal-setting-screen svg {
  width: 24px;
  height: 24px;
}

.iup-goal-header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.iup-goal-header > button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
}

.iup-goal-header > button:first-child svg {
  width: 32px;
  height: 32px;
}

.iup-goal-header > div {
  min-width: 0;
}

.iup-goal-header h1 {
  margin: 0 0 3px;
  color: #fff;
  font-size: clamp(1.25rem, 5.7vw, 1.58rem);
  font-weight: 850;
  letter-spacing: -.025em;
  line-height: 1.1;
  white-space: nowrap;
}

.iup-goal-header p {
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, .8);
  font-size: clamp(.82rem, 3.5vw, .96rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iup-goal-stage {
  margin: 0 0 28px;
}

.iup-goal-stage p {
  display: flex;
  gap: 7px;
  align-items: baseline;
  margin: 0 0 12px;
  color: rgba(255, 255, 255, .8);
  font-size: .93rem;
}

.iup-goal-stage strong {
  color: #ffc400;
  font-weight: 820;
}

.iup-goal-stage > i {
  position: relative;
  display: block;
  height: 3px;
  border-radius: 99px;
  background: #5b6574;
}

.iup-goal-stage b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #ffc400;
}

.iup-goal-stage em {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid #ffc400;
  border-radius: 50%;
  background: #ffc400;
  transform: translate(-50%, -50%);
}

.iup-goal-intro {
  margin-bottom: 20px;
}

.iup-goal-intro.compact {
  margin-bottom: 17px;
}

.iup-goal-intro h2,
.iup-goal-level-question h2,
.iup-goal-plan-question > h2 {
  margin: 0 0 6px;
  color: #fff;
  font-size: clamp(1.72rem, 7.7vw, 2.15rem);
  font-weight: 880;
  letter-spacing: -.035em;
  line-height: 1.06;
}

.iup-goal-intro p,
.iup-goal-level-question > p,
.iup-goal-plan-question > p {
  margin: 0;
  color: rgba(255, 255, 255, .74);
  font-size: 1rem;
  line-height: 1.4;
}

.iup-goal-categories,
.iup-goal-eligible-list,
.iup-goal-stack,
.iup-goal-summary-list {
  display: grid;
  gap: 9px;
}

.iup-goal-categories > button,
.iup-goal-eligible-list > button {
  display: grid;
  width: 100%;
  grid-template-columns: 56px minmax(0, 1fr) 28px;
  gap: 12px;
  align-items: center;
  padding: 15px 13px;
  border: 1px solid rgba(131, 149, 177, .43);
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 14, 33, .32);
  text-align: left;
}

.iup-goal-categories > button:disabled {
  opacity: .45;
}

.iup-goal-categories > button > span:first-child,
.iup-goal-eligible-list > button > span:first-child {
  display: grid;
  place-items: center;
  color: #7194ff;
}

.iup-goal-categories > button > span:first-child svg {
  width: 47px;
  height: 47px;
}

.iup-goal-categories > button > span:nth-child(2),
.iup-goal-eligible-list > button > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.iup-goal-categories small,
.iup-goal-context small,
.iup-goal-stack small,
.iup-goal-summary-list small {
  color: #7899ff;
  font-size: .74rem;
  font-weight: 780;
  text-transform: uppercase;
}

.iup-goal-categories strong,
.iup-goal-eligible-list strong {
  color: #fff;
  font-size: 1.16rem;
  font-weight: 820;
  line-height: 1.16;
}

.iup-goal-categories em,
.iup-goal-eligible-list small {
  overflow: hidden;
  color: rgba(255, 255, 255, .72);
  font-size: .86rem;
  font-style: normal;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.iup-goal-categories > button > svg,
.iup-goal-eligible-list > button > svg,
.iup-goal-custom-plan > svg:last-child {
  color: #7194ff;
}

.iup-goal-eligibility-note {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 16px 3px 0;
  color: rgba(255, 255, 255, .76);
  font-size: .91rem;
}

.iup-goal-eligibility-note svg {
  flex: 0 0 auto;
  color: #7194ff;
}

.iup-goal-eligibility-note.bottom {
  margin-top: 38px;
  justify-content: center;
}

.iup-goal-limit,
.iup-goal-save-period {
  margin: 42px 0 0;
  color: rgba(255, 255, 255, .72);
  text-align: center;
}

.iup-goal-chip {
  display: inline-flex;
  min-height: 44px;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  padding: 0 15px;
  border: 1px solid #7899ff;
  border-radius: 999px;
  color: #7899ff;
  font-weight: 760;
}

.iup-goal-chip svg {
  width: 21px;
  height: 21px;
}

.iup-goal-eligible-list > button {
  grid-template-columns: 62px minmax(0, 1fr) 26px;
  min-height: 104px;
  padding: 15px 14px;
}

.iup-goal-eligible-list > button > span:first-child {
  width: 52px;
  height: 52px;
  border: 1px solid #7194ff;
  border-radius: 5px;
}

.iup-goal-eligible-list > button > span:first-child svg {
  width: 39px;
  height: 39px;
}

.iup-goal-text-action {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding: 0;
  border: 0;
  color: #7899ff;
  background: transparent;
}

.iup-goal-context {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
  margin-bottom: 23px;
  padding: 14px 15px;
  border: 1px solid rgba(131, 149, 177, .43);
  border-radius: 8px;
  background: rgba(0, 14, 33, .32);
}

.iup-goal-context > span:first-child,
.iup-goal-stack > article > span,
.iup-goal-summary-list article header > span {
  display: grid;
  place-items: center;
  color: #7899ff;
}

.iup-goal-context > span:first-child svg {
  width: 47px;
  height: 47px;
}

.iup-goal-context h2 {
  margin: 5px 0 3px;
  color: #fff;
  font-size: 1.23rem;
  font-weight: 840;
}

.iup-goal-context p {
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-size: .88rem;
}

.iup-goal-shield {
  color: #7899ff;
}

.iup-goal-level-question {
  min-height: 0;
  overflow-y: auto;
}

.iup-goal-level-question > div,
.iup-goal-plan-question > div {
  display: grid;
  gap: 7px;
  margin-top: 20px;
}

.iup-goal-level-question > div > button,
.iup-goal-plan-question > div > button {
  display: grid;
  width: 100%;
  min-height: 69px;
  grid-template-columns: 45px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 15px;
  border: 1px solid rgba(131, 149, 177, .43);
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 14, 33, .32);
  text-align: left;
}

.iup-goal-level-question > div > button:disabled {
  opacity: .52;
}

.iup-goal-level-question > div > button.selected,
.iup-goal-plan-question > div > button.selected {
  border-color: #ffc400;
  box-shadow: inset 0 0 0 1px #ffc400;
}

.iup-goal-level-question i,
.iup-goal-plan-question i {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 2px solid #7194ff;
  border-radius: 50%;
  color: #061a35;
  font-style: normal;
}

.iup-goal-level-question .selected i,
.iup-goal-plan-question .selected i {
  border-color: #ffc400;
  background: #ffc400;
}

.iup-goal-level-question strong {
  font-size: 1.07rem;
}

.iup-goal-level-question button > span {
  padding: 4px 7px;
  border-radius: 5px;
  color: #07172c;
  background: #ffc400;
  font-size: .76rem;
  font-weight: 850;
}

.iup-goal-info {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 14px 0 0;
  padding: 10px 13px;
  border: 1px solid rgba(131, 149, 177, .33);
  border-radius: 8px;
  color: rgba(255, 255, 255, .78);
}

.iup-goal-info svg {
  color: #7899ff;
}

.iup-goal-action-dock {
  margin: 14px -18px calc(-1 * max(20px, env(safe-area-inset-bottom)));
  padding: 12px 18px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(128, 148, 179, .28);
  background: rgba(2, 20, 44, .97);
}

.iup-goal-action-dock p {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, .7);
  font-size: .9rem;
}

.iup-goal-action-dock button,
.iup-goal-primary {
  display: flex;
  width: 100%;
  min-height: 54px;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  color: #07172c;
  background: linear-gradient(135deg, #ffbb00, #ffd33d);
  font-size: 1.05rem;
  font-weight: 850;
}

.iup-goal-action-dock button:disabled,
.iup-goal-primary:disabled {
  opacity: .5;
}

.iup-goal-plan-question > div > button {
  grid-template-columns: 38px minmax(0, 1fr);
  min-height: 79px;
}

.iup-goal-plan-question > div > button strong {
  font-size: 1rem;
  line-height: 1.28;
}

.iup-goal-custom-plan,
.iup-goal-add-another {
  display: flex;
  width: 100%;
  min-height: 60px;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 9px;
  padding: 10px 16px;
  border: 1px solid #7899ff;
  border-radius: 8px;
  color: #7899ff;
  background: rgba(0, 14, 33, .32);
  font-weight: 800;
}

.iup-goal-custom-plan > span {
  flex: 1;
  text-align: left;
}

.iup-goal-custom-editor {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  color: rgba(255, 255, 255, .78);
  font-weight: 720;
}

.iup-goal-custom-editor textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 84px;
  padding: 11px;
  resize: vertical;
  border: 1px solid #7899ff;
  border-radius: 8px;
  color: #fff;
  background: #031a38;
}

.iup-goal-plan-note {
  margin: 19px 0 8px;
  color: rgba(255, 255, 255, .7);
}

.iup-goal-field-error {
  min-height: 1.1em;
  margin: 6px 0 0;
  color: #ffd25e;
  font-size: .85rem;
}

.iup-goal-stack > article {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 15px 13px;
  border: 1px solid rgba(131, 149, 177, .43);
  border-radius: 8px;
  background: rgba(0, 14, 33, .32);
}

.iup-goal-stack > article > span svg,
.iup-goal-summary-list article header > span svg {
  width: 44px;
  height: 44px;
}

.iup-goal-stack h3 {
  margin: 5px 0;
  color: #fff;
  font-size: 1.18rem;
}

.iup-goal-stack p {
  margin: 0;
  color: rgba(255, 255, 255, .72);
}

.iup-goal-stack article button,
.iup-goal-summary-list article header button {
  padding: 0;
  border: 0;
  color: #7899ff;
  background: transparent;
  font-weight: 760;
}

.iup-goal-stack + .iup-goal-add-another {
  margin-top: 14px;
}

.iup-goal-stack ~ .iup-goal-limit {
  margin: 12px 0 18px;
}

.iup-goal-complete {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 22px 0 18px;
  color: #ffc400;
  font-size: 1.08rem;
  font-weight: 820;
}

.iup-goal-complete svg {
  width: 28px;
  height: 28px;
  padding: 3px;
  border-radius: 50%;
  color: #07172c;
  background: #ffc400;
}

.iup-goal-summary-list article {
  padding: 15px;
  border: 1px solid rgba(131, 149, 177, .43);
  border-radius: 8px;
  background: rgba(0, 14, 33, .32);
}

.iup-goal-summary-list article header {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
}

.iup-goal-summary-list h2 {
  margin: 4px 0;
  color: #fff;
  font-size: 1.15rem;
}

.iup-goal-summary-list header p,
.iup-goal-summary-list article > p {
  margin: 0;
  color: rgba(255, 255, 255, .78);
}

.iup-goal-summary-list article > p {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(131, 149, 177, .28);
}

.iup-goal-summary-list article > p svg {
  flex: 0 0 auto;
  color: #7899ff;
}

.iup-goal-save-period {
  margin: 24px 0 9px;
}

.iup-goal-summary-actions {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 10px;
}

.iup-goal-summary-actions .iup-conversation-secondary {
  min-height: 54px;
}

.iup-goal-success {
  display: grid;
  min-height: calc(100dvh - max(18px, env(safe-area-inset-top)) - max(20px, env(safe-area-inset-bottom)));
  place-content: center;
  text-align: center;
}

.iup-goal-success > div {
  display: grid;
  width: 120px;
  height: 120px;
  place-items: center;
  justify-self: center;
  border: 6px solid #ffc400;
  border-radius: 50%;
  color: #ffc400;
}

.iup-goal-success > div svg {
  width: 68px;
  height: 68px;
}

.iup-goal-success h1 {
  margin: 30px 0 12px;
  color: #fff;
  font-size: 2.15rem;
  font-weight: 900;
  letter-spacing: -.035em;
}

.iup-goal-success > p {
  margin: 0 0 28px;
  color: rgba(255, 255, 255, .72);
  font-size: 1.14rem;
  line-height: 1.5;
}

.iup-goal-success article {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid rgba(131, 149, 177, .43);
  border-radius: 8px;
  text-align: left;
}

.iup-goal-success article > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #07172c;
  background: #ffc400;
}

.iup-goal-success article p {
  margin: 0;
  color: rgba(255, 255, 255, .82);
  line-height: 1.4;
}

.iup-goal-success article strong {
  display: block;
  margin-bottom: 3px;
  color: #ffc400;
}

.iup-goal-link {
  justify-self: center;
  margin-top: 10px;
  padding: 0 12px;
  border: 0;
  color: #7899ff;
  background: transparent;
  font-weight: 800;
}

.iup-goal-link svg {
  margin-right: 7px;
  vertical-align: middle;
}

.iup-goal-setting-screen.phase-current-level,
.iup-goal-setting-screen.phase-target-level {
  display: grid;
  height: 100dvh;
  min-height: 0;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  padding-bottom: 0;
  overflow: hidden;
}

.iup-goal-setting-screen.phase-work-plan .iup-goal-stage,
.iup-goal-setting-screen.phase-current-level .iup-goal-stage,
.iup-goal-setting-screen.phase-target-level .iup-goal-stage {
  margin-bottom: 18px;
}

@media (max-width: 400px) {
  .iup-goal-setting-screen {
    padding-right: 16px;
    padding-left: 16px;
  }

  .iup-goal-header {
    margin-bottom: 10px;
  }

  .iup-goal-stage {
    margin-bottom: 22px;
  }

  .iup-goal-categories > button {
    padding-block: 13px;
  }

  .iup-goal-level-question > div {
    margin-top: 14px;
  }

  .iup-goal-level-question > div > button {
    min-height: 62px;
  }

  .iup-goal-action-dock {
    margin-right: -16px;
    margin-left: -16px;
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (max-width: 350px) {
  .iup-goal-header {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .iup-goal-categories > button,
  .iup-goal-eligible-list > button {
    grid-template-columns: 48px minmax(0, 1fr) 24px;
  }

  .iup-goal-categories > button > span:first-child svg,
  .iup-goal-context > span:first-child svg {
    width: 40px;
    height: 40px;
  }

  .iup-goal-summary-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .iup-goal-setting-screen *,
  .iup-goal-setting-screen *::before,
  .iup-goal-setting-screen *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
