:root {
  --bg: #000000;
  --bg-elevated: #121212;
  --bg-soft: #1a1a1a;
  --text: #f2f2f2;
  --hint: #9a9a9a;
  --accent: #c9a46a;
  --accent-soft: rgba(201, 164, 106, 0.22);
  --link: #d4b57a;
  --danger: #ff8a80;
  --radius: 14px;
  --gap: 12px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100%;
}

body {
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, rgba(201, 164, 106, 0.12), transparent 55%),
    #000000;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px))
    16px
    calc(32px + env(safe-area-inset-bottom, 0px))
    16px;
  min-height: 100vh;
}

.header h1 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.subtitle {
  margin: 0 0 16px;
  color: var(--hint);
  font-size: 0.9rem;
  line-height: 1.4;
}

.screen {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 4px 0 8px;
}

.card--plain {
  background: transparent;
  border: none;
}

.card h2, .card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--text);
}

.sphere-title {
  color: var(--accent) !important;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sphere-hero {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 4px;
}

.sphere-hero__media {
  flex: 0 0 120px;
  max-width: 120px;
}

.sphere-hero__img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  background: #000;
  border-radius: 12px;
}

.sphere-hero__img--empty {
  background: #111;
}

.sphere-hero__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  text-align: right;
}

.sphere-hero__eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: #f2f2f2;
}

.sphere-hero__name {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--accent);
  letter-spacing: 0.01em;
}

.portrait-frame {
  border: 1px solid rgba(201, 164, 106, 0.5);
  border-radius: 16px;
  background: #000000;
  padding: 16px 16px 14px;
}

.portrait-frame p {
  margin: 0 0 12px;
  line-height: 1.55;
  font-size: 0.95rem;
  color: var(--text);
}

.portrait-frame p:last-child {
  margin-bottom: 0;
}

.results-plain-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: var(--text);
}

.request-question-title {
  font-size: 1.15rem;
  line-height: 1.35;
  font-weight: 600;
}

.stones-frame {
  border: 1px solid rgba(201, 164, 106, 0.35);
  border-radius: 16px;
  background: #000000;
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stones-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 28px;
  padding-top: 8px;
}

/* Extra space before 2nd/3rd category frames (correction / support). */
.stones-frame + .stones-frame {
  margin-top: 18px;
}

.stones-section__title {
  margin: 0 0 2px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.stones-frame__title {
  margin: 0 0 4px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent);
}

.welcome-card h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  color: var(--accent);
}

.welcome-card p {
  margin: 0 0 10px;
  line-height: 1.5;
  color: var(--text);
  font-size: 0.95rem;
}

.welcome-card p:last-child {
  margin-bottom: 0;
}

.welcome-card__list {
  margin: 0 0 10px;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.welcome-card__list li {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
}

.result-profile {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: #000000;
  padding: 12px 14px;
  margin-bottom: 0;
}

.result-profile__label {
  margin: 0 0 4px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hint);
}

.result-profile__name {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
}

.result-profile__meta {
  margin: 0;
  font-size: 0.88rem;
  color: var(--hint);
}

.stone-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stone-entry {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stone-entry__heading {
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.3;
}

.card p {
  margin: 0 0 10px;
  line-height: 1.5;
  font-size: 0.95rem;
  color: var(--text);
}

.card p:last-child {
  margin-bottom: 0;
}

.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--accent);
  color: #111;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--link);
  border: 1px solid rgba(201, 164, 106, 0.35);
}

.sphere-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.sphere-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: #000000;
  color: var(--text);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
}

.sphere-btn__icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.sphere-icon {
  width: 24px;
  height: 24px;
  display: block;
}

.sphere-btn__label {
  flex: 1;
  min-width: 0;
}

.sphere-btn .emoji {
  font-size: 1.4rem;
  line-height: 1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  font-size: 0.85rem;
  color: var(--hint);
}

.field input,
.field select {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 1rem;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--hint) 50%),
    linear-gradient(135deg, var(--hint) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.btn-unknown {
  margin-top: 8px;
  width: 100%;
}

.btn-unknown.is-active,
.btn-unknown[aria-pressed="true"] {
  border-color: rgba(201, 164, 106, 0.55);
  color: var(--accent);
}

.field-hint {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--hint);
  line-height: 1.35;
}

.intro-card {
  text-align: center;
  padding-top: 28px;
  padding-bottom: 28px;
}

.intro-brand {
  margin: 0 0 16px;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}

.intro-lead {
  margin: 0 0 14px;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--text);
}

.intro-hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--hint);
}

.field input[type="date"] {
  min-height: 48px;
  color-scheme: dark;
}

