.stardust-balance {
  --stardust-heading: #4c30af;
  --stardust-emphasis: #5a43bc;
  --stardust-text: #6b667a;
  --stardust-divider: #dfd1fa;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px 24px;
  margin: 20px 0;
  padding: 14px 18px 4px;
  border: 14px solid transparent;
  border-image: url("/images/pixel_frame_home_service_purple.svg?v=2") 14 fill / 1 / 0 stretch;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  clip-path: none;
  color: var(--stardust-text);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.stardust-balance__summary { display: flex; align-items: center; gap: 18px; min-width: 0; }
.stardust-balance__art { flex: 0 0 auto; width: 44px; height: 40.5px; object-fit: contain; image-rendering: pixelated; }
.stardust-balance__amount { display: grid; gap: 4px; min-width: 0; }
.stardust-balance__label { font-size: var(--type-small); line-height: 1.6; }
.stardust-balance__value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; color: var(--stardust-heading); font-size: var(--type-display-sm); font-weight: 600; line-height: 1.2; }
.stardust-balance__value > [data-stardust-available] { min-width: 0; overflow-wrap: anywhere; }
.stardust-balance__unit { color: var(--stardust-emphasis); font-size: var(--type-body-lg); }
.stardust-balance__details { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 24px; padding-top: 12px; border-top: 1px solid var(--stardust-divider); font-size: var(--type-label); line-height: 1.7; }
.stardust-balance__details > span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.stardust-balance__details strong { color: var(--stardust-emphasis); font-weight: 600; }
.stardust-exchange-open {
  --stardust-action-frame: url("/images/pixel_frame_input.svg");
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 172px;
  height: 54px;
  padding: 0 10px;
  border: 14px solid transparent;
  border-image: var(--stardust-action-frame) 14 fill / 1 / 0 stretch;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  clip-path: none;
  color: var(--stardust-emphasis);
  font: inherit;
  font-size: var(--type-small);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  image-rendering: pixelated;
  cursor: pointer;
}
.stardust-exchange-open__plus { font-size: var(--type-subtitle); line-height: 1; }
.stardust-exchange-open:hover { filter: brightness(1.03); }
.stardust-exchange-open:active { filter: brightness(.96); transform: translateY(1px); }
.stardust-conversation-note { display: flex; align-items: flex-start; gap: 12px; margin: -4px 0 24px; padding: 14px 18px; background: #f8f3fe; color: #6b667a; }
.stardust-conversation-note > img { flex: 0 0 auto; width: 32px; height: 32px; margin-top: 3px; object-fit: contain; image-rendering: pixelated; }
.stardust-conversation-note p { min-width: 0; margin: 0; font-size: var(--type-label); line-height: 1.8; word-break: keep-all; overflow-wrap: anywhere; }
.stardust-conversation-note p > span { display: block; }
.stardust-shortage {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  background: #f8f3fe;
  color: #6b667a;
}
.stardust-shortage[hidden] { display: none; }
.stardust-shortage__art { width: 28px; height: 26px; object-fit: contain; image-rendering: pixelated; }
.stardust-shortage p { display: grid; gap: 4px; min-width: 0; margin: 0; font-size: var(--type-label); line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
.stardust-shortage strong { color: #5a43bc; font-size: var(--type-small); font-weight: 600; }
.stardust-shortage__action { min-height: 44px; padding: 8px; border: 0; background: transparent; color: #5a43bc; font: inherit; font-size: var(--type-small); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; cursor: pointer; }
.stardust-shortage__action:focus-visible { outline: 3px solid var(--ui-focus, #5a43bc); outline-offset: 2px; }
.stardust-composer form > button:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 540px) {
  .stardust-balance { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 8px 8px 4px; }
  .stardust-balance__summary { gap: 16px; }
  .stardust-balance__art { width: 36px; height: 33px; }
  .stardust-balance__value { font-size: var(--type-page-title-lg); }
  .stardust-balance__details { gap: 6px 18px; padding-top: 10px; }
  .stardust-exchange-open { min-width: 0; width: 100%; }
  .stardust-conversation-note { gap: 10px; padding: 12px; }
  .stardust-shortage { grid-template-columns: 28px minmax(0, 1fr); }
  .stardust-shortage__action { grid-column: 2; justify-self: start; padding-inline: 0; }
}
.stardust-exchange-content { position: relative; display: grid; gap: 16px; padding: 24px 18px 16px; }
.stardust-exchange-content > * { min-width: 0; overflow-wrap: anywhere; }
.stardust-exchange-content h2 { margin: 0; padding-right: 14px; color: #503a75; font-size: var(--type-title); line-height: 1.5; }
.stardust-exchange-content p { margin: 0; font-size: var(--type-body); line-height: 1.7; }
.stardust-exchange-preview { display: grid; gap: 12px; margin: 0; padding-block: 16px; border-block: 1px solid #dfd3ee; }
.stardust-exchange-preview > div { display: flex; justify-content: space-between; gap: 10px; }
.stardust-exchange-preview dd { margin: 0; font-weight: 600; }
.stardust-primary-action {
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  height: 54px;
  padding: 0 8px;
  border: 14px solid transparent;
  border-image: url("/images/pixel_frame_settings_primary.svg?v=1") 14 fill / 1 / 0 stretch;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  clip-path: none;
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  image-rendering: pixelated;
  cursor: pointer;
}
.stardust-primary-action:hover { filter: brightness(1.03); }
.stardust-primary-action:active { filter: brightness(.96); transform: translateY(1px); }
.stardust-primary-action:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.stardust-text-button { min-height: 44px; border: 0; background: transparent; color: #655176; font: inherit; cursor: pointer; }
.stardust-exchange-dialog button:focus-visible, .stardust-exchange-open:focus-visible { outline: 3px solid var(--ui-focus, #5a43bc); outline-offset: 3px; }
.tamami-conversation-main .stardust-composer { position: static; margin-block: 24px; }
.stardust-latest-link { display: block; margin: 16px 0; text-align: right; color: #6845b5; font-size: var(--type-caption); }
.tamami-date-divider { display: flex; align-items: center; gap: 14px; margin: 28px 0 18px; color: #776786; font-size: var(--type-caption); }
.tamami-date-divider::before, .tamami-date-divider::after { content: ""; height: 1px; flex: 1; background: #e5dcee; }
.stardust-answer-reward { margin: 10px 0; color: #655176; font-size: var(--type-caption); line-height: 1.6; }
.stardust-wallet > h2 { color: #503a75; font-size: var(--type-title); }
.stardust-wallet > p { color: #655176; line-height: 1.7; }
.stardust-history summary { min-height: 44px; padding-block: 12px; color: #503a75; font-weight: 600; cursor: pointer; }
.stardust-history ol { list-style: none; margin: 0; padding: 0; }
.stardust-history li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid #e5dcee; }
.stardust-history li > span { display: grid; gap: 4px; }
.stardust-history li > span:last-child { text-align: right; white-space: nowrap; }
.stardust-history time, .stardust-history small { font-size: var(--type-caption); color: #776786; }
.stardust-return { padding: 12px 0; }
@media (max-width: 390px) {
  .stardust-exchange-content { padding: 22px 8px 12px; }
  .stardust-exchange-dialog { width: calc(100% - 16px); }
}
@media (max-width: 280px) {
  .stardust-exchange-preview > div { flex-wrap: wrap; }
  .stardust-primary-action { height: auto; min-height: 54px; white-space: normal; line-height: 1.5; }
}
