:root {
  --ink: #2f2634;
  --muted: #8d7d91;
  --paper: #fffaf2;
  --paper-deep: #fbefe2;
  --line: rgba(126, 91, 116, 0.18);
  --violet: #8b69cc;
  --violet-deep: #6148a3;
  --gold: #d89a4f;
  --rose: #e8a4a4;
  --mint: #8cc6b5;
  --night: #101733;
  --night-panel: rgba(25, 35, 74, 0.84);
  --shadow: 0 26px 70px rgba(82, 55, 102, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background-color: #fff7ef;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 210, 184, 0.7), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(178, 201, 255, 0.62), transparent 30%),
    linear-gradient(135deg, #fff7ee 0%, #f1ebff 54%, #eef7ff 100%),
    #fff7ef;
  background-repeat: no-repeat;
  background-size: cover;
}

body {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background-color: #fff7ef;
  color: var(--ink);
  font-family: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.demo-shell {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(360px, 430px);
  align-items: center;
  justify-content: center;
  gap: 44px;
  min-height: 100vh;
  padding: 32px;
}

.intro-panel {
  max-width: 380px;
}

.brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(139, 105, 204, 0.32);
  border-radius: 16px;
  background: rgba(255, 250, 242, 0.68);
  box-shadow: 0 14px 36px rgba(120, 81, 161, 0.18);
  color: var(--violet-deep);
  font-size: 18px;
  font-weight: 800;
}

.eyebrow,
.tiny-label {
  margin: 0;
  color: var(--violet-deep);
  font-size: 13px;
  font-weight: 700;
}

.intro-panel h1 {
  margin: 16px 0 12px;
  font-size: 42px;
  line-height: 1.08;
}

.intro-panel p {
  margin: 0;
  color: #6d5e71;
  font-size: 16px;
  line-height: 1.8;
}

.intro-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.intro-pills span {
  padding: 9px 13px;
  border: 1px solid rgba(139, 105, 204, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: #665073;
  font-size: 13px;
  font-weight: 700;
}

.phone-frame {
  position: relative;
  width: min(100%, 410px);
  aspect-ratio: 390 / 844;
  padding: 10px;
  border: 1px solid rgba(87, 67, 103, 0.16);
  border-radius: 35px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow);
}

.phone-screen {
  position: relative;
  overflow: hidden;
  height: 100%;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 250, 243, 0.98), rgba(255, 247, 239, 0.98)),
    var(--paper);
}

.view {
  position: absolute;
  inset: 34px 0 0;
  display: none;
  overflow: auto;
  padding: 14px 18px 122px;
  scrollbar-width: none;
}

.view::-webkit-scrollbar {
  display: none;
}

.view.active {
  display: block;
}

.view.dark {
  color: #f8f4ff;
  background:
    radial-gradient(1px 1px at 15% 12%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 42% 8%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 68% 18%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 88% 6%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 25% 35%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 75% 42%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 55% 65%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 10% 58%, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 92% 72%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(circle at 50% 22%, rgba(87, 119, 234, 0.34), transparent 38%),
    radial-gradient(circle at 20% 82%, rgba(137, 92, 217, 0.24), transparent 22%),
    linear-gradient(180deg, #111936 0%, #101733 100%);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 15px;
}

.topbar h2 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.15;
}

.icon-actions {
  display: flex;
  gap: 9px;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.64);
  color: #675574;
  font-size: 16px;
  font-weight: 800;
}

.dark-icon {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: white;
}

.quote-card {
  position: relative;
  overflow: hidden;
  min-height: 86px;
  margin-bottom: 12px;
  padding: 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 17px;
  background:
    radial-gradient(circle at 90% 20%, rgba(255, 255, 255, 0.36), transparent 40%),
    linear-gradient(135deg, rgba(142, 167, 255, 0.92), rgba(248, 186, 168, 0.85)),
    #c8cfff;
  color: white;
  box-shadow: 0 16px 32px rgba(141, 110, 188, 0.26);
}

.quote-card::before,
.quote-card::after {
  position: absolute;
  content: "";
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}

.quote-card::before {
  width: 120px;
  height: 36px;
  right: -20px;
  bottom: 8px;
}

.quote-card::after {
  width: 84px;
  height: 26px;
  right: 48px;
  bottom: 28px;
}

.quote-card p,
.quote-card span {
  position: relative;
  z-index: 1;
}