/* Author display:* beats UA [hidden]{display:none} — keep !important so toggles work. */
[hidden] {
  display: none !important;
}

.btn--paid {
  position: relative;
  overflow: visible;
  padding-right: 40px;
}

.btn__label {
  display: inline-block;
}

/* Same 💎 mark as Balance — paid feature cue. */
.btn-paid-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 0.95rem;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}

.btn-compact {
  padding: 8px 14px;
  font-size: 0.88rem;
  min-height: auto;
}

.paid-balance-footer {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.paid-balance-footer__amount {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

.btn-topup-narrow {
  width: 33.333%;
  min-width: 120px;
  max-width: 160px;
  padding: 8px 10px;
  font-size: 0.82rem;
  min-height: auto;
}

.request-question-input,
#request-question {
  width: 100%;
  box-sizing: border-box;
  background: #2a2a2a;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 12px 14px;
  font: inherit;
  line-height: 1.4;
  resize: vertical;
  color-scheme: dark;
}

.request-question-input::placeholder,
#request-question::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.request-question-input:focus,
#request-question:focus {
  outline: 1px solid rgba(201, 164, 106, 0.55);
}

.stone-check-balance {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.stone-check-balance__amount {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.profile-pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 16px;
}

.profile-pick-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
}

.profile-pick-item strong {
  font-weight: 600;
}

.library-list {
  display: flex;
  flex-direction: column;
  margin: 4px 0 16px;
}

.library-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 10px 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.library-row:first-child {
  border-top: none;
  padding-top: 4px;
}

.library-row__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.library-row__badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--accent);
}

.library-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: var(--accent);
}

.library-badge--sphere .sphere-icon {
  width: 1em;
  height: 1em;
}

.library-badge--text {
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.library-badge--crystal .crystal-icon {
  width: 1em;
  height: 1em;
  display: block;
}

.library-row__profiles {
  display: block;
  margin-top: 2px;
  color: var(--accent);
  font-size: 0.75rem;
  line-height: 1.3;
  font-weight: 500;
}

.library-row__desc {
  display: block;
  margin-top: 4px;
  color: var(--hint);
  font-size: 0.82rem;
  line-height: 1.35;
  font-weight: 400;
}

.library-fit-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.library-fit-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
}

.library-fit-item__icon {
  color: var(--accent);
  display: inline-flex;
  width: 24px;
  height: 24px;
}

.library-fit-item__icon .sphere-icon {
  width: 22px;
  height: 22px;
}

.library-fit-item__label {
  font-size: 0.92rem;
}

.library-match__item {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.library-match__item:first-of-type {
  margin-top: 8px;
}

.library-match__head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.library-match__head .library-badge--sphere .sphere-icon,
.library-match__head .library-badge--crystal .crystal-icon {
  width: 1.1rem;
  height: 1.1rem;
}

.library-match__body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 8px;
}

.library-match__text {
  flex: 1;
  min-width: 0;
}

.library-planet,
.library-short {
  margin-top: 12px;
}

.library-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  text-align: left;
}

.library-card__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.library-card__img--empty {
  min-height: 80px;
}

.library-card__name {
  font-size: 0.88rem;
  line-height: 1.25;
}

.library-match__item + .library-match__item {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.request-examples {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.request-question-quote {
  font-style: italic;
  margin-bottom: 10px;
}

.credit-pack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 16px;
}

.credit-pack-btn {
  width: 100%;
}

.balance-card__amount {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 8px 0;
}

.balance-section__label {
  margin: 16px 0 8px;
  font-size: 0.9rem;
  color: var(--hint);
}

.gem-suggest-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 14px;
}

.gem-suggest-list__title {
  font-size: 0.85rem;
  color: var(--hint);
  margin: 0;
}

.gem-suggest-item {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}

.stone-check-verdict {
  color: var(--hint);
  margin: 0 0 12px;
}

.stone-check-form {
  margin-top: 12px;
}

.btn-balance {
  margin-bottom: 4px;
}

