:root {
  --star-core-ink: #07090d;
  --star-core-silver: #d6dce4;
  --star-core-red: #b43f38;
  --star-core-gold: #d5ad73;
}

.star-core-promo {
  position: relative;
  min-height: 260px;
  margin: 18px 0 24px;
  overflow: hidden;
  border: 1px solid rgba(214, 220, 228, .42);
  border-radius: 20px;
  background: #050608 url('assets/promo/star-core-188-poster.png') center/cover;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .38), inset 0 0 0 1px rgba(180, 63, 56, .2);
}
.star-core-promo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(2, 3, 5, .9) 0%, rgba(2, 3, 5, .48) 58%, rgba(2, 3, 5, .12)); pointer-events: none; }
.star-core-promo-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 34%; opacity: .78; }
.star-core-promo-copy { position: relative; z-index: 1; display: flex; min-height: 260px; max-width: 72%; padding: 22px 20px; flex-direction: column; justify-content: flex-end; }
.star-core-promo-copy .orbit-overline { color: #e2b5a2; }
.star-core-promo-copy h2 { margin: 5px 0; color: #f2f3f5; font-size: 24px; letter-spacing: .08em; }
.star-core-promo-copy p { margin: 0 0 12px; color: #d8dce1; font-size: 11px; line-height: 1.7; }
.star-core-promo-copy .text-action { color: #f0c381; }

.star-core-book-section { margin: 22px -2px 20px; padding: 16px 12px 14px; border: 1px solid rgba(180, 63, 56, .55); border-radius: 18px; background: linear-gradient(145deg, rgba(35, 26, 24, .96), rgba(5, 8, 13, .94)); box-shadow: inset 0 1px rgba(255,255,255,.08), 0 16px 32px rgba(0,0,0,.28); }
.star-core-book-hero { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; width: 100%; padding: 0; border: 0; color: inherit; text-align: left; background: transparent; }
.star-core-book-hero img { width: 92px; aspect-ratio: 2/3; object-fit: cover; border: 1px solid rgba(214,220,228,.45); box-shadow: 5px 8px 18px rgba(0,0,0,.48); }
.star-core-book-hero h2 { margin: 3px 0; color: #eef1f4; font-size: 18px; }
.star-core-book-hero p { margin: 0; color: #afb7c2; font-size: 10px; line-height: 1.65; }
.star-core-price { display: inline-flex; margin-top: 8px; align-items: baseline; gap: 6px; color: #f3c580; font: 700 20px var(--serif); }
.star-core-price small { color: #9ea7b2; font: 10px var(--sans); }
.star-core-store-button { margin-top: 14px; border-color: rgba(214,220,228,.55) !important; background: linear-gradient(100deg, rgba(113,45,39,.94), rgba(30,33,41,.96)) !important; }
.star-core-store-button b { color: #f3d4a2 !important; }

#home-view { background: linear-gradient(180deg, rgba(5,6,9,.08), rgba(5,6,9,.86) 70%), url('assets/theme/star-core-night.png') center/cover fixed; }
#library-view { background: linear-gradient(180deg, rgba(4,5,8,.15), rgba(4,5,8,.92) 74%), url('assets/theme/star-core-reader.png') center/cover fixed; }
#community-view { background: linear-gradient(180deg, rgba(4,6,10,.38), rgba(4,6,10,.92) 78%), url('assets/theme/community-space-20261014.png') center/cover fixed; background-position: center 28%; }
#member-view { background: linear-gradient(180deg, rgba(4,5,8,.32), rgba(4,5,8,.92) 76%), url('assets/theme/member-blackhole-20261014.png') center/cover fixed; background-position: center 38%; }
#chat-view { background: linear-gradient(180deg, rgba(4,6,10,.46), rgba(4,6,10,.91) 78%), url('assets/theme/chat-ring-20261014.png') center/cover fixed; background-position: center 24%; }
.recommend-grid { padding: 10px; border-radius: 16px; background: linear-gradient(rgba(5,6,9,.72), rgba(5,6,9,.82)), url('assets/theme/star-core-hero.png') center/cover; }
.library-tabs { padding: 7px; border-radius: 13px; background: linear-gradient(rgba(5,6,9,.72), rgba(5,6,9,.84)), url('assets/theme/star-core-orbit.png') center/cover; }
.star-core-book-section { background-image: linear-gradient(145deg, rgba(35, 26, 24, .82), rgba(5, 8, 13, .92)), url('assets/theme/star-core-shards.png'); background-size: cover; background-position: center; }
.exam-entry { background-image: linear-gradient(90deg, rgba(8,8,12,.78), rgba(8,8,12,.9)), url('assets/theme/star-core-blackhole.png'); background-size: cover; background-position: center; }
.compass-panel { background-image: linear-gradient(rgba(4,5,8,.5), rgba(4,5,8,.82)), url('assets/theme/star-core-compass.png') !important; background-size: cover !important; background-position: center !important; }
#chat-view .agent-card { background-image: linear-gradient(90deg, rgba(9,10,14,.82), rgba(15,15,19,.68)), url('assets/theme/chat-ring-20261014.png'); background-size: cover; background-position: center; }
#exam-view .exam-stage, #exam-view .exam-overview { background-image: linear-gradient(rgba(8,8,12,.78), rgba(8,8,12,.9)), url('assets/theme/star-core-silverbreak.png'); background-size: cover; background-position: center; }
.ten-kingdoms-section { background-image: linear-gradient(145deg, rgba(30,22,21,.75), rgba(5,8,13,.88)), url('assets/theme/star-core-redcore.png'); background-size: cover; background-position: center; }
.reader-app { background: linear-gradient(rgba(4,5,7,.72), rgba(4,5,7,.86)), url('assets/theme/star-core-night.png') center/cover fixed !important; }

/* The supplied update card is already typeset. Keep one accessible click target
   while avoiding a second, misaligned copy of its embedded text. */
.release-spotlight .orbit-image {
  opacity: 1;
  background-image: url('assets/theme/home-update-20261014.png');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}
.release-spotlight .orbit-content { width: 100%; min-height: 265px; padding: 0; pointer-events: none; }
.release-spotlight .orbit-content > :not(#home-update-action) { display: none; }
.release-spotlight #home-update-action {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: inherit;
  color: transparent;
  font-size: 0;
  pointer-events: auto;
}
.release-spotlight #home-update-action span { display: none; }
.release-spotlight #home-update-action:focus-visible { outline: 2px solid var(--star-core-gold); outline-offset: -5px; }

.library-top-promo {
  display: block;
  width: 100%;
  margin: 10px 0 18px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(180, 63, 56, .68);
  border-radius: 18px;
  background: #050608;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .34), inset 0 0 0 1px rgba(214, 220, 228, .12);
  cursor: pointer;
}
.library-top-promo img { display: block; width: 100%; height: auto; aspect-ratio: 425 / 274; object-fit: contain; }

/* A new title is a separate product, not a replacement for the 188-bean book. */
.star-core-ultimate-section { margin-top: 12px; border-color: rgba(213,173,115,.65); scroll-margin-top: 90px; }
.star-core-ultimate-section .star-core-book-hero { grid-template-columns: 112px minmax(0,1fr); }
.star-core-ultimate-section .star-core-book-hero img { width: 112px; height: auto; aspect-ratio: 1055 / 1491; object-fit: contain; border-color: rgba(213,173,115,.6); border-radius: 5px; }
.star-core-ultimate-section .star-core-book-hero h2 { font-size: 21px; line-height: 1.4; }
.star-core-ultimate-section .ultimate-reader-note { margin-top: 7px; color: #c5b18d; }
.star-core-ultimate-section .collection-book.is-locked img { filter: none; }
.star-core-ultimate-section .collection-book.is-locked::after { top: auto; bottom: 2px; left: 56px; transform: translateX(-50%); }
.star-core-ultimate-section .star-core-price { display: inline-flex; margin-top: 8px; color: #f3c580; font: 700 24px var(--serif); }
.star-core-ultimate-section .store-item { width: 100%; }
.release-spotlight[data-release-target="star-core-ultimate-section"] .orbit-image { background-image: linear-gradient(90deg,#06080e 10%,rgba(6,8,14,.8) 50%,rgba(6,8,14,.12)),url('assets/books/cover-star-core-ultimate.png'); background-size: cover,auto 100%; background-position: center,right center; opacity: 1; }
.release-spotlight[data-release-target="star-core-ultimate-section"] .orbit-content { padding: 22px 20px; pointer-events: auto; }
.release-spotlight[data-release-target="star-core-ultimate-section"] .orbit-content > :not(#home-update-action) { display: block; }
.release-spotlight[data-release-target="star-core-ultimate-section"] #home-update-title { max-width: 80%; white-space: pre-line; }
.release-spotlight[data-release-target="star-core-ultimate-section"] #home-update-summary { max-width: 78%; }
.release-spotlight[data-release-target="star-core-ultimate-section"] #home-update-action { position: static; width: auto; height: auto; padding: 0; color: var(--star-core-gold); font-size: 12px; }
.release-spotlight[data-release-target="star-core-ultimate-section"] #home-update-action span { display: inline; }
.release-spotlight[data-release-target="star-destroy-72-section"] .orbit-image { background-image: linear-gradient(90deg,#06080e 8%,rgba(6,8,14,.76) 50%,rgba(6,8,14,.1)),url('assets/books/cover-star-destroy-72.png'); background-size: cover,auto 100%; background-position: center,right center; opacity: 1; }
.release-spotlight[data-release-target="star-destroy-72-section"] .orbit-content { padding: 22px 20px; pointer-events: auto; }
.release-spotlight[data-release-target="star-destroy-72-section"] .orbit-content > :not(#home-update-action) { display: block; }
.release-spotlight[data-release-target="star-destroy-72-section"] #home-update-title { max-width: 82%; white-space: pre-line; }
.release-spotlight[data-release-target="star-destroy-72-section"] #home-update-summary { max-width: 80%; }
.release-spotlight[data-release-target="star-destroy-72-section"] #home-update-action { position: static; width: auto; height: auto; padding: 0; color: var(--star-core-gold); font-size: 12px; }
.release-spotlight[data-release-target="star-destroy-72-section"] #home-update-action span { display: inline; }
.star-destroy-book-section { border-color: rgba(191, 61, 45, .78); background: linear-gradient(145deg, rgba(45, 20, 18, .88), rgba(5, 8, 13, .94)); }
.star-destroy-book-section .star-core-price { color: #f2bd78; }

@media (max-width:380px) {
  .star-core-ultimate-section .star-core-book-hero { grid-template-columns: 92px minmax(0,1fr); gap: 11px; }
  .star-core-ultimate-section .star-core-book-hero img { width: 92px; }
  .star-core-ultimate-section .star-core-book-hero h2 { font-size: 18px; }
  .star-core-ultimate-section .collection-book.is-locked::after { left: 46px; }
}

@media (max-width: 520px) {
  #community-view { background-position: center top; }
  #member-view { background-position: 62% 32%; }
  #chat-view { background-position: center 18%; }
}

@media (max-width: 380px) {
  .star-core-promo-copy { max-width: 84%; padding: 18px 16px; }
  .star-core-promo-copy h2 { font-size: 21px; }
}

/* Account appearance and VIP identity layer. */
:root[data-app-theme="obsidian"] { --gold: #b9c6dc; --ink: #07101f; --line: rgba(185,198,220,.36); }
:root[data-app-theme="aurora"] { --gold: #8ce2ca; --ink: #06161a; --line: rgba(140,226,202,.36); }
:root[data-app-theme="ember"] { --gold: #f09a72; --ink: #1b0d0a; --line: rgba(240,154,114,.38); }
:root[data-app-theme="jade"] { --gold: #a5d8ac; --ink: #071712; --line: rgba(165,216,172,.36); }
.profile-orb.has-avatar, .avatar.has-avatar { background-size: cover; background-position: center; background-repeat: no-repeat; color: transparent; }
.avatar.has-avatar { border-color: rgba(255,255,255,.52); }
.appearance-panel { margin-top: 16px; padding: 14px; border: 1px solid rgba(223,178,108,.28); border-radius: 16px; background: linear-gradient(145deg,rgba(20,25,36,.72),rgba(9,13,20,.9)); }
.appearance-panel h2 { margin: 0; color: #f1dfbe; font: 600 18px var(--serif); }
.appearance-save-note { min-height: 16px; color: #9fb7cc; font-size: 10px; }
.appearance-save-note[data-tone="success"] { color: #7be1b0; }
.appearance-save-note[data-tone="error"] { color: #ff9b9b; }
.appearance-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; margin-top: 12px; }
.avatar-upload, .theme-picker { display: grid; gap: 6px; padding: 10px; border: 1px solid rgba(223,178,108,.18); border-radius: 11px; color: #d9c7aa; font-size: 11px; }
.avatar-upload small { color: #988d82; font-size: 9px; }
.avatar-upload input { width: 100%; color: #bcc9d7; font-size: 10px; }
.theme-options { display: flex; flex-wrap: wrap; gap: 5px; }
.theme-choice { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border: 1px solid rgba(223,178,108,.22); border-radius: 999px; background: rgba(3,7,13,.58); color: #b9b0a5; font-size: 10px; cursor: pointer; }
.theme-choice span { width: 9px; height: 9px; border-radius: 50%; background: #75b8ef; box-shadow: 0 0 8px rgba(117,184,239,.55); }
.theme-choice[data-theme-id="obsidian"] span { background: #b9c6dc; }.theme-choice[data-theme-id="aurora"] span { background: #8ce2ca; }.theme-choice[data-theme-id="ember"] span { background: #f09a72; }.theme-choice[data-theme-id="jade"] span { background: #a5d8ac; }
.theme-choice.is-selected { border-color: var(--gold); color: #f4e2bf; box-shadow: 0 0 0 1px rgba(255,210,120,.16); }
.appearance-save { width: 100%; margin-top: 10px; }
.honor-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.honor-vip-badges { display: inline-flex; flex-wrap: wrap; gap: 3px; overflow: visible; }
.vip-badge { display: inline-flex; align-items: center; padding: 2px 5px; border: 1px solid currentColor; border-radius: 999px; white-space: nowrap; font: 600 8px var(--mono); }
.vip-badge.special-vip { color: #ff7d88; background: rgba(138,22,37,.22); }
.vip-badge.annual-vip { color: #ff9c9c; background: rgba(119,21,28,.3); }
.vip-badge.emperor-dragon { color: #f3c96d; background: linear-gradient(90deg,rgba(122,75,14,.35),rgba(55,24,8,.5)); }
.vip-badge.full-library-vip { color: #c6a8ff; background: rgba(91,49,156,.26); }
.membership-badge { display: inline-flex; align-items: center; padding: 4px 7px; border: 1px solid currentColor; border-radius: 999px; font: 600 9px var(--mono); }
.membership-badge.special-vip { color: #ff7d88; background: rgba(138,22,37,.22); }
.membership-badge.annual-vip { color: #ffb0a9; background: rgba(119,21,28,.32); }
.membership-badge.emperor-dragon { color: #f3c96d; background: rgba(122,75,14,.28); }
.membership-badge.full-library-vip { color: #c6a8ff; background: rgba(91,49,156,.26); }
.vip-account-badge { display: inline-flex; align-items: center; padding: 4px 7px; border: 1px solid currentColor; border-radius: 999px; font: 600 9px var(--mono); white-space: nowrap; }
@media (max-width: 520px) { .appearance-grid { grid-template-columns: 1fr; } .honor-vip-badges { max-width: 100%; } }