.quote-card p {
  max-width: 240px;
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
}

.quote-card span {
  display: block;
  text-align: right;
  font-size: 12px;
  opacity: 0.9;
}

.hero-card {
  display: grid;
  grid-template-columns: 47% 1fr;
  gap: 12px;
  min-height: 214px;
  margin-bottom: 13px;
  padding: 11px;
  border: 1px solid rgba(219, 168, 102, 0.46);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff8ef, #fff3e6);
  box-shadow: 0 16px 34px rgba(173, 116, 84, 0.16);
}

.portrait {
  position: relative;
  overflow: hidden;
  min-height: 192px;
  border-radius: 14px;
  background: linear-gradient(160deg, #a8b3ef 0%, #f4c0aa 100%);
  box-shadow: inset 0 0 30px rgba(168, 179, 239, 0.3);
}

.portrait-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.68), transparent 16%),
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.42), transparent 18%),
    linear-gradient(180deg, transparent 56%, rgba(32, 27, 52, 0.28));
}

.portrait-face {
  position: absolute;
  right: 8px;
  bottom: 0;
  left: 8px;
  height: 166px;
}

.face {
  position: absolute;
  top: 54px;
  left: 50%;
  width: 58px;
  height: 72px;
  transform: translateX(-50%);
  border-radius: 45% 45% 48% 48%;
  background: #f0c8b9;
  box-shadow: inset -8px -8px 0 rgba(174, 107, 124, 0.12);
}

.face::before,
.face::after {
  position: absolute;
  top: 30px;
  width: 7px;
  height: 4px;
  border-radius: 999px;
  background: #253052;
  content: "";
}

.face::before {
  left: 15px;
}

.face::after {
  right: 15px;
}

.hair {
  position: absolute;
  top: 30px;
  width: 76px;
  height: 82px;
  border-radius: 58% 42% 45% 55%;
  background: #17213f;
}

.hair-left {
  left: 50%;
  transform: translateX(-64%) rotate(-16deg);
}

.hair-right {
  left: 50%;
  transform: translateX(-33%) rotate(18deg);
  background: #202a51;
}

.collar {
  position: absolute;
  right: 20px;
  bottom: 0;
  left: 20px;
  height: 54px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, #19213f, #111629);
}

.collar::before {
  position: absolute;
  top: 12px;
  left: 50%;
  width: 28px;
  height: 34px;
  transform: translateX(-50%);
  border-radius: 0 0 14px 14px;
  background: #d99e58;
  content: "";
}

.hero-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.level-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.level {
  color: #8c627e;
  font-size: 15px;
  font-weight: 800;
}

.rank {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f6d59b, #ad6a2f);
  color: white;
  font-size: 17px;
  font-weight: 900;
}

.hero-info h3 {
  margin: 0;
  font-size: 21px;
}

.hero-info p {
  margin: 2px 0 13px;
  color: var(--muted);
  font-size: 13px;
}

.progress-block {
  margin-bottom: 7px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  color: #806d83;
  font-size: 12px;
}

.progress {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #eedfd9;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), #d7a75d);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-info small {
  color: #8c7b8e;
  font-size: 11px;
  line-height: 1.5;
}

.mood-button {
  align-self: flex-start;
  margin-top: 9px;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #b182d5, #8462c6);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.panel,
.streak-card,
.score-card,
.dark-panel {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 250, 244, 0.82);
  box-shadow: 0 12px 30px rgba(130, 86, 92, 0.08);
}

.panel {
  margin-bottom: 12px;
  padding: 13px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-title h3 {
  margin: 0;
  font-size: 15px;
}

.task-card {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(224, 165, 102, 0.25);
  border-left: 3px solid var(--violet);
  border-radius: 14px;
  background: #fff8ef;
}

.task-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: #f7e4d1;
  color: var(--gold);
}

.task-card p,
.task-card h4 {
  margin: 0;
}

.task-card p {
  color: #a27587;
  font-size: 12px;
  font-weight: 700;
}

.task-card h4 {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.4;
}

.primary-button,
.ghost-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
}