.time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.time-row__part {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.time-row__part span {
  font-size: 0.78rem;
  color: var(--hint);
}

.gem-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gem-list--main {
  gap: 18px;
}

.gem-item {
  display: flex;
  gap: 12px;
  align-items: center;
  border: none;
  width: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.gem-item--main {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.gem-photo {
  width: 100%;
  max-height: 280px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  background: #000000;
  border-radius: 10px;
  display: block;
}

.gem-photo--empty {
  min-height: 180px;
  background: #000000;
}

.gem-name {
  display: block;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0 2px;
}

.gem-item--alt {
  opacity: 0.95;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.gem-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  background: #000000;
  flex-shrink: 0;
}

.gem-meta {
  flex: 1;
  min-width: 0;
}

.gem-meta strong {
  display: block;
  margin-bottom: 0;
}

.gem-meta span {
  color: var(--hint);
  font-size: 0.85rem;
}

.alt-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin-top: 4px;
  padding: 10px 8px;
  border: 1px dashed rgba(201, 164, 106, 0.28);
  border-radius: 12px;
  background: transparent;
  color: #b3b3b3;
  font-size: 0.9rem;
  text-align: center;
  cursor: pointer;
  min-width: 0;
}

.alt-line__head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.alt-label {
  flex-shrink: 0;
  color: var(--accent);
  font-weight: 600;
}

.alt-label::after {
  content: none;
}

.alt-chevron {
  color: var(--accent);
  font-size: 0.75rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.alt-line.is-open .alt-chevron {
  transform: rotate(180deg);
}

.alt-names {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #9a9a9a;
  font-size: 0.85rem;
}

.alt-hint {
  color: #777;
  font-size: 0.78rem;
}

.alt-line.is-open .alt-names {
  white-space: normal;
  text-overflow: clip;
}

.gem-list--alts {
  margin-top: 8px;
}

.gem-list--alts.is-collapsed {
  display: none;
}

.lang-switch {
  display: inline-flex;
  align-self: flex-end;
  gap: 0;
  border: 1px solid rgba(201, 164, 106, 0.35);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 4px;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--hint);
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-btn.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.alt-heading {
  margin: 12px 0 6px;
  color: var(--hint);
  font-size: 0.85rem;
  font-style: italic;
}

.effects-banner {
  margin: 10px 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.effects-banner--pending {
  color: var(--accent);
}

.effects-banner--ready {
  color: var(--hint);
}

.effects-banner--error {
  color: var(--danger);
}

.regen-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}

.history-item {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  min-width: 0;
}

.history-item span {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--hint);
}

.history-status {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--hint);
}

.history-status--processing {
  color: var(--accent, #c4a35a);
}

.history-status--error {
  color: #c45c5c;
}

.history-delete {
  align-self: stretch;
  min-width: 88px;
  padding-left: 10px;
  padding-right: 10px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.hint-muted {
  margin-top: 10px;
  color: var(--hint);
  font-size: 0.8rem;
}

.hint-muted code {
  font-size: 0.75rem;
  word-break: break-all;
}

.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 40px 16px 24px;
  color: var(--hint);
  text-align: center;
}

.loader-status {
  min-height: 3.2em;
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.45;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.loader-status.is-fading {
  opacity: 0;
}

.loader-hint {
  margin: 0;
  color: var(--hint);
  font-size: 0.85rem;
}

/* Stone orbit loader — fits astrology / gem brand */
.stone-loader {
  position: relative;
  width: 88px;
  height: 88px;
}

.stone-loader__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(201, 164, 106, 0.28);
  animation: ring-pulse 2.4s ease-in-out infinite;
}

.stone-loader__ring--outer {
  inset: -6px;
  border-color: rgba(201, 164, 106, 0.12);
  animation-delay: 0.4s;
}

.stone-loader__core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, #f0e0bc, #c9a46a 55%, #8a6a35 100%);
  box-shadow:
    0 0 16px rgba(201, 164, 106, 0.45),
    inset 0 -4px 8px rgba(0, 0, 0, 0.25);
  animation: core-glow 2s ease-in-out infinite;
}

.stone-loader__orbit {
  position: absolute;
  inset: 8px;
  animation: orbit-spin 3.2s linear infinite;
}

.stone-loader__spark {
  position: absolute;
  top: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: #e8d5a8;
  box-shadow: 0 0 10px rgba(232, 213, 168, 0.8);
}

.stone-loader__spark--2 {
  top: auto;
  bottom: 6px;
  left: 12px;
  width: 5px;
  height: 5px;
  margin-left: 0;
  opacity: 0.7;
  animation: spark-twinkle 1.6s ease-in-out infinite;
}

.stone-loader__spark--3 {
  top: 18px;
  right: 4px;
  left: auto;
  width: 4px;
  height: 4px;
  margin-left: 0;
  opacity: 0.55;
  animation: spark-twinkle 1.9s ease-in-out infinite 0.5s;
}

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

@keyframes ring-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes core-glow {
  0%, 100% { box-shadow: 0 0 12px rgba(201, 164, 106, 0.35), inset 0 -4px 8px rgba(0, 0, 0, 0.25); }
  50% { box-shadow: 0 0 22px rgba(201, 164, 106, 0.65), inset 0 -4px 8px rgba(0, 0, 0, 0.25); }
}

@keyframes spark-twinkle {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.error {
  color: var(--danger);
  font-size: 0.9rem;
  line-height: 1.4;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 6px;
}

.shop-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
}

.profile-badge {
  font-size: 0.85rem;
  color: var(--hint);
  margin-bottom: 8px;
}

.hero-img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 0;
  background: #000000;
}

