/* Deepsea persona local presentation layer; no scoring or matching styles. */
.deepsea-quiz-progress {
  --deepsea-progress: 0%;
  --deepsea-fish-x: 0px;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 54px;
  margin: 14px 0 20px;
  padding: 0 4px 0 0;
  color: #28566a;
}
.deepsea-quiz-progress[hidden] { display: none !important; }
.deepsea-waterline {
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #8bc9c5, #d4ece8 65%, #dfecea);
  border-radius: 99px;
}
.deepsea-waterline::after {
  content: "";
  display: block;
  width: var(--deepsea-progress);
  height: 100%;
  background: #3c9da0;
  transition: width 240ms ease;
}
.deepsea-quiz-progress img {
  position: absolute;
  z-index: 1;
  left: var(--deepsea-fish-x);
  width: 52px;
  height: 52px;
  object-fit: contain;
  transform: none;
  transition: left 240ms ease;
  pointer-events: none;
}
.deepsea-progress-label {
  position: absolute;
  top: 2px;
  right: 0;
  padding: 3px 8px;
  color: #52727b;
  background: rgba(246, 251, 249, .92);
  border-radius: 999px;
  font-size: 12px;
}
#quizView.quiz-deepsea,
#quizView.quiz-calibration.quiz-deepsea {
  background: linear-gradient(155deg, #e8f5f4 0%, #f3f8f4 54%, #fff8ef 100%);
  color: #153d53;
}
#quizView.quiz-deepsea .quiz-card,
#quizView.quiz-deepsea .quiz-wrap > .card {
  color: #153d53;
  background: rgba(255, 253, 248, .97);
  border: 1px solid rgba(80, 151, 158, .18);
  box-shadow: 0 20px 54px rgba(35, 93, 104, .11);
}
#quizView.quiz-deepsea .quiz-q,
#quizView.quiz-deepsea #questionText { color: #153d53; }
#quizView.quiz-deepsea .quiz-opt,
#quizView.quiz-deepsea .answer-option {
  color: #244e61;
  background: #fffefa;
  border: 1px solid #d5e8e5;
  transition: background-color 240ms ease, border-color 240ms ease, transform 180ms ease, box-shadow 180ms ease;
}
#quizView.quiz-deepsea .quiz-opt:active,
#quizView.quiz-deepsea .answer-option:active { transform: scale(.985); }
#quizView.quiz-deepsea .quiz-opt.selected,
#quizView.quiz-deepsea .answer-option.selected {
  background: #e1f2ef;
  border-color: #4dada9;
  box-shadow: 0 0 0 2px rgba(77, 173, 169, .13);
}
#quizView.quiz-deepsea .opt-check,
#quizView.quiz-deepsea .answer-check { color: #167e82; }
#quizView.quiz-deepsea .quiz-card,
#quizView.quiz-deepsea .answer-list {
  animation: deepsea-question-in 240ms ease both;
}
#quizView.quiz-deepsea .deepsea-question-in { animation: deepsea-question-in 240ms ease both; }
@keyframes deepsea-question-in {
  from { opacity: .25; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.deepsea-persona-view { min-height: 100%; background: linear-gradient(150deg, #e9f4f3, #fbfaf5 62%, #fff4e9); color: #183d52; }
.deepsea-persona-root { box-sizing: border-box; width: min(100%, 1360px); margin: 0 auto; padding: clamp(16px, 3vw, 38px); }
.deepsea-persona-root *, .deepsea-persona-root *::before, .deepsea-persona-root *::after { box-sizing: border-box; }
.deepsea-result-page { color: #183d52; }
.deepsea-result-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: clamp(18px, 3vw, 34px); color: #54727a; font-size: 13px; }
.deepsea-brand-mark { font-weight: 700; letter-spacing: .04em; }
.deepsea-brand-mark i { color: #e09c53; font-style: normal; }
.deepsea-back, .deepsea-quiet-btn { min-height: 42px; padding: 8px 14px; border: 1px solid #c9dfdc; border-radius: 999px; color: #28566a; background: rgba(255,255,255,.8); cursor: pointer; font: inherit; }
.deepsea-result-main { max-width: 1160px; margin: 0 auto; }
.deepsea-hero { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto; grid-template-areas: "heading" "art" "traits" "actions"; justify-items: center; align-items: center; gap: 0; padding: clamp(20px, 3vw, 38px) clamp(16px, 4vw, 54px); background: linear-gradient(120deg, rgba(255,253,248,.83), rgba(238,247,243,.72)); border-radius: 30px; }
.deepsea-hero-heading { grid-area: heading; margin-bottom: 18px; text-align: center; }
.deepsea-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; }
.deepsea-hero .deepsea-sr-only:focus { position: static !important; width: auto !important; height: auto !important; overflow: visible !important; clip: auto !important; margin: 0; outline: 3px solid #f3a044; outline-offset: 4px; }
.deepsea-eyebrow { margin: 0 0 10px; color: #328b91; font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.deepsea-hero h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin: 0; color: #153d53; font-size: clamp(42px, 5.2vw, 68px); line-height: 1.12; letter-spacing: -.035em; }
.deepsea-hero h1 span { color: #63838a; font-size: clamp(12px, 1.15vw, 16px); letter-spacing: .09em; }
.deepsea-type-title { margin: 10px 0 0; color: #458e91; font-size: clamp(17px, 1.7vw, 22px); font-weight: 700; }
.deepsea-character { grid-area: art; display: flex; width: 100%; min-width: 0; flex-direction: column; align-items: center; justify-content: center; margin: 0; }
.deepsea-character-stage { position: relative; display: grid; width: min(100%, 760px); aspect-ratio: 1; place-items: center; overflow: hidden; background: transparent; container-type: inline-size; }
.deepsea-character-image { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.deepsea-fly-poster-title { position: absolute; z-index: 1; pointer-events: none; }
.deepsea-fly-poster-title { top: 8.5%; left: 2.5%; display: flex; width: 39%; height: 10.5%; align-items: center; padding-left: 1%; color: #e56e32; background: #eef8fb; border-radius: 8px; font-size: clamp(16px, 4.1cqw, 34px); font-weight: 800; white-space: nowrap; }

.deepsea-character.is-image-fallback .deepsea-character-stage { min-height: 250px; border: 1px dashed #a6c9c5; border-radius: 20px; background: #edf6f2; }
.deepsea-character.is-image-fallback .deepsea-character-stage::after { content: "完整海报暂时无法加载"; color: #63838a; font-size: 14px; }
.deepsea-poster-link { min-height: 36px; padding: 6px 10px; border: 0; color: #547a81; background: transparent; font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.deepsea-one-liner { grid-area: line; max-width: 520px; margin: 22px 0 0; color: #264f62; font-size: clamp(20px, 2.25vw, 29px); font-weight: 650; line-height: 1.5; }
.deepsea-tags { grid-area: traits; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.deepsea-tags li { padding: 7px 12px; color: #26787f; background: #e3f2ef; border-radius: 999px; font-size: 13px; line-height: 1.35; }
.deepsea-hero-actions { grid-area: actions; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 20px; margin-top: 22px; }
.deepsea-primary, .deepsea-secondary { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 10px 18px; border: 0; border-radius: 999px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .18s ease, background-color .18s ease; }
.deepsea-primary { color: #fff; background: linear-gradient(120deg, #388f98, #267b83); box-shadow: 0 6px 16px rgba(41, 122, 131, .14); }
.deepsea-secondary { color: #286673; background: #e4f0ed; }
.deepsea-primary:hover, .deepsea-secondary:hover { transform: translateY(-1px); }
.deepsea-read-link { color: #356d78; font-size: 14px; font-weight: 600; text-decoration: none; }
.deepsea-read-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.deepsea-explanation { max-width: 900px; margin: 28px auto 0; padding: 0 clamp(4px, 2vw, 20px); scroll-margin-top: 28px; }
.deepsea-explanation-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; padding-bottom: 20px; border-bottom: 1px solid rgba(58, 120, 127, .23); }
.deepsea-explanation-heading .deepsea-eyebrow { margin-bottom: 6px; }
.deepsea-explanation-heading h2 { margin: 0; color: #173f54; font-size: clamp(26px, 3vw, 36px); line-height: 1.3; }
.deepsea-intro-nickname { display: inline-block; margin-top: 7px; color: #69838a; font-size: 13px; }
.deepsea-ai-tools { display: flex; min-width: 210px; flex-direction: column; align-items: flex-end; gap: 3px; }
.deepsea-ai-tools p { min-height: 1.4em; margin: 0; color: #798b8c; font-size: 12px; text-align: right; }
.deepsea-ai-tools .deepsea-quiet-btn { min-height: 34px; padding: 5px 11px; color: #47757d; background: rgba(255,255,255,.55); font-size: 12px; }
.deepsea-ai-tools .deepsea-quiet-btn:disabled { opacity: .7; cursor: progress; }
.deepsea-story { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 46px); padding-top: 26px; }
.deepsea-story section { min-width: 0; padding-top: 13px; border-top: 2px solid #d3e6e0; }
.deepsea-story h3 { margin: 0 0 10px; color: #2f757c; font-size: 16px; line-height: 1.45; }
.deepsea-story p { margin: 0; color: #405f69; font-size: 15px; line-height: 1.85; }
.deepsea-extra { max-width: 900px; margin: 34px auto 0; border-top: 1px solid rgba(58,120,127,.2); color: #405f69; }
.deepsea-extra:last-of-type { border-bottom: 1px solid rgba(58,120,127,.2); }
.deepsea-extra summary { display: flex; min-height: 56px; align-items: center; gap: 10px; color: #356d78; font-size: 15px; font-weight: 650; cursor: pointer; list-style-position: inside; }
.deepsea-extra summary span { color: #7b8d8d; font-size: 12px; font-weight: 400; }
.deepsea-extra[open] > div { max-width: 760px; padding: 0 0 20px 22px; }
.deepsea-extra p { margin: 4px 0 12px; line-height: 1.8; }
.deepsea-extra a { color: #267a83; }
.deepsea-extra small { display: block; margin-top: 10px; color: #77898d; line-height: 1.6; }
.deepsea-result-footer { display: flex; justify-content: space-between; gap: 12px; margin: 38px 0 16px; }
.deepsea-primary:focus-visible, .deepsea-secondary:focus-visible, .deepsea-back:focus-visible, .deepsea-quiet-btn:focus-visible, .deepsea-read-link:focus-visible, .deepsea-extra summary:focus-visible { outline: 3px solid #f3a044; outline-offset: 3px; }
.deepsea-unmapped { max-width: 680px; margin: 8vh auto; padding: clamp(22px, 5vw, 48px); color: #234c5d; background: #fffdf8; border-radius: 26px; }
.deepsea-share-dialog, .deepsea-poster-dialog { position: fixed; inset: 0; width: min(92vw, 660px); max-height: 92dvh; overflow: auto; margin: auto; padding: clamp(18px, 3vw, 28px); color: #183d52; background: #fffdf8; border: 1px solid #d5e8e5; border-radius: 22px; box-shadow: 0 24px 80px rgba(11, 48, 67, .3); }
.deepsea-share-dialog::backdrop, .deepsea-poster-dialog::backdrop { background: rgba(10, 37, 51, .58); }
.deepsea-share-dialog[open], .deepsea-poster-dialog[open] { animation: deepsea-dialog-in .2s ease-out both; }
@keyframes deepsea-dialog-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.deepsea-share-dialog form, .deepsea-poster-dialog form { position: absolute; top: 14px; right: 14px; }
.deepsea-dialog-close { width: 40px; height: 40px; border: 0; border-radius: 50%; color: #244d60; background: #e5f0ed; font-size: 26px; cursor: pointer; }
.deepsea-share-dialog h2, .deepsea-poster-dialog h2 { margin: 0 0 14px; padding-right: 46px; color: #173f54; font-size: 24px; }
.deepsea-share-preview { display: block; width: min(100%, 410px); max-height: 62dvh; height: auto; aspect-ratio: 3 / 4; object-fit: contain; margin: 0 auto; border-radius: 12px; background: #e7f2ef; box-shadow: 0 8px 26px rgba(32, 82, 88, .12); }
.deepsea-share-caption { max-width: 490px; margin: 14px auto; color: #52717a; line-height: 1.65; text-align: center; }
.deepsea-share-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.deepsea-share-actions button:disabled { opacity: .55; cursor: progress; }
.deepsea-share-status { min-height: 1.5em; margin: 9px 0 0; color: #547a81; font-size: 13px; text-align: center; }
.deepsea-share-retry { display: block; margin: 0 auto; }
.deepsea-poster-dialog { width: min(94vw, 780px); }
.deepsea-poster-full { display: block; width: min(100%, 680px); max-height: 78dvh; height: auto; object-fit: contain; margin: 0 auto; border-radius: 14px; background: #eff7f4; }
.deepsea-poster-dialog.is-image-fallback { min-height: 240px; }
.deepsea-poster-dialog.is-image-fallback::after { content: "完整海报暂时无法加载"; display: block; padding: 40px; color: #63838a; text-align: center; }
.deepsea-export-card { position: fixed; z-index: -1; top: 0; left: -1200px; display: flex; width: 1080px; height: 1440px; flex-direction: column; overflow: hidden; padding: 66px 72px 54px; color: #173f54; background: linear-gradient(150deg, #e9f5f3 0%, #f8fbf7 56%, #fff5e8 100%); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
.deepsea-export-card header { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 22px; border-bottom: 2px solid rgba(51,121,129,.18); }
.deepsea-export-brand { color: #287c84; font-size: 38px; font-weight: 800; letter-spacing: .02em; }
.deepsea-export-label { color: #68858a; font-size: 24px; letter-spacing: .08em; }
.deepsea-export-art { display: grid; height: 770px; flex: 0 0 770px; place-items: center; margin: 18px -16px 0; }
.deepsea-export-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.deepsea-export-copy { padding: 0 8px; }
.deepsea-export-fish { display: flex; align-items: baseline; gap: 18px; margin: 2px 0 0; color: #153d53; font-size: 47px; font-weight: 750; line-height: 1.25; }
.deepsea-export-fish span { color: #69878c; font-size: 19px; font-weight: 600; letter-spacing: .08em; }
.deepsea-export-copy h1 { margin: 8px 0 12px; color: #438b8f; font-size: 30px; line-height: 1.35; }
.deepsea-export-line { margin: 0; color: #284f62; font-size: 27px; font-weight: 650; line-height: 1.55; }
.deepsea-export-copy ul { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.deepsea-export-copy li { padding: 10px 18px; color: #26787f; background: rgba(49,145,156,.13); border-radius: 999px; font-size: 22px; line-height: 1.35; }
.deepsea-export-card footer { margin-top: auto; padding: 20px 8px 0; border-top: 1px solid rgba(51,121,129,.18); color: #6c8587; font-size: 19px; letter-spacing: .02em; }
.deepsea-motion-pending { opacity: 0; transform: translateY(12px); }
.deepsea-css-reveal { animation: deepsea-result-in .28s ease-out var(--deepsea-reveal-delay, 0ms) both; }
@keyframes deepsea-result-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 800px) {
  .deepsea-persona-root { padding: clamp(14px, 4vw, 26px); }
  .deepsea-result-top { margin-bottom: 16px; }
  .deepsea-hero { grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto auto auto; grid-template-areas: "heading" "art" "traits" "actions"; gap: 0; padding: clamp(14px, 4vw, 24px) clamp(10px, 3vw, 18px); border-radius: 24px; }
  .deepsea-type-title { margin-top: 6px; font-size: clamp(16px, 4.4vw, 20px); }
  .deepsea-character { min-height: 0; }
  .deepsea-character-stage { width: min(100%, 520px); height: auto; min-height: 0; }
  .deepsea-tags { justify-content: center; margin-top: 12px; }
  .deepsea-hero-actions { justify-content: center; margin-top: 18px; }
  .deepsea-hero-actions .deepsea-primary { width: min(100%, 360px); }
  .deepsea-read-link { padding: 8px; }
  .deepsea-explanation { margin-top: 24px; }
  .deepsea-explanation-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .deepsea-ai-tools { min-width: 0; align-items: flex-start; }
  .deepsea-ai-tools p { text-align: left; }
  .deepsea-story { grid-template-columns: minmax(0,1fr); gap: 20px; padding-top: 20px; }
  .deepsea-story section { padding-top: 10px; }
  .deepsea-result-footer { margin-top: 28px; }
}
@media (max-width: 390px) {
  .deepsea-persona-root { padding: 12px; }
  .deepsea-result-top { align-items: flex-start; font-size: 11px; }
  .deepsea-back { min-height: 40px; padding-inline: 10px; }
  .deepsea-brand-mark { padding-top: 10px; }
  .deepsea-hero { padding: 18px 12px; }
  .deepsea-hero h1 { font-size: clamp(36px, 10vw, 42px); }
  .deepsea-character-stage { width: min(100%, 520px); height: auto; min-height: 0; }
  .deepsea-tags { gap: 6px; }
  .deepsea-tags li { padding: 6px 9px; font-size: 12px; }
  .deepsea-hero-actions { gap: 8px; }
  .deepsea-share-dialog, .deepsea-poster-dialog { padding: 18px 14px; border-radius: 18px; }
}
#quizView.quiz-deepsea .quiz-progress,
#quizView.quiz-deepsea .progress-track { display: none; }
#eventHubRoot .hz-deepsea .hz-fish-stack img { object-fit: contain; background: rgba(255, 253, 248, .84); }
#eventHubRoot .hz-deepsea .hz-fish-stack.is-single {
  display: flex;
  flex: 0 0 142px;
  align-items: center;
  justify-content: center;
  width: 142px;
  height: 142px;
}
#eventHubRoot .hz-deepsea .hz-fish-stack.is-single img {
  position: relative;
  inset: auto;
  display: block;
  width: 132px;
  height: 132px;
  border: 0;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 8px 22px rgba(25, 75, 87, .15);
  animation: none;
  transform: none;
}
#eventHubRoot .hz-persona-strip.hz-deepsea.has-result { background: linear-gradient(110deg, #e6f1ef, #f1f6f2); }
@media (max-width: 650px) {
  #eventHubRoot .hz-deepsea .hz-fish-stack.is-single { width: 110px; height: 110px; }
  #eventHubRoot .hz-deepsea .hz-fish-stack.is-single img { width: 104px; height: 104px; }
}
@media (prefers-reduced-motion: reduce) {
  .deepsea-waterline::after, .deepsea-quiz-progress img, #quizView.quiz-deepsea *, .deepsea-persona-view * { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* Result identity stays above the poster at every breakpoint. */
.deepsea-hero .deepsea-hero-heading h1 { display: block; font-size: clamp(22px, 3vw, 30px); line-height: 1.35; letter-spacing: .04em; color: #2f757c; }

.deepsea-explanation > .deepsea-ai-tools { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(58,120,127,.15); align-items: flex-start; }
.deepsea-explanation > .deepsea-ai-tools p { text-align: left; }

.deepsea-explanation-heading .deepsea-intro-nickname { display: block; margin-top: 12px; max-width: 34em; font-size: clamp(18px, 2.2vw, 24px); line-height: 1.6; color: #2f757c; font-weight: 650; }

/* Share and retake stay together, including narrow phone screens. */
.deepsea-hero-actions { flex-wrap: nowrap; width: 100%; gap: 10px; }
.deepsea-hero-actions .deepsea-primary { width: auto; min-width: 0; }
.deepsea-hero-actions .deepsea-secondary { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 480px) {
  .deepsea-hero-actions { gap: 8px; }
  .deepsea-hero-actions .deepsea-primary { flex: 1; padding: 12px 8px; font-size: 14px; white-space: nowrap; }
  .deepsea-hero-actions .deepsea-secondary { padding: 12px 10px; font-size: 14px; }
}

/* Shared web brand and persistent result navigation. */
.deepsea-result-top { position: sticky; top: 0; z-index: 30; min-height: 68px; padding: 12px 0; background: #f7f5ef; border-bottom: 1px solid #d5e7e2; }
.deepsea-result-page { color: #284b43; }
.deepsea-hero .deepsea-hero-heading h1, .deepsea-explanation-heading h2 { color: #57b7b7; }
.deepsea-primary { background: #57b7b7; color: #173f3e; }
.deepsea-primary:hover { background: #48a8a8; }
.deepsea-secondary, .deepsea-back, .deepsea-quiet-btn { color: #285a53; border-color: #b8dcd6; }
.deepsea-story h3, .deepsea-explanation-heading .deepsea-intro-nickname { color: #347c72; }
.deepsea-story p { color: #48655e; }
.deepsea-share-preview { aspect-ratio: auto; }

/* Compact, native modal retains the page behind the questionnaire/result. */
body.deepsea-modal-open { overflow: hidden; }
.deepsea-surface-dialog { width: min(720px, calc(100vw - 32px)); max-height: min(88dvh, 900px); padding: 0; margin: auto; border: 1px solid #c9dfd9; border-radius: 24px; background: #f7f5ef; color: #284b43; overflow: auto; overscroll-behavior: contain; box-shadow: 0 24px 80px #203d4333; }
.deepsea-surface-dialog::backdrop { background: #193e4359; }
.deepsea-surface-close { position: sticky; top: 10px; float: right; margin: 10px 12px -44px 0; z-index: 50; width: 36px; height: 36px; border: 1px solid #c9dfd9; border-radius: 50%; background: #fffdf8; color: #285a53; font-size: 24px; cursor: pointer; }
.deepsea-surface-dialog .deepsea-modal-content { display: block !important; min-height: 0 !important; height: auto !important; margin: 0 !important; }
.deepsea-surface-dialog .deepsea-persona-root { width: 100%; padding: 0 20px 24px; }
.deepsea-surface-dialog .deepsea-result-top { padding-right: 42px; margin-bottom: 16px; }
.deepsea-surface-dialog .deepsea-hero { padding: 18px; border-radius: 18px; }
.deepsea-surface-dialog .deepsea-character-stage { max-width: 400px; }
.deepsea-surface-dialog .deepsea-story { grid-template-columns: 1fr; gap: 18px; }
.deepsea-surface-dialog #quizView:not(.persona-quiz-active) { padding: 48px 20px 24px !important; background: #f7f5ef; }
.deepsea-surface-dialog #quizView .quiz-card, .deepsea-surface-dialog #quizView .quiz-wrap { width: 100%; max-width: 100%; min-height: 0; margin: 0; padding: 16px; }
.deepsea-reading-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 22px; }
.deepsea-reading-grid section { padding: 18px; border: 1px solid #d5e7e2; border-radius: 16px; background: #edf5f0; }
.deepsea-reading-grid h3 { margin: 0 0 10px; color: #347c72; font-size: 16px; }
.deepsea-reading-grid p { margin: 0; color: #48655e; font-size: 15px; line-height: 1.85; }
@media(max-width:600px) {
 .deepsea-surface-dialog { width: calc(100vw - 20px); max-height: 90dvh; border-radius: 18px; }
 .deepsea-surface-dialog .deepsea-persona-root { padding: 0 12px 18px; }
 .deepsea-surface-dialog .deepsea-hero { padding: 14px 8px; }
 .deepsea-reading-grid { grid-template-columns: 1fr; }
 .deepsea-surface-dialog #quizView:not(.persona-quiz-active) { padding: 48px 10px 18px !important; }
}

.deepsea-ai-tools[hidden] { display: none !important; }
.deepsea-result-note { max-width: 900px; margin: 24px auto 0; padding: 0 clamp(4px, 2vw, 20px); color: #7b8d87; font-size: 12px; line-height: 1.75; }

/* Unified modal chrome: one navigation row, one scrolling content area. */
.deepsea-surface-dialog[open] { display: flex; flex-direction: column; overflow: hidden; width: min(680px, calc(100vw - 32px)); }
.deepsea-surface-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; padding: 12px 18px; border-bottom: 1px solid #d5e7e2; background: #f7f5ef; color: #416b64; }
.deepsea-surface-nav span { font-size: 13px; font-weight: 650; }
.deepsea-surface-nav .deepsea-surface-close { position: static; float: none; margin: 0; flex: 0 0 36px; }
/* The persona header owns its mobile close control; generic modal buttons do not. */
@media (max-width: 767px) {
 .deepsea-surface-nav { padding-block: 8px; }
 .deepsea-surface-nav .deepsea-surface-close {
   display: grid; place-items: center; box-sizing: border-box;
   flex: 0 0 44px; width: 44px; min-width: 44px; height: 44px; min-height: 44px;
   padding: 0; margin: 0; border: 1px solid #b5d7d3; border-radius: 50%;
   background: var(--hz-accent-soft, #e6f3f1); color: var(--hz-accent-ink, #173c3c);
   appearance: none; -webkit-appearance: none; line-height: 1; box-shadow: none;
   touch-action: manipulation; -webkit-tap-highlight-color: transparent;
 }
 .deepsea-surface-nav .deepsea-surface-close:active { background: #d4eae8; }
 .deepsea-surface-nav .deepsea-surface-close:focus-visible {
   outline: 3px solid var(--hz-teal-700, #2f7777); outline-offset: 2px;
 }
}

.deepsea-surface-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #b8dcd6 transparent; }
.deepsea-surface-dialog .deepsea-result-top { display: none; }
.deepsea-surface-dialog .deepsea-persona-root { padding-top: 16px; }
.deepsea-surface-dialog .deepsea-character-stage { max-width: min(340px, 42dvh); }
.deepsea-surface-dialog .deepsea-hero .deepsea-hero-heading h1 { font-size: 24px; }
.deepsea-surface-dialog .deepsea-hero-heading { margin-bottom: 12px; }
.deepsea-surface-dialog .deepsea-hero-actions { margin-top: 14px; }
.deepsea-surface-dialog .deepsea-primary, .deepsea-surface-dialog .deepsea-secondary { min-height: 44px; padding: 10px 18px; font-size: 15px; border-radius: 14px; }
.deepsea-surface-dialog .deepsea-tags { margin-top: 12px; }
.deepsea-surface-dialog .deepsea-tags li { padding: 6px 12px; font-size: 13px; }
.deepsea-surface-nav button:focus-visible { outline: 3px solid #347c72; outline-offset: 3px; }
.deepsea-reading-grid section { transition: border-color .18s ease, box-shadow .18s ease; }
@media(hover:hover) { .deepsea-reading-grid section:hover { border-color: #8fc8be; box-shadow: 0 4px 14px #285a530b; } }
@media(max-width:480px) {
 .deepsea-surface-dialog[open] { width: calc(100vw - 20px); }
 .deepsea-surface-nav { padding: 8px 12px; gap: 8px; }
 .deepsea-surface-nav .deepsea-back { padding: 8px 10px; }
 .deepsea-surface-dialog .deepsea-character-stage { max-width: min(100%, 36dvh); }
 .deepsea-surface-dialog .deepsea-primary, .deepsea-surface-dialog .deepsea-secondary { padding: 10px; font-size: 13px; }
}
@media(prefers-reduced-motion:reduce) { .deepsea-reading-grid section { transition: none; } }

/* Result detail only: the native dialog is the sole surface. Questionnaire
   cards and the standalone result page retain their existing appearance. */
.deepsea-surface-dialog .deepsea-persona-root { padding: 20px 28px 28px; }
.deepsea-surface-dialog .deepsea-hero {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.deepsea-surface-dialog .deepsea-hero-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  margin: -1px;
}
.deepsea-surface-dialog .deepsea-character-stage { max-width: min(100%, 400px); }
.deepsea-surface-dialog .deepsea-character-image { height: auto; aspect-ratio: 1; object-fit: contain; }
.deepsea-surface-dialog .deepsea-tags { margin-top: 16px; }
.deepsea-surface-dialog .deepsea-hero-actions { margin-top: 18px; }
.deepsea-surface-dialog .deepsea-explanation { margin-top: 28px; padding: 22px 0 0; border-top: 1px solid #d5e7e2; }
.deepsea-surface-dialog .deepsea-explanation-heading { padding-bottom: 18px; border-bottom: 0; }
.deepsea-surface-dialog .deepsea-explanation-heading h2 { color: #416b64; font-size: 18px; font-weight: 650; }
.deepsea-surface-dialog .deepsea-intro-nickname { display: block; margin-top: 10px; color: #347c72; font-size: 16px; line-height: 1.7; }
.deepsea-surface-dialog .deepsea-story { padding-top: 0; gap: 20px; }
.deepsea-surface-dialog .deepsea-story section { padding-top: 16px; border-top: 1px solid #d5e7e2; }
.deepsea-surface-dialog .deepsea-reading-grid { grid-template-columns: 1fr; gap: 20px; }
.deepsea-surface-dialog .deepsea-reading-grid section { padding: 16px 0 0; border: 0; border-top: 1px solid #d5e7e2; border-radius: 0; background: transparent; box-shadow: none; }
.deepsea-surface-dialog .deepsea-reading-grid section:hover { border-color: #d5e7e2; box-shadow: none; }
.deepsea-surface-dialog .deepsea-result-note { padding: 0; }
@media(max-width:480px) {
  .deepsea-surface-dialog .deepsea-persona-root { padding: 16px 14px 22px; }
  .deepsea-surface-dialog .deepsea-character-stage { max-width: 100%; }
  .deepsea-surface-dialog .deepsea-hero-actions { gap: 8px; flex-wrap: wrap; }
  .deepsea-surface-dialog .deepsea-primary, .deepsea-surface-dialog .deepsea-secondary { flex: 1 1 auto; padding: 11px 10px; font-size: 13px; }
}

.deepsea-surface-dialog .hz-modal-close-icon, .deepsea-share-dialog .hz-modal-close-icon { display: block; width: 20px; height: 20px; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* The moved page must not retain its full-page scene or outer page gutters. */
.deepsea-surface-dialog #deepseaPersonaView { padding: 0 !important; background: transparent !important; border: 0; box-shadow: none; }
.deepsea-surface-dialog #deepseaPersonaView::before, .deepsea-surface-dialog #deepseaPersonaView::after { display: none !important; }
.deepsea-surface-dialog #quizExitBtn, .deepsea-surface-dialog #webQuizReturnBtn { display: none; }