.primary-button {
  background: linear-gradient(135deg, #9d7ad4, #7956bc);
  color: white;
  box-shadow: 0 10px 22px rgba(126, 87, 194, 0.22);
}

.primary-button.small {
  min-height: 34px;
  padding: 0 12px;
}

.ghost-button {
  border: 1px solid rgba(139, 105, 204, 0.2);
  background: rgba(255, 255, 255, 0.55);
  color: #76578b;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 10px;
}

.mini-card {
  min-height: 82px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  text-align: left;
}

.mini-card strong,
.mini-card span {
  display: block;
}

.mini-card strong {
  margin-bottom: 12px;
  font-size: 12px;
}

.mini-card span {
  color: #6f6175;
  font-size: 13px;
  font-weight: 800;
}

.ai-panel {
  background: linear-gradient(180deg, rgba(255, 252, 248, 0.94), rgba(244, 250, 247, 0.9));
}

.ai-form {
  display: grid;
  gap: 10px;
}

.ai-form textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid rgba(139, 105, 204, 0.2);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

.ai-form textarea:focus {
  border-color: rgba(139, 105, 204, 0.58);
  box-shadow: 0 0 0 4px rgba(139, 105, 204, 0.14), 0 0 20px rgba(139, 105, 204, 0.08);
}

.ai-result {
  min-height: 84px;
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(140, 198, 181, 0.34);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  color: #62536b;
  white-space: pre-wrap;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.ai-result.loading {
  color: #7f65a3;
}

.streak-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
}

.streak-card span {
  color: #876b76;
  font-size: 12px;
  font-weight: 800;
}

.streak-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.streak-dots i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f4d693, #79bfa5);
  animation: dot-pulse 2.4s ease-in-out infinite;
}

.streak-dots i:nth-child(2) { animation-delay: 0.15s; }
.streak-dots i:nth-child(3) { animation-delay: 0.3s; }
.streak-dots i:nth-child(4) { animation-delay: 0.45s; }
.streak-dots i:nth-child(5) { animation-delay: 0.6s; }
.streak-dots i:nth-child(6) { animation-delay: 0.75s; }
.streak-dots i:nth-child(7) { animation-delay: 0.9s; }

@keyframes dot-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.12); }
}

.streak-dots .chest {
  border-radius: 6px;
  background: linear-gradient(135deg, #deae61, #916242);
  box-shadow: 0 0 10px rgba(222, 174, 97, 0.45);
  animation: chest-glow 3s ease-in-out infinite;
}

@keyframes chest-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(222, 174, 97, 0.35); }
  50% { box-shadow: 0 0 16px rgba(222, 174, 97, 0.65); }
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 13px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(250, 238, 225, 0.82);
}

.segment {
  min-height: 34px;
  border-radius: 999px;
  background: transparent;
  color: #846b7e;
  font-size: 13px;
  font-weight: 800;
}

.segment.active {
  background: linear-gradient(135deg, #ac82d4, #8762c7);
  color: white;
  box-shadow: 0 8px 18px rgba(127, 86, 190, 0.22);
}

.profile-card {
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.92), rgba(255, 243, 232, 0.92));
}

.profile-main {
  display: grid;
  grid-template-columns: 1fr 120px;
  align-items: center;
  gap: 16px;
}

.profile-main p,
.profile-main span {
  margin: 0;
  color: #947b87;
  font-size: 13px;
  font-weight: 700;
}

.profile-main strong {
  display: block;
  margin: 3px 0 2px;
  color: #7c3d46;
  font-size: 38px;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 1px;
}

.mini-radar {
  position: relative;
  width: 104px;
  height: 104px;
  border: 1px solid rgba(139, 105, 204, 0.25);
  border-radius: 50%;
  background:
    conic-gradient(from 35deg, rgba(139, 105, 204, 0.38), rgba(216, 154, 79, 0.3), rgba(139, 105, 204, 0.38)),
    radial-gradient(circle, rgba(255, 255, 255, 0.88) 0 18%, transparent 19%),
    repeating-radial-gradient(circle, transparent 0 14px, rgba(139, 105, 204, 0.18) 15px);
  box-shadow: 0 0 18px rgba(139, 105, 204, 0.15);
}

.mini-radar span {
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(139, 105, 204, 0.26);
  transform: rotate(45deg);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.tag-row span {
  padding: 7px 10px;
  border: 1px solid rgba(139, 105, 204, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
  color: #785d86;
  font-size: 12px;
  font-weight: 800;
}

.insight-list {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.insight-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(126, 91, 116, 0.12);
}

.insight-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.insight-list li > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff0da, #d6f0e8);
  color: #c08a3e;
}

.insight-list strong,
.insight-list p,
.answer-box p {
  margin: 0;
}

.insight-list p,
.answer-box p {
  color: #7c6d80;
  font-size: 13px;
  line-height: 1.6;
}

.answer-box {
  padding: 12px;
  border: 1px solid rgba(126, 91, 116, 0.12);
  border-left: 3px solid var(--violet);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.48);
}