.row-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.profile-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: #000000;
}

.profile-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* --- Sphere results: stone section layout (top-1 / top-2 / top-3 + fit donuts) --- */
.stone-category {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stone-category__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stone-category__label {
  margin: 0;
  text-align: center;
  font-size: 1.16rem;
  font-weight: 800;
  color: var(--accent);
}

.stone-category__blurb {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0 4px;
}

.stone-category__blurb p {
  margin: 0;
  color: var(--hint);
  font-size: 0.86rem;
  line-height: 1.45;
}

.crystal-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--accent);
  opacity: 0.92;
}

.stone-category__main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stone-category__alts {
  margin-top: 10px;
}

.stone-hero-card {
  border: 1px solid rgba(201, 164, 106, 0.32);
  border-radius: 16px;
  background: #000000;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stone-big-btn {
  display: flex;
  width: 100%;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.stone-big__left {
  flex: 0 0 48%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.stone-big__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #000000;
  border-radius: 12px;
  display: block;
}

.stone-big__img--empty {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #0a0a0a;
  border-radius: 12px;
}

.stone-big__name {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.25;
  text-align: left;
}

.stone-big__right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 0;
}

.stone-fit-text {
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.25;
  color: var(--hint);
}

.stone-fit-text__value {
  color: var(--text);
}

.stone-mini-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stone-mini-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.stone-mini-col--empty {
  min-height: 140px;
}

.stone-mini-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 10px 8px;
  background: #000000;
}

.stone-mini__img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  border-radius: 14px;
  background: #000000;
  display: block;
}

.stone-mini__img--empty {
  width: 78px;
  height: 78px;
  border-radius: 14px;
  background: #0a0a0a;
}

.stone-mini__name {
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  text-align: center;
}

.stone-mini__donut {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Tapered gold ring */
.donut {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.donut__svg {
  display: block;
  filter: drop-shadow(0 0 8px rgba(201, 164, 106, 0.2));
}

.donut__halo {
  fill: none;
  stroke: rgba(201, 164, 106, 0.07);
  stroke-width: 1;
}

.donut__track {
  fill: none;
  stroke: rgba(201, 164, 106, 0.14);
  stroke-width: 2;
}

.donut__progress {
  fill: #c9a46a;
}

.donut__center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: -0.02em;
}

.donut__score {
  display: flex;
  align-items: baseline;
  gap: 1px;
}

.donut__value {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
}

.donut__pct {
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(242, 242, 242, 0.72);
}

.donut__caption {
  margin-top: 3px;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--hint);
  text-align: center;
  max-width: 5.5em;
}

.donut--big .donut__value {
  font-size: 1.45rem;
  font-weight: 700;
}

.donut--big .donut__pct {
  font-size: 0.82rem;
}

.donut--mini .donut__value {
  font-size: 0.82rem;
}

.donut--mini .donut__pct {
  font-size: 0.58rem;
}

.donut--empty {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

/* Stone description — inside top-1 card */
.stone-desc {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 2px 2px 0;
}

.stone-desc--empty {
  display: none;
}

.stone-desc p {
  margin: 0 0 10px;
  line-height: 1.55;
  font-size: 0.92rem;
  color: var(--text);
}

.stone-desc p:last-child {
  margin-bottom: 0;
}

.stone-desc--pending {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.stone-desc__status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 2px;
}

.stone-desc__pulse {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(201, 164, 106, 0.45);
  animation: status-pulse 1.6s ease-out infinite;
}

.stone-desc__status-title {
  margin: 0 0 2px !important;
  color: var(--accent) !important;
  font-size: 0.88rem !important;
  font-weight: 600;
  line-height: 1.35 !important;
}

.stone-desc__status-hint {
  margin: 0 !important;
  color: var(--hint) !important;
  font-size: 0.8rem !important;
  line-height: 1.35 !important;
}

@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(201, 164, 106, 0.45); opacity: 1; }
  70% { box-shadow: 0 0 0 10px rgba(201, 164, 106, 0); opacity: 0.85; }
  100% { box-shadow: 0 0 0 0 rgba(201, 164, 106, 0); opacity: 1; }
}

.skeleton {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
}

.skeleton-line {
  height: 12px;
  position: relative;
}

.skeleton-line--short {
  width: 62%;
}

.skeleton-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  from {
    left: -60%;
  }
  to {
    left: 120%;
  }
}

.gem-arch {
  display: block;
  margin-top: 6px;
  color: var(--hint);
  font-size: 0.82rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
