.portal-input-guidance[hidden],
.portal-input-issue[hidden],
[data-guide-anchor="current-product"][hidden],
.user-guide-layer[hidden],
.user-guide-back[hidden],
.user-guide-next[hidden] {
  display: none !important;
}

.portal-input-guidance {
  display: grid;
  gap: 8px;
  margin-top: -2px;
  color: #24312c;
}

.portal-input-guidance-rule {
  padding: 12px 14px;
  border: 1px solid #dfe5e2;
  border-radius: 6px;
  background: #f6f8f7;
}

.portal-input-guidance-rule p {
  margin: 6px 0 0;
  color: #2e3a35;
  font-size: 14px;
  line-height: 1.75;
}

.portal-input-guidance-rule p strong {
  color: #17231f;
  font-size: inherit;
}

.portal-input-guidance-section-label {
  display: block;
  color: #74817b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

#portalInput::placeholder {
  color: #74817b;
  font-weight: 500;
  opacity: 1;
}

.portal-input-issue {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid #efb8ae;
  border-radius: 5px;
  background: #fff5f3;
}

.portal-input-issue strong,
.portal-input-issue span {
  font-size: 12px;
  line-height: 1.55;
}

.portal-input-issue strong {
  color: #a93622;
}

.portal-input-issue span {
  color: #6f443b;
}

.portal-input-issue.is-success {
  border-color: #abd4be;
  background: #f1faf5;
}

.portal-input-issue.is-success strong {
  color: #12623e;
}

.portal-input-issue.is-checking {
  border-color: #d7ddd9;
  background: #f7f8f7;
}

.portal-input-issue.is-checking strong {
  color: #59645f;
}

.portal-input-issue.is-unavailable {
  border-color: #e6c877;
  background: #fffaf0;
}

.portal-input-issue.is-unavailable strong {
  color: #825d0b;
}

.user-guide-layer {
  position: fixed;
  z-index: 1000;
  inset: 0;
  pointer-events: none;
}

.user-guide-backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  animation: user-guide-backdrop-in 180ms ease-out both;
}