.link-button {
  margin-top: 12px;
  padding: 0;
  background: transparent;
  color: var(--violet-deep);
  font-size: 13px;
  font-weight: 800;
}

.dark .tiny-label {
  color: #dbc9ff;
}

.dark-segmented {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.dark-segmented .segment {
  color: rgba(255, 255, 255, 0.74);
}

.dark-segmented .segment.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(139, 105, 204, 0.7));
}

.radar-wrap {
  display: grid;
  place-items: center;
  min-height: 286px;
}

.radar {
  position: relative;
  width: 260px;
  height: 260px;
}

.radar-grid {
  position: absolute;
  inset: 45px;
  clip-path: polygon(50% 0, 92% 25%, 92% 75%, 50% 100%, 8% 75%, 8% 25%);
  background:
    linear-gradient(90deg, transparent 49%, rgba(160, 216, 255, 0.58) 50%, transparent 51%),
    linear-gradient(30deg, transparent 49%, rgba(160, 216, 255, 0.38) 50%, transparent 51%),
    linear-gradient(150deg, transparent 49%, rgba(160, 216, 255, 0.38) 50%, transparent 51%),
    radial-gradient(circle, rgba(91, 153, 255, 0.58), rgba(40, 96, 188, 0.22));
  border: 1px solid rgba(141, 211, 255, 0.78);
  box-shadow: 0 0 48px rgba(96, 157, 255, 0.5), 0 0 12px rgba(141, 211, 255, 0.3);
}

.radar-grid::before,
.radar-grid::after {
  position: absolute;
  inset: 20px;
  clip-path: inherit;
  border: 1px solid rgba(180, 222, 255, 0.5);
  content: "";
}

.radar-grid::after {
  inset: 42px;
}

.axis {
  position: absolute;
  color: rgba(248, 250, 255, 0.9);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
}

.axis strong {
  color: white;
  font-size: 18px;
}

.axis-top {
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
}

.axis-right-top {
  top: 50px;
  right: 0;
}

.axis-right {
  right: 0;
  bottom: 70px;
}

.axis-bottom {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.axis-left-bottom {
  bottom: 70px;
  left: 0;
}

.axis-left {
  top: 50px;
  left: 0;
}

.score-card {
  position: relative;
  margin-bottom: 14px;
  padding: 16px 80px 16px 18px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.16);
}

.score-card p,
.score-card strong {
  margin: 0;
}

.score-card p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.score-card strong {
  display: block;
  margin-top: 5px;
  color: #ffd78b;
  font-size: 31px;
}

.score-card strong span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 16px;
}

.score-card i {
  position: absolute;
  top: 16px;
  right: 21px;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe4a8, #ae6b2f);
  color: white;
  font-size: 26px;
  font-style: normal;
  font-weight: 900;
  animation: badge-pulse 2.8s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 228, 168, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(255, 228, 168, 0); }
}

.dark-panel {
  padding: 15px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

.dark-panel h3 {
  margin: 0 0 13px;
  font-size: 15px;
}

.stat-row {
  position: relative;
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.stat-row b {
  justify-self: end;
  font-size: 12px;
}

.stat-row i {
  position: absolute;
  right: 58px;
  bottom: -5px;
  left: 78px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #56d1ff, #9c63ff, #ffd075);
  box-shadow: 0 0 14px rgba(106, 166, 255, 0.72);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline {
  position: relative;
  margin: 18px 0 18px;
  padding-left: 12px;
}

.timeline::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--violet), var(--gold));
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  min-height: 70px;
  margin-bottom: 15px;
  padding-left: 15px;
}

.timeline-item .dot {
  position: absolute;
  top: 5px;
  left: -9px;
  width: 15px;
  height: 15px;
  border: 3px solid #fff6ed;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 0 2px rgba(139, 105, 204, 0.34);
  transition: box-shadow 0.3s ease;
}

.timeline-item.active .dot {
  box-shadow: 0 0 0 3px rgba(139, 105, 204, 0.34), 0 0 12px rgba(139, 105, 204, 0.4);
}

.version-meta strong,
.version-meta small,
.version-meta p {
  display: block;
  margin: 0;
}