.user-guide-spotlights {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.user-guide-spotlight {
  position: fixed;
  border: 2px solid var(--zhuqing-primary, #007b42);
  border-radius: 8px;
  box-shadow: 0 0 0 5px var(--zhuqing-focus-ring, rgba(0, 123, 66, 0.2)), 0 16px 46px rgba(0, 0, 0, 0.24);
  animation: user-guide-target-breathe 1.7s ease-in-out infinite;
}

.user-guide-card {
  position: fixed;
  z-index: 2;
  display: grid;
  gap: 18px;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid rgba(223, 229, 226, 0.92);
  border-radius: 8px;
  outline: 0;
  background: #ffffff;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.3);
  color: #17231f;
  pointer-events: auto;
  transition: top 180ms ease, left 180ms ease;
  animation: user-guide-card-in 180ms ease-out both;
}

.user-guide-card.is-marketplace-choice {
  grid-template-areas: "header header" "copy footer";
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 14px;
  width: min(640px, calc(100vw - 32px));
  min-height: 0;
  padding: 14px 16px;
  overflow: visible;
}

.user-guide-card.is-marketplace-choice > header {
  grid-area: header;
}

.user-guide-card.is-marketplace-choice .user-guide-copy {
  grid-area: copy;
  gap: 4px;
}

.user-guide-card.is-marketplace-choice > footer {
  grid-area: footer;
}

.user-guide-card.is-marketplace-choice .user-guide-copy h2 {
  font-size: 18px;
}

.user-guide-card.is-marketplace-choice .user-guide-copy p {
  font-size: 14px;
  line-height: 1.55;
}

.user-guide-card.is-marketplace-choice > footer {
  min-height: 36px;
}

.user-guide-card.is-marketplace-choice > footer button {
  min-height: 36px;
  padding-right: 12px;
  padding-left: 12px;
}

.user-guide-card.is-detail-choice {
  width: min(280px, calc(100vw - 32px));
  gap: 14px;
  padding: 18px;
}

body[data-user-guide-step="3"] .user-guide-spotlight {
  border-width: 2px;
  box-shadow: 0 0 0 4px var(--zhuqing-focus-ring, rgba(0, 123, 66, 0.2)), 0 12px 34px rgba(0, 0, 0, 0.18);
}

.user-guide-card.is-detail-choice > footer {
  min-height: 28px;
  justify-content: flex-end;
}

.user-guide-card > header,
.user-guide-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-guide-card > header > span {
  color: #75817b;
  font-size: 12px;
  font-weight: 800;
}

.user-guide-back {
  display: inline-flex;
  min-height: 28px;
  padding: 0 4px;
  border: 0;
  border-radius: 4px;
  align-items: center;
  color: #68746e;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.user-guide-back:hover {
  color: #34413b;
  background: #f6f8f7;
}

.user-guide-copy {
  display: grid;
  gap: 10px;
}

.user-guide-copy h2,
.user-guide-copy p {
  margin: 0;
}

.user-guide-copy h2 {
  color: #101a16;
  font-size: 22px;
  line-height: 1.3;
}

.user-guide-copy p {
  color: #35423d;
  font-size: 16px;
  line-height: 1.75;
}

.user-guide-card.is-error .user-guide-copy p {
  color: #a93622;
}

.user-guide-card > footer {
  min-height: 40px;
}

.user-guide-card > footer button {
  min-height: 40px;
  padding: 0 17px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.user-guide-skip {
  min-height: 28px !important;
  padding: 0 7px !important;
  border: 1px solid transparent;
  background: transparent;
  color: #8a948f;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.user-guide-skip:hover {
  color: #4f5c56;
  background: #f6f8f7;
}

.user-guide-next {
  border: 1px solid var(--zhuqing-primary-hover, #006931);
  background: var(--zhuqing-primary, #007b42);
  color: #ffffff;
  box-shadow: 0 7px 18px var(--zhuqing-focus-ring, rgba(0, 123, 66, 0.2));
}

.user-guide-next:hover {
  background: var(--zhuqing-primary-hover, #006931);
}

.user-guide-next:disabled {
  border-color: #d5dcda;
  background: #e8ecea;
  box-shadow: none;
  color: #87928d;
  cursor: default;
}

.user-guide-pointer {
  position: absolute;
  width: 16px;
  height: 16px;
  border: solid rgba(213, 221, 217, 0.94);
  background: #ffffff;
  transform: rotate(45deg);
}

.user-guide-card[data-placement="center"] .user-guide-pointer {
  display: none;
}

.user-guide-card[data-placement="right"] .user-guide-pointer {
  top: calc(50% - 8px);
  left: -9px;
  border-width: 0 0 1px 1px;
}

.user-guide-card[data-placement="left"] .user-guide-pointer {
  top: calc(50% - 8px);
  right: -9px;
  border-width: 1px 1px 0 0;
}

.user-guide-card[data-placement="below"] .user-guide-pointer {
  top: -9px;
  left: calc(50% - 8px);
  border-width: 1px 0 0 1px;
}

.user-guide-card[data-placement="above"] .user-guide-pointer {
  bottom: -9px;
  left: calc(50% - 8px);
  border-width: 0 1px 1px 0;
}

.user-guide-service-pulse {
  animation: user-guide-service-pulse 650ms ease-in-out 3;
  transform-origin: center;
}

.user-shell-guide-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #dfe5e2;
  border-radius: 6px;
  background: #ffffff;
  color: #4f5c56;
  font-size: 13px;
  font-weight: 700;
}

.user-shell-guide-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[data-user-guide-entry].user-guide-entry-reminder {
  position: relative;
  animation: user-guide-entry-reminder 520ms ease-out 2;
}

.user-guide-layer.is-collapsing {
  pointer-events: auto;
}

.user-guide-layer.is-collapsing .user-guide-backdrop,
.user-guide-layer.is-collapsing .user-guide-spotlights {
  animation: user-guide-backdrop-out 520ms ease-out both;
}

.user-guide-card.is-collapsing {
  pointer-events: none;
  transform-origin: center;
  will-change: transform, opacity;
  animation: user-guide-card-collapse 520ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.user-guide-card.is-collapsing .user-guide-pointer {
  display: none;
}

@keyframes user-guide-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes user-guide-card-in {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes user-guide-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes user-guide-card-collapse {
  from { opacity: 1; transform: translate(0, 0) scale(1); }
  72% { opacity: 0.92; }
  to {
    opacity: 0;
    transform: translate(var(--user-guide-collapse-x), var(--user-guide-collapse-y)) scale(var(--user-guide-collapse-scale));
  }
}

@keyframes user-guide-target-breathe {
  0%, 100% { border-color: var(--zhuqing-primary, #007b42); box-shadow: 0 0 0 5px var(--zhuqing-focus-ring, rgba(0, 123, 66, 0.2)), 0 16px 46px rgba(0, 0, 0, 0.24); }
  50% { border-color: var(--zhuqing-anchor, #00a86b); box-shadow: 0 0 0 9px rgba(0, 123, 66, 0.1), 0 16px 46px rgba(0, 0, 0, 0.24); }
}

@keyframes user-guide-service-pulse {
  0%, 100% { color: inherit; transform: scale(1); }
  50% { color: #ffffff; transform: scale(1.05); }
}

@keyframes user-guide-entry-reminder {
  0%, 100% { border-color: #dfe5e2; box-shadow: none; }
  50% { border-color: var(--zhuqing-primary, #007b42); box-shadow: 0 0 0 5px var(--zhuqing-focus-ring, rgba(0, 123, 66, 0.2)); }
}

@media (max-width: 920px) {
  .user-shell-guide-action span {
    display: none;
  }

  .user-shell-guide-action {
    width: 38px;
    padding: 0;
  }
}

@media (max-width: 720px) {
  .user-guide-card {
    width: calc(100vw - 24px);
    max-height: calc(100svh - 24px);
    gap: 15px;
    padding: 18px;
  }

  .user-guide-copy h2 {
    font-size: 20px;
  }

  .user-guide-copy p {
    font-size: 14px;
    line-height: 1.7;
  }

  .user-guide-card.is-marketplace-choice {
    grid-template-areas: "header header" "copy footer";
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    width: calc(100vw - 24px);
    padding: 12px;
  }

  .user-guide-card.is-marketplace-choice .user-guide-copy h2 {
    font-size: 16px;
  }

  .user-guide-card.is-marketplace-choice .user-guide-copy p {
    font-size: 13px;
    line-height: 1.45;
  }

  .user-shell-guide-action {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .user-guide-backdrop,
  .user-guide-card,
  .user-guide-spotlight,
  .user-guide-service-pulse,
  .user-guide-layer.is-collapsing .user-guide-backdrop,
  .user-guide-layer.is-collapsing .user-guide-spotlights,
  .user-guide-card.is-collapsing,
  [data-user-guide-entry].user-guide-entry-reminder {
    animation: none;
    transition: none;
  }
}