.version-meta strong {
  font-size: 20px;
}

.version-meta small,
.version-meta p {
  color: #7d7080;
  font-size: 12px;
  line-height: 1.7;
}

.version-card {
  padding: 10px;
  border: 1px solid rgba(219, 168, 102, 0.3);
  border-radius: 15px;
  background: rgba(255, 248, 239, 0.9);
  box-shadow: 0 8px 20px rgba(173, 116, 84, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.version-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(173, 116, 84, 0.18);
}

.version-art {
  display: grid;
  min-height: 104px;
  place-items: start;
  padding: 10px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(34, 40, 78, 0.82), rgba(243, 166, 132, 0.72)),
    #353a68;
  color: white;
  font-weight: 900;
}

.version-card p {
  margin: 9px 0;
  color: #7c6d80;
  font-size: 12px;
}

.vault-actions,
.share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.vault-actions .primary-button::before {
  content: "✉ ";
}

.vault-actions .shield {
  background: linear-gradient(135deg, #9e91d7, #5c77c9);
}

.vault-actions .shield::before {
  content: "🛡 ";
}

.safe-note {
  margin: 12px 0 0;
  padding: 10px;
  border-radius: 12px;
  background: rgba(126, 91, 116, 0.08);
  color: #8d7d85;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.share-preview {
  display: grid;
  grid-template-columns: 45% 1fr;
  gap: 11px;
  margin: 12px 0;
}

.card-poster,
.card-info {
  min-height: 184px;
  padding: 13px;
  border: 1px solid rgba(219, 168, 102, 0.3);
  border-radius: 16px;
  background: #fff8ef;
  box-shadow: 0 8px 22px rgba(173, 116, 84, 0.1);
}

.tiny-portrait {
  height: 102px;
  margin-bottom: 9px;
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% 44%, #efc6b5 0 17%, transparent 18%),
    radial-gradient(circle at 50% 34%, #17213f 0 28%, transparent 29%),
    linear-gradient(135deg, #96a8ed, #f0b6a3);
}

.card-poster strong,
.card-poster span {
  display: block;
}

.card-poster strong {
  font-size: 16px;
}

.card-poster span {
  color: #8d7d91;
  font-size: 12px;
}

.card-info dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.card-info div {
  display: flex;
  gap: 8px;
}

.card-info dt,
.card-info dd {
  margin: 0;
  color: #7b6878;
  font-size: 12px;
}

.card-info dt {
  min-width: 34px;
  font-weight: 800;
}

.card-info blockquote {
  margin: 14px 0 0;
  color: #7c4d59;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}

.share-actions {
  grid-template-columns: 1fr 1fr 1fr;
  margin-bottom: 13px;
}

.goods-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.goods-card {
  min-height: 112px;
  padding: 10px;
  border: 1px solid rgba(219, 168, 102, 0.25);
  border-radius: 15px;
  background: #fff7ee;
  color: #775a68;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.goods-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(173, 116, 84, 0.14);
}

.goods-card span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin: 0 auto 8px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f4cdbd, #f9e4c4);
  color: #765187;
  font-weight: 900;
}

.goods-card.pixel span {
  image-rendering: pixelated;
  border-radius: 8px;
  background:
    linear-gradient(90deg, #1c2445 20%, transparent 0 40%, #1c2445 0 60%, transparent 0),
    linear-gradient(#f6c4b4 45%, #1c2445 0);
}

.goods-card.stand span {
  border-radius: 50% 50% 16px 16px;
  background: linear-gradient(135deg, #90b1ee, #f4c4aa);
}

.goods-card strong {
  display: block;
  font-size: 12px;
}

.quick-sheet {
  position: absolute;
  z-index: 30;
  right: 0;
  bottom: 66px;
  left: 0;
  pointer-events: none;
}

.fab {
  position: absolute;
  bottom: -1px;
  left: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  transform: translateX(-50%);
  border: 4px solid #fff8ef;
  border-radius: 50%;
  background: linear-gradient(135deg, #efbd77, #c9823f);
  color: white;
  font-size: 34px;
  line-height: 1;
  pointer-events: auto;
  box-shadow: 0 12px 28px rgba(143, 85, 42, 0.28);
}

.quick-content {
  position: absolute;
  right: 14px;
  bottom: 70px;
  left: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 243, 0.96);
  box-shadow: 0 22px 48px rgba(83, 56, 92, 0.24);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: 180ms ease;
}

.quick-sheet.open .quick-content {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.quick-content h3 {
  grid-column: 1 / -1;
  margin: 0 0 4px;
  font-size: 14px;
}

.quick-content button {
  min-height: 62px;
  padding: 8px;
  border: 1px solid rgba(139, 105, 204, 0.14);
  border-radius: 15px;
  background: white;
  color: #6a5677;
  font-size: 11px;
  font-weight: 800;
}

.bottom-nav {
  position: absolute;
  z-index: 25;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  height: 78px;
  padding: 7px 11px 11px;
  border-top: 1px solid rgba(126, 91, 116, 0.14);
  background: rgba(255, 250, 244, 0.94);
  backdrop-filter: blur(16px);
}

.nav-item {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 15px;
  background: transparent;
  color: #8c7d89;
  font-size: 11px;
  font-weight: 800;
}

.nav-item span {
  font-size: 20px;
  line-height: 1;
}

.nav-item.active {
  color: var(--violet-deep);
}

@media (max-width: 860px) {
  .demo-shell {
    display: block;
    min-height: 100vh;
    padding: 0;
  }

  .intro-panel {
    display: none;
  }

  .phone-frame {
    width: 100vw;
    height: 100vh;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .phone-screen {
    border-radius: 0;
  }
}

@media (max-width: 380px) {
  .view {
    padding-right: 13px;
    padding-left: 13px;
  }

  .hero-card {
    grid-template-columns: 44% 1fr;
    gap: 9px;
  }

  .share-actions,
  .quick-content {
    grid-template-columns: 1fr 1fr;
  }
}

/* Live UI mode — screenshot images hidden, real components visible */

.screen-art {
  display: none !important;
}

/* --- Micro-interactions --- */

.view {
  animation: view-fade-in 0.28s ease;
}

@keyframes view-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.nav-item {
  position: relative;
}

.nav-item.active::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 5px;
  height: 5px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--violet-deep);
}

.panel {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.panel:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(130, 86, 92, 0.12);
}

.mini-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mini-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(130, 86, 92, 0.1);
}

.toast {
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.hotspot {
  position: absolute;
  z-index: 22;
  display: none !important;
  top: var(--y);
  left: var(--x);
  width: var(--w);
  height: var(--h);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: transparent;
  touch-action: manipulation;
}

.hotspot:focus-visible {
  outline: 2px solid rgba(255, 193, 111, 0.9);
  outline-offset: -2px;
  background: rgba(255, 235, 181, 0.18);
}

.module-sheet {
  position: absolute;
  z-index: 70;
  inset: 0;
  display: grid;
  align-items: end;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.module-sheet.open {
  pointer-events: auto;
  opacity: 1;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  display: block;
  background: rgba(39, 31, 48, 0.2);
  color: transparent;
}

.sheet-card {
  position: relative;
  margin: 0 10px 12px;
  padding: 15px 15px 14px;
  border: 1px solid rgba(218, 165, 94, 0.35);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 213, 133, 0.38), transparent 46px),
    linear-gradient(145deg, rgba(255, 252, 246, 0.97), rgba(248, 239, 255, 0.97));
  box-shadow: 0 24px 58px rgba(61, 42, 80, 0.32);
  transform: translateY(16px);
  transition: transform 180ms ease;
}

.module-sheet.open .sheet-card {
  transform: translateY(0);
}

.sheet-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: rgba(113, 86, 165, 0.1);
  color: #6a5480;
  font-size: 20px;
  font-weight: 700;
}

.sheet-kicker {
  margin: 0 34px 4px 0;
  color: #8e6dc3;
  font-size: 11px;
  font-weight: 800;
}

.sheet-card h3 {
  margin: 0 34px 7px 0;
  color: #33263b;
  font-size: 17px;
  line-height: 1.25;
}

.sheet-card p {
  margin: 0;
  color: #6f6173;
  font-size: 12px;
  line-height: 1.65;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 13px;
}

.sheet-primary,
.sheet-secondary {
  min-height: 40px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 800;
}

.sheet-primary {
  background: linear-gradient(135deg, #a685e8, #6f58be);
  color: white;
  box-shadow: 0 10px 22px rgba(111, 88, 190, 0.22);
}

.sheet-secondary {
  border: 1px solid rgba(121, 94, 133, 0.16);
  background: rgba(255, 255, 255, 0.76);
  color: #756279;
}
