:root {
  color-scheme: light;
  --bg: #ee7744;
  --ink: #182025;
  --muted: #627071;
  --panel: rgba(255, 255, 255, 0.9);
  --line: rgba(28, 38, 43, 0.16);
  --shadow: 0 16px 40px rgba(28, 38, 43, 0.12);
  --rose: #d9577b;
  --amber: #c98322;
  --cyan: #168da0;
  --violet: #7d62b9;
  --green: #4b8d58;
  --blue: #3d79b4;
  --pink: #c95d9a;
  --lime: #6c8f34;
  --orange: #d46c2f;
  --gray: #687179;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

html {
  background: #ee7744;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background:
    linear-gradient(120deg, rgba(255, 244, 238, 0.94) 0%, rgba(246, 157, 112, 0.52) 48%, rgba(238, 119, 68, 0.9) 100%),
    #ee7744;
  background-attachment: fixed;
}

.birthday-firework-layer {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  opacity: 0;
  transition: opacity 360ms ease;
}

.birthday-firework-layer.is-active {
  opacity: 1;
}

.birthday-firework-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.app-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid rgba(24, 32, 37, 0.8);
  background: #fff;
  color: #1f3435;
  font-weight: 900;
}

.brand-block h1,
.brand-block p,
.hero-copy h2,
.hero-copy p,
.section-head h3 {
  margin: 0;
}

.brand-block h1 {
  font-size: 23px;
  line-height: 1.1;
}

.brand-block p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.topbar-status,
.assistant-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 800;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #90999b;
}

.status-dot.is-online {
  background: #2f9a65;
}

.layout {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.app-shell {
  position: relative;
  z-index: 1;
}

.hero-panel,
.section-block,
.data-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  min-height: 260px;
  overflow: hidden;
  min-width: 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px;
  min-width: 0;
}

.eyebrow {
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid rgba(217, 87, 123, 0.55);
  color: #953d58;
  background: rgba(217, 87, 123, 0.1);
  font-size: 13px;
  font-weight: 900;
}

.hero-copy h2 {
  max-width: 640px;
  margin-top: 16px;
  font-size: 40px;
  line-height: 1.16;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mobile-break {
  display: none;
}

.hero-visual {
  position: relative;
  display: grid;
  align-items: stretch;
  justify-items: end;
  min-height: 260px;
  padding: 0;
  background: transparent;
  border-left: 0;
  overflow: hidden;
}

.hero-visual img {
  display: block;
  position: relative;
  z-index: 1;
  width: auto;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: right center;
  filter: drop-shadow(0 11px 18px rgba(28, 38, 43, 0.18));
}

.home-hero {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 360px;
  height: 292px;
  min-height: 292px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 244, 0.86)),
    var(--panel);
}

.home-hero .hero-copy {
  justify-content: flex-start;
  padding: 42px 34px 28px;
}

.home-hero .hero-visual,
.home-hero .hero-visual img {
  height: 292px;
}

.home-hero .hero-copy h2 {
  margin-top: 0;
}

.hero-lead {
  max-width: 680px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 800;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.quick-actions a,
.home-contact-body a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(24, 32, 37, 0.16);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.quick-actions a:first-child {
  border-color: rgba(217, 87, 123, 0.45);
  background: rgba(217, 87, 123, 0.12);
  color: #913752;
}

.home-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.home-status-card,
.home-contact-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.home-bot-list {
  display: grid;
  gap: 9px;
}

.home-bot-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.home-bot-row strong,
.home-bot-row span,
.home-bot-row small,
.home-contact-body span,
.home-contact-body p {
  display: block;
}

.home-bot-row strong {
  font-size: 15px;
}

.home-bot-row span,
.home-bot-row small,
.home-contact-body span,
.home-contact-body p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.eyebrow[hidden] {
  display: none !important;
}

.home-bot-row small {
  grid-column: 1 / -1;
  line-height: 1.45;
}

.home-bot-badges {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.home-bot-badges span {
  padding: 4px 7px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.85);
  color: #344047;
}

.home-bot-row.is-running .home-bot-badges span:first-child {
  border-color: rgba(47, 154, 101, 0.35);
  background: rgba(47, 154, 101, 0.12);
  color: #246b49;
}

.home-bot-row.is-offline .home-bot-badges span:first-child {
  border-color: rgba(104, 113, 121, 0.24);
  background: rgba(104, 113, 121, 0.08);
}

.home-bot-row.is-joinable .home-bot-badges span:last-child {
  border-color: rgba(22, 141, 160, 0.34);
  background: rgba(22, 141, 160, 0.1);
  color: #146a78;
}

.home-bot-row.is-protected .home-bot-badges span:last-child {
  border-color: rgba(217, 87, 123, 0.34);
  background: rgba(217, 87, 123, 0.1);
  color: #913752;
}

.home-contact-body {
  display: grid;
  gap: 10px;
  min-height: calc(100% - 42px);
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.home-contact-body strong {
  font-size: 28px;
  line-height: 1;
}

.home-contact-body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
}

.home-feedback-form {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.home-feedback-form input,
.home-feedback-form textarea,
.home-feedback-form button {
  width: 100%;
  border: 1px solid rgba(24, 32, 37, 0.18);
  background: rgba(255, 255, 255, 0.94);
}

.home-feedback-form input {
  min-height: 36px;
  padding: 0 10px;
}

.home-feedback-form textarea {
  min-height: 92px;
  resize: vertical;
  padding: 9px 10px;
  line-height: 1.5;
}

.home-feedback-form button {
  min-height: 38px;
  cursor: pointer;
  color: #913752;
  font-weight: 1000;
}

.home-feedback-status {
  padding: 9px 10px;
  border: 1px solid rgba(22, 141, 160, 0.18);
  background: rgba(22, 141, 160, 0.08);
  color: #146a78;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.5;
}

.home-feedback-status:empty {
  display: none;
}

.home-message-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.home-message-row {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.home-message-row strong,
.home-message-row span,
.home-message-row p {
  display: block;
}

.home-message-row strong {
  color: #1d2b31;
  font-size: 13px;
  font-weight: 1000;
}

.home-message-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.home-message-row p {
  margin: 0;
  color: #344047;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.section-block,
.data-panel {
  padding: 18px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h3 {
  font-size: 21px;
}

.section-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.module-grid {
  display: grid;
  gap: 10px;
}

.home-module-row {
  display: grid;
  gap: 10px;
}

.home-module-row-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-module-row-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.home-module-row-extra {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.module-card {
  display: block;
  min-height: 104px;
  padding: 12px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent, var(--gray));
  background: rgba(255, 255, 255, 0.78);
  color: inherit;
  text-decoration: none;
}

.module-card h4,
.module-card p {
  margin: 0;
}

.module-card h4 {
  font-size: 17px;
  line-height: 1.2;
}

.module-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.module-status {
  display: inline-flex;
  padding: 3px 7px;
  border: 1px solid rgba(24, 32, 37, 0.18);
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 900;
}

.module-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}

.module-card-foot > span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.feature-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.feature-group {
  min-width: 0;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.64);
}

.feature-group h4 {
  margin: 0;
  padding: 12px;
  border-bottom: 1px solid rgba(24, 32, 37, 0.12);
  font-size: 17px;
}

.feature-list {
  display: grid;
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 12px;
  border-left: 5px solid var(--accent, var(--gray));
  border-bottom: 1px solid rgba(24, 32, 37, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.feature-row:last-child {
  border-bottom: none;
}

.feature-row strong {
  display: block;
  font-size: 15px;
}

.feature-row p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.feature-tags span {
  padding: 3px 7px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: #344047;
  font-size: 12px;
  font-weight: 800;
}

.chat-panel {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  min-height: 430px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.home-guide-panel {
  height: 430px;
  overflow: hidden;
}

.chat-side {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-right: 1px solid var(--line);
  background:
    url("/static/assets/home/nanami_guide_30.png") center bottom / 280px auto no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 246, 241, 0.72));
}

.chat-side h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.chat-side p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  font-weight: 700;
}

.chat-box {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  height: 100%;
  min-height: 430px;
  padding: 18px;
}

.home-guide-panel .chat-box {
  min-height: 0;
}

.home-guide-panel .chat-log {
  max-height: 100%;
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 4px;
}

.chat-message {
  max-width: min(520px, 82%);
  padding: 11px 12px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.84);
}

.chat-message.user {
  align-self: flex-end;
  border-color: rgba(22, 141, 160, 0.24);
  background: rgba(224, 244, 247, 0.9);
}

.chat-message span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chat-message p {
  margin: 5px 0 0;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 800;
}

.guide-answer p {
  margin: 6px 0 0;
}

.guide-answer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.guide-answer-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(217, 87, 123, 0.26);
  background: rgba(255, 255, 255, 0.86);
  color: #913752;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.guide-answer-command-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.guide-answer-command-list li {
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  border: 1px solid rgba(24, 32, 37, 0.1);
  background: rgba(255, 255, 255, 0.62);
}

.guide-answer-command-list strong,
.guide-answer-command-list span {
  display: block;
  font-size: 12px;
  line-height: 1.45;
}

.guide-answer-command-list span {
  color: var(--muted);
  font-weight: 800;
}

.home-guide-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(24, 32, 37, 0.1);
}

.home-guide-suggestions[hidden] {
  display: none;
}

.home-guide-suggestions button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(217, 87, 123, 0.26);
  background: rgba(255, 255, 255, 0.86);
  color: #913752;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 8px;
  margin-top: 14px;
}

.chat-compose input,
.chat-compose button {
  min-height: 42px;
  border: 1px solid rgba(24, 32, 37, 0.2);
  background: rgba(255, 255, 255, 0.92);
}

.chat-compose input {
  min-width: 0;
  padding: 0 12px;
}

.chat-compose button {
  cursor: pointer;
  font-weight: 900;
}

.plugin-layout[hidden],
#homeView[hidden] {
  display: none;
}

.plugin-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.plugin-hero-copy {
  min-width: 0;
}

.plugin-hero-actions {
  display: flex;
  align-items: center;
  align-self: center;
  justify-content: flex-end;
}

.plugin-hero-actions[hidden] {
  display: none;
}

.plugin-hero-actions button,
.plugin-hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(116, 67, 158, 0.5);
  background: #74439e;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(24, 32, 37, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.plugin-hero h2,
.plugin-hero p {
  margin: 0;
}

.plugin-hero h2 {
  margin-top: 12px;
  font-size: 36px;
  line-height: 1.1;
}

.plugin-hero .eyebrow[hidden] + h2 {
  margin-top: 0;
}

.plugin-hero p:not(.eyebrow) {
  max-width: 720px;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.65;
}

.plugin-hero .eyebrow[hidden] ~ p:not(.eyebrow) {
  margin-top: 9px;
}

body:has(.ring-page) .plugin-hero {
  padding: 14px 18px;
}

body:has(.ring-page) .plugin-hero h2 {
  margin-top: 6px;
  font-size: 30px;
}

body:has(.ring-page) .plugin-hero p:not(.eyebrow) {
  margin-top: 6px;
  line-height: 1.45;
}

.bread-page {
  display: grid;
  gap: 18px;
}

.bread-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.bread-stat,
.bread-panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.bread-stat {
  min-height: 92px;
  padding: 14px;
}

.bread-stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.bread-stat strong {
  display: block;
  margin-top: 8px;
  color: #8f4f13;
  font-size: 28px;
  line-height: 1;
}

.bread-panel {
  padding: 18px;
}

.bread-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.bread-section-head h3 {
  margin: 0;
  font-size: 22px;
}

.bread-section-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.bread-lookup-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
}

.bread-lookup-panel h3,
.bread-lookup-panel p {
  margin: 0;
}

.bread-lookup-panel p {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.bread-lookup-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 8px;
  align-self: start;
}

.bread-lookup-form input,
.bread-lookup-form button,
.sticker-tools input,
.sticker-tools select {
  min-height: 38px;
  border: 1px solid rgba(24, 32, 37, 0.2);
  background: rgba(255, 255, 255, 0.94);
}

.bread-lookup-form input,
.sticker-tools input {
  min-width: 0;
  padding: 0 10px;
}

.bread-lookup-form button {
  cursor: pointer;
  font-weight: 900;
}

.bread-lookup-result {
  grid-column: 1 / -1;
}

.bread-lookup-target {
  margin-bottom: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.76);
}

.bread-lookup-summary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0;
}

.bread-lookup-name,
.bread-lookup-rank,
.bread-lookup-bread {
  font-weight: 900;
  line-height: 1.2;
}

.bread-lookup-name {
  max-width: 220px;
  overflow: hidden;
  color: #1f2a31;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bread-lookup-rank {
  color: #1f2a31;
  font-size: 20px;
}

.bread-lookup-bread {
  margin-left: 14px;
  color: #8f4f13;
  font-size: 20px;
}

.bread-rank-shop {
  display: grid;
  grid-template-columns: minmax(460px, 0.92fr) minmax(0, 1.08fr);
  align-items: stretch;
  gap: 18px;
}

.bread-rank-list {
  display: grid;
  gap: 7px;
}

.bread-rank-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bread-rank-row {
  display: grid;
  grid-template-columns: 82px 82px minmax(0, 1fr) 76px 92px;
  align-items: center;
  gap: 10px;
  min-height: 96px;
  padding: 10px 12px;
  border: 1px solid rgba(24, 32, 37, 0.14);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.62)),
    url("/api/assets/bread/basic/bg.png");
  background-size: cover;
}

.bread-rank-mark {
  display: grid;
  min-width: 0;
  place-items: center;
}

.bread-rank-mark strong {
  color: #ff8fc3;
  font-size: 30px;
  -webkit-text-stroke: 1px #1b1f24;
}

.bread-rank-mark-img {
  max-width: 72px;
  max-height: 34px;
}

.bread-avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #fff7fb, #e8fbff);
}

.bread-avatar,
.bread-avatar-frame {
  position: absolute;
  inset: 0;
  width: 72px;
  height: 72px;
  object-fit: cover;
}

.bread-avatar-wrap.is-fallback::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #8f4f13;
  content: "QQ";
  font-weight: 900;
}

.bread-avatar-frame {
  inset: -3px;
  width: 78px;
  height: 78px;
  pointer-events: none;
}

.bread-rank-main,
.bread-rank-bread {
  min-width: 0;
}

.bread-rank-main span,
.bread-rank-bread span {
  display: block;
  color: #111;
  font-size: 13px;
  font-weight: 900;
}

.bread-rank-main strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #1f2a31;
  font-size: 17px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bread-badge {
  width: 66px;
  height: 66px;
  object-fit: contain;
}

.bread-rank-bread strong {
  display: block;
  margin-top: 5px;
  color: #8f4f13;
  font-size: 18px;
}

.bread-shop-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  overflow: hidden;
}

.bread-shop-command-block {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.bread-shop-command-grid {
  flex: 1 1 auto;
  grid-template-columns: 1fr;
  grid-auto-rows: minmax(42px, 1fr);
  gap: 8px;
}

.bread-shop-command-grid .command-card {
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 0;
  padding: 8px 10px;
}

.bread-shop-command-grid .command-card code {
  padding: 4px 6px;
  font-size: 12px;
}

.bread-shop-command-grid .command-card p {
  font-size: 12px;
  line-height: 1.4;
}

.bread-shop-preview-head {
  margin-top: 6px;
}

.bread-shop-preview-head h3 {
  margin: 0;
  font-size: 22px;
}

.bread-shop-stage {
  display: block;
  flex: 0 0 auto;
  min-height: 330px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.18);
}

.bread-shop-preview-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: cover;
}

.sticker-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px;
  gap: 8px;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.sticker-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  min-height: 138px;
  padding: 10px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.78);
}

.sticker-art {
  display: grid;
  place-items: center;
  border: 1px solid rgba(24, 32, 37, 0.1);
  background: rgba(255, 244, 225, 0.72);
}

.sticker-art img {
  max-width: 88px;
  max-height: 88px;
  object-fit: contain;
}

.sticker-body {
  min-width: 0;
}

.sticker-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sticker-title strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticker-title span {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid rgba(24, 32, 37, 0.13);
  background: #fff;
  color: #8f4f13;
  font-size: 11px;
  font-weight: 900;
}

.sticker-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  font-weight: 800;
}

.sticker-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.sticker-meta span {
  padding: 2px 6px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 900;
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.command-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 11px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.78);
}

.command-card code {
  padding: 5px 7px;
  border: 1px solid rgba(24, 32, 37, 0.15);
  background: rgba(255, 244, 225, 0.86);
  color: #7a4212;
  font-weight: 900;
  white-space: normal;
}

.command-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 800;
}

.jjc-page {
  display: grid;
  gap: 18px;
}

.jjc-stat,
.jjc-panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.jjc-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: end;
  min-height: 210px;
  overflow: hidden;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.52)),
    url("/api/assets/jjc/basic/bg7.png");
  background-position: center;
  background-size: cover;
}

.jjc-stage span {
  color: #1c7f9f;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.jjc-stage strong {
  display: block;
  margin-top: 6px;
  color: #13262f;
  font-size: 34px;
  line-height: 1.1;
}

.jjc-stage p {
  max-width: 620px;
  margin: 10px 0 0;
  color: #2e4149;
  font-weight: 800;
  line-height: 1.65;
}

.jjc-stage > img {
  justify-self: end;
  height: 225px;
  max-width: 240px;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.2));
}

.jjc-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.jjc-stat {
  min-height: 92px;
  padding: 14px;
}

.jjc-stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.jjc-stat strong {
  display: block;
  margin-top: 8px;
  color: #147a9a;
  font-size: 27px;
  line-height: 1;
}

.jjc-panel {
  padding: 18px;
}

.jjc-lookup-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
}

.jjc-lookup-panel h3,
.jjc-lookup-panel p {
  margin: 0;
}

.jjc-lookup-panel p {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.jjc-grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  align-items: stretch;
  gap: 18px;
}

.jjc-rank-list {
  display: grid;
  gap: 8px;
}

.jjc-rank-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.jjc-demo-panel .jjc-rank-list.compact {
  margin-top: 10px;
}

.jjc-rank-row {
  display: grid;
  grid-template-columns: 76px 62px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 112px;
  padding: 11px;
  border: 1px solid rgba(24, 32, 37, 0.14);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.62)),
    url("/api/assets/jjc/basic/bg6.png");
  background-position: center;
  background-size: cover;
}

.jjc-rank-row.is-top {
  border-color: rgba(28, 127, 159, 0.34);
}

.jjc-rank-row.is-rank-3 {
  grid-template-columns: 76px 78px minmax(0, 1fr);
}

.jjc-rank-row.is-rank-4 {
  grid-template-columns: 76px 90px minmax(0, 1fr);
}

.jjc-rank-avatar {
  display: grid;
  place-items: end center;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 1px solid rgba(24, 32, 37, 0.16);
  background:
    linear-gradient(rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.42)),
    url("/api/assets/jjc/basic/bg5.png");
  background-size: 100% 100%;
}

.jjc-rank-avatar img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  object-position: bottom center;
}

.jjc-rank-number {
  color: #ff91c0;
  font-size: 27px;
  font-weight: 900;
  text-align: center;
  -webkit-text-stroke: 1px #10212a;
}

.jjc-rank-row.is-rank-3 .jjc-rank-number {
  font-size: 24px;
}

.jjc-rank-row.is-rank-4 .jjc-rank-number {
  font-size: 21px;
}

.jjc-rank-main {
  min-width: 0;
}

.jjc-rank-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.jjc-rank-title strong,
.jjc-rank-title span,
.jjc-rank-title em {
  display: block;
}

.jjc-rank-title strong {
  overflow: hidden;
  color: #15262e;
  font-size: 18px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jjc-rank-title span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.jjc-rank-title em {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid rgba(20, 122, 154, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: #147a9a;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.jjc-rank-main p {
  margin: 6px 0 8px;
  overflow: hidden;
  color: #4a5b63;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jjc-team-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.jjc-team-member {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  min-width: 0;
  padding: 4px;
  border: 1px solid rgba(24, 32, 37, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.jjc-team-member img {
  width: 34px;
  height: 40px;
  object-fit: contain;
  object-position: bottom center;
}

.jjc-team-member strong,
.jjc-team-member span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jjc-team-member strong {
  color: #17282f;
  font-size: 12px;
  font-weight: 900;
}

.jjc-team-member span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.jjc-play-panel {
  display: flex;
  flex-direction: column;
}

.jjc-flow-list,
.jjc-reward-list {
  display: grid;
  gap: 8px;
}

.jjc-flow-item,
.jjc-reward-row {
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.76);
}

.jjc-flow-item {
  padding: 10px 12px;
}

.jjc-flow-item strong {
  color: #147a9a;
  font-size: 14px;
}

.jjc-flow-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.jjc-reward-head {
  margin-top: auto;
  padding-top: 16px;
}

.jjc-command-head {
  margin-top: 14px;
}

.jjc-reward-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
}

.jjc-reward-row span {
  color: var(--muted);
  font-weight: 900;
}

.jjc-reward-row strong {
  color: #147a9a;
  font-weight: 900;
}

.jjc-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, 126px);
  gap: 8px;
}

.jjc-tools input,
.jjc-tools select {
  min-height: 38px;
  min-width: 0;
  border: 1px solid rgba(24, 32, 37, 0.2);
  background: rgba(255, 255, 255, 0.94);
  padding: 0 10px;
  font-weight: 800;
}

.jjc-character-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.jjc-character-card {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
  min-height: 0;
  padding: 12px;
  border: 1px solid rgba(24, 32, 37, 0.13);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.58)),
    url("/static/assets/shared/cv_random_bg_cropped.png");
  background-position: center;
  background-size: cover;
}

.jjc-character-card.is-filter-hidden,
.jjc-character-card[hidden] {
  display: none !important;
}

.jjc-character-side {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-self: stretch;
  gap: 10px;
}

.jjc-character-art {
  position: relative;
  display: grid;
  align-items: center;
  justify-items: center;
  width: 164px;
  height: 196px;
  min-height: 0;
  padding: 8px 8px 34px;
  overflow: hidden;
  border: 1px solid rgba(24, 32, 37, 0.24);
  background:
    linear-gradient(145deg, rgba(198, 236, 248, 0.98), rgba(255, 221, 239, 0.96)),
    url("/api/assets/jjc/basic/bg5.png");
  background-position: center;
  background-size: 100% 100%;
}

.jjc-character-art::before {
  position: absolute;
  inset: 8px;
  z-index: 0;
  background: linear-gradient(145deg, rgba(215, 246, 255, 0.94), rgba(255, 232, 244, 0.94));
  content: "";
}

.jjc-character-art::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: url("/api/assets/jjc/basic/frame.png");
  background-size: 100% 100%;
  content: "";
  pointer-events: none;
}

.jjc-character-art > img {
  position: relative;
  z-index: 1;
  width: 142px;
  height: 142px;
  border: none;
  object-fit: cover;
  object-position: center;
  box-shadow: none;
}

.jjc-star-row {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 1px;
}

.jjc-star-row img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4));
}

.jjc-character-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.jjc-character-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.jjc-character-title h4 {
  margin: 0;
  color: #13262f;
  font-size: 19px;
  line-height: 1.2;
}

.jjc-character-title span,
.jjc-character-title em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.jjc-character-title span {
  display: block;
  margin-top: 4px;
}

.jjc-character-title em {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid rgba(24, 32, 37, 0.14);
  background: rgba(255, 255, 255, 0.76);
}

.jjc-attr-row {
  display: grid;
  align-content: space-between;
  gap: 8px;
  min-height: 0;
  margin-top: 0;
}

.jjc-attr-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 164px;
  height: 34px;
  padding: 0;
  overflow: hidden;
  border: none;
  background: transparent;
}

.jjc-attr-pill img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.jjc-mini-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.jjc-mini-stat {
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid rgba(24, 32, 37, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.jjc-mini-stat span,
.jjc-mini-stat strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jjc-mini-stat span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.jjc-mini-stat strong {
  margin-top: 2px;
  color: #13262f;
  font-size: 12px;
  font-weight: 900;
}

.jjc-skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
  margin-top: auto;
  padding-top: 12px;
}

.jjc-skill-block {
  display: flex;
  flex-direction: column;
  min-height: 118px;
  padding: 10px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.76);
}

.jjc-skill-block span {
  color: #147a9a;
  font-size: 11px;
  font-weight: 900;
}

.jjc-skill-block strong {
  display: block;
  margin-top: 3px;
  color: #13262f;
  font-size: 14px;
}

.jjc-skill-block p {
  margin: 8px 0 0;
  color: #40525a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.jjc-command-grid .command-card code {
  background: rgba(232, 249, 255, 0.92);
  color: #166985;
}

.jjc-play-panel .jjc-command-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.jjc-play-panel .command-card {
  align-items: stretch;
  gap: 8px;
  padding: 9px;
}

.jjc-play-panel .command-card code {
  display: flex;
  align-items: center;
  min-height: 100%;
  padding: 6px 7px;
  font-size: 11px;
  line-height: 1.4;
}

.jjc-play-panel .command-card p {
  font-size: 11px;
  line-height: 1.45;
}

.jjc-lookup-target h4 {
  margin: 0;
  font-size: 19px;
}

.jjc-lookup-target {
  display: grid;
  min-height: 92px;
  place-items: center start;
}

.jjc-player-detail {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.jjc-player-block {
  padding: 12px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.62)),
    url("/api/assets/jjc/basic/bg6.png");
  background-position: center;
  background-size: cover;
}

.jjc-repository-grid,
.jjc-team-large {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.jjc-team-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.jjc-repository-member {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(24, 32, 37, 0.1);
  background: rgba(255, 255, 255, 0.76);
}

.jjc-repository-member img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.jjc-repository-member strong,
.jjc-repository-member span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jjc-repository-member strong {
  color: #14262f;
  font-size: 13px;
  font-weight: 900;
}

.jjc-repository-member span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.jjc-guide-panel {
  display: grid;
  gap: 12px;
}

.jjc-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.jjc-guide-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 384px;
  padding: 14px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.76);
}

.jjc-guide-card h4 {
  margin: 0 0 10px;
  color: #13262f;
  font-size: 16px;
}

.jjc-guide-chip-grid {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}

.jjc-guide-chip-grid.is-position,
.jjc-guide-chip-grid.is-role {
  justify-content: space-between;
}

.jjc-guide-chip {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(24, 32, 37, 0.1);
  background: rgba(255, 255, 255, 0.68);
}

.jjc-guide-chip img {
  width: 90px;
  height: 25px;
  object-fit: contain;
}

.jjc-guide-chip strong,
.jjc-guide-chip span {
  display: block;
}

.jjc-guide-chip strong {
  color: #13262f;
  font-size: 13px;
  font-weight: 900;
}

.jjc-guide-chip span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
}

.jjc-type-card {
  overflow: hidden;
}

.jjc-type-table-wrap {
  flex: 1;
  min-width: 0;
  overflow: auto;
}

.jjc-type-table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  overflow: hidden;
  border: 2px solid #162532;
  background: #e6f0f4;
}

.jjc-type-table th,
.jjc-type-table td {
  border: 2px solid #162532;
  padding: 9px 5px;
  color: #101820;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  vertical-align: middle;
}

.jjc-type-table thead th:first-child {
  background: #2b4965;
  color: #fff;
}

.jjc-type-attack.is-explosion,
.jjc-type-armor.is-light {
  background: #ff454f;
  color: #fff;
}

.jjc-type-attack.is-pierce,
.jjc-type-armor.is-heavy {
  background: #d9bd00;
  color: #fff;
}

.jjc-type-attack.is-mystic,
.jjc-type-armor.is-special {
  background: #3ba4ee;
  color: #fff;
}

.jjc-type-attack.is-sonic,
.jjc-type-armor.is-elastic {
  background: #eb4da3;
  color: #fff;
}

.jjc-type-table td.is-bonus {
  color: #ff424c;
}

.jjc-type-table td.is-resist {
  color: #2696ff;
}

.jjc-type-table td.is-normal {
  color: #101820;
}

.jjc-filter-empty {
  margin-top: 12px;
}

.voice-page {
  display: grid;
  gap: 14px;
}

.voice-stage,
.voice-panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.voice-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 14px;
  padding: 20px;
  border-top: 5px solid var(--orange);
}

.voice-stage-copy span,
.voice-server-card span,
.voice-field span,
.voice-control span,
.voice-audio-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.voice-stage-copy h3,
.voice-stage-copy p,
.voice-server-card strong,
.voice-server-card p,
.voice-field,
.voice-control em,
.voice-speaker-card strong,
.voice-speaker-card p,
.voice-audio-card strong,
.voice-audio-card p {
  margin: 0;
}

.voice-stage-copy h3 {
  margin-top: 8px;
  font-size: 30px;
  line-height: 1.15;
}

.voice-stage-copy p {
  max-width: 740px;
  margin-top: 10px;
  color: #435158;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.75;
}

.voice-server-card {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(212, 108, 47, 0.28);
  background: rgba(255, 248, 242, 0.86);
}

.voice-server-card strong {
  overflow-wrap: anywhere;
  font-size: 16px;
}

.voice-server-card p,
.voice-audio-card p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.voice-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1.18fr);
  gap: 14px;
  align-items: start;
}

.voice-panel {
  padding: 18px;
}

.voice-form,
.voice-control-grid,
.voice-speaker-grid {
  display: grid;
  gap: 10px;
}

.voice-form {
  grid-template-columns: 1fr;
}

.voice-field,
.voice-control {
  display: grid;
  gap: 7px;
}

.voice-field select,
.voice-field textarea,
.voice-form button,
.voice-control input,
.voice-control select,
.voice-control textarea,
.voice-speaker-search {
  width: 100%;
  border: 1px solid rgba(28, 38, 43, 0.2);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-weight: 800;
}

.voice-field select,
.voice-control input,
.voice-control select,
.voice-speaker-search {
  min-height: 42px;
  padding: 0 10px;
}

.voice-field textarea,
.voice-control textarea {
  min-height: 118px;
  resize: vertical;
  padding: 10px;
  line-height: 1.55;
}

.voice-form button {
  min-height: 44px;
  border-color: rgba(212, 108, 47, 0.36);
  background: #d46c2f;
  color: #fff;
  cursor: pointer;
}

.voice-result {
  margin-top: 12px;
}

.voice-audio-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(212, 108, 47, 0.28);
  background: rgba(255, 248, 242, 0.88);
}

.voice-audio-card audio {
  width: 100%;
}

.voice-download-button {
  display: inline-grid;
  min-height: 38px;
  width: fit-content;
  min-width: 120px;
  place-items: center;
  padding: 0 14px;
  border: 1px solid rgba(212, 108, 47, 0.36);
  background: rgba(212, 108, 47, 0.12);
  color: #813f1f;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.voice-control-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.voice-control.is-wide {
  grid-column: 1 / -1;
}

.voice-control em {
  min-height: 32px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
}

.voice-range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 8px;
  align-items: center;
}

.voice-range-row output {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 1px solid rgba(28, 38, 43, 0.16);
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 900;
}

.voice-speaker-search {
  margin-bottom: 10px;
}

.voice-speaker-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.voice-speaker-card {
  min-height: 92px;
  padding: 10px;
  border: 1px solid rgba(28, 38, 43, 0.16);
  background: rgba(255, 255, 255, 0.74);
  cursor: pointer;
}

.voice-speaker-card strong {
  display: block;
  color: #813f1f;
  font-size: 16px;
}

.voice-speaker-card p {
  margin-top: 7px;
  color: #536268;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.character-image-page {
  display: grid;
  gap: 14px;
}

.character-image-stage,
.character-image-panel,
.character-image-stat {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.character-image-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 16px;
  min-height: 450px;
  padding: 20px;
  border-top: 5px solid var(--lime);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(242, 255, 240, 0.74)),
    url("/static/assets/shared/cv_random_bg_cropped.png") center / cover no-repeat;
}

.character-image-copy {
  display: grid;
  align-content: center;
  gap: 12px;
}

.character-image-copy span,
.character-image-stat span,
.character-image-bookmarks span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.character-image-copy h3,
.character-image-copy p,
.character-image-stat strong,
.character-image-card,
.character-image-card figcaption,
.character-image-card p {
  margin: 0;
}

.character-image-copy h3 {
  color: #264d27;
  font-size: 34px;
  line-height: 1.12;
}

.character-image-copy p {
  max-width: 720px;
  color: #405361;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.75;
}

.character-image-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 118px 112px;
  gap: 8px;
  align-items: stretch;
}

.character-image-mode {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 6px;
  align-items: center;
}

.character-image-mode label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid rgba(48, 120, 67, 0.18);
  background: rgba(255, 255, 255, 0.88);
  color: #315c35;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.character-image-fields {
  display: grid;
  min-width: 0;
}

.character-image-form input,
.character-image-form select,
.character-image-form button,
.character-image-tools input {
  min-height: 42px;
  border: 1px solid rgba(48, 120, 67, 0.22);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-weight: 900;
}

.character-image-form input,
.character-image-form select,
.character-image-tools input {
  min-width: 0;
  padding: 0 12px;
}

.character-image-bookmarks {
  display: grid;
  gap: 4px;
}

.character-image-bookmarks input {
  width: 100%;
}

.character-image-form button {
  background: #4d8f42;
  color: #fff;
  cursor: pointer;
}

.character-image-form .is-hidden {
  display: none;
}

.character-image-result {
  display: grid;
  min-height: 410px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(48, 120, 67, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(242, 255, 240, 0.46)),
    url("/static/assets/shared/cv_random_bg_cropped.png") center / cover no-repeat;
}

.character-image-card {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 410px;
  grid-template-rows: minmax(0, 1fr) auto;
}

.character-image-message {
  place-items: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.94);
  text-align: center;
}

.character-image-message p {
  max-width: 540px;
  color: #315c35;
  font-size: 20px;
  line-height: 1.65;
}

.character-image-card img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.6);
}

.character-image-card figcaption {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid rgba(48, 120, 67, 0.14);
  background: rgba(255, 255, 255, 0.93);
}

.character-image-card strong {
  color: #2d6d34;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.character-image-card span,
.character-image-card p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.character-image-card p {
  grid-column: 1 / 2;
  line-height: 1.45;
}

.character-image-card.character-image-message p {
  max-width: 540px;
  color: #315c35;
  font-size: 20px;
  line-height: 1.65;
}

.character-image-card a {
  grid-column: 2 / 3;
  grid-row: 1 / span 3;
  padding: 8px 12px;
  border: 1px solid rgba(48, 120, 67, 0.22);
  background: rgba(77, 143, 66, 0.1);
  color: #2d6d34;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.character-image-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.character-image-stat {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.character-image-stat strong {
  color: #2d6d34;
  font-size: 24px;
}

.character-image-grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 14px;
}

.character-image-panel {
  padding: 18px;
}

.character-image-tools {
  min-width: min(280px, 100%);
}

.character-image-list {
  display: grid;
  gap: 8px;
  max-height: 720px;
  overflow-y: auto;
}

.character-image-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.34fr) minmax(0, 0.66fr);
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(48, 120, 67, 0.14);
  background: rgba(246, 253, 244, 0.78);
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 82px;
}

.character-image-main {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 58px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(48, 120, 67, 0.14);
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  text-align: center;
}

.character-image-main strong {
  color: #2d6d34;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.character-image-main span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
}

.character-image-aliases {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.character-image-aliases button {
  max-width: 100%;
  padding: 5px 7px;
  border: 1px solid rgba(48, 120, 67, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: #315c35;
  font-size: 11px;
  font-weight: 900;
  cursor: copy;
  overflow-wrap: anywhere;
}

.character-image-page .command-grid {
  grid-template-columns: 1fr;
}

.character-image-page .command-card {
  grid-template-columns: 1fr;
  gap: 7px;
}

.character-image-page .command-card code {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  background: rgba(242, 255, 238, 0.92);
  color: #2d6d34;
}

.character-image-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  margin-top: 12px;
}

.character-image-gallery-card {
  display: grid;
  grid-template-rows: 168px auto;
  align-self: start;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(48, 120, 67, 0.14);
  background: rgba(255, 255, 255, 0.94);
  cursor: pointer;
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 260px;
}

.character-image-sample-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  min-height: 0;
  overflow: hidden;
  background: rgba(242, 250, 239, 0.84);
}

.character-image-sample-strip img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
}

.character-image-sample-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.character-image-gallery-card-body {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(48, 120, 67, 0.12);
  background: rgba(255, 255, 255, 0.96);
}

.character-image-gallery-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.character-image-gallery-card-title strong {
  color: #2d6d34;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.character-image-gallery-card-title span,
.character-image-gallery-card-body p,
.character-image-catalog-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.character-image-gallery-card-body p {
  margin: 0;
}

.character-image-card-aliases,
.character-image-gallery-aliases {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 0;
  max-height: 48px;
  overflow: hidden;
}

.character-image-card-aliases span,
.character-image-gallery-aliases button {
  flex: 0 0 auto;
  max-width: 88px;
  padding: 3px 6px;
  border: 1px solid rgba(48, 120, 67, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: #315c35;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.character-image-gallery-aliases button {
  cursor: copy;
}

.character-image-catalog-actions,
.character-image-gallery-more {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 14px;
}

.character-image-catalog-actions button,
.character-image-back-button,
.character-image-random-inline,
.character-image-gallery-more button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(48, 120, 67, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: #2d6d34;
  font-weight: 900;
  cursor: pointer;
}

.character-image-random-inline {
  background: #4d8f42;
  color: #fff;
}

.character-image-gallery-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--lime);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.character-image-gallery-head h3,
.character-image-gallery-head p {
  margin: 0;
}

.character-image-gallery-head h3 {
  color: #2d6d34;
  font-size: 32px;
}

.character-image-gallery-head p {
  margin-top: 4px;
  color: #405361;
  font-weight: 900;
}

.character-image-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.character-image-photo-tile {
  display: grid;
  grid-template-rows: 210px 50px;
  overflow: hidden;
  border: 1px solid rgba(48, 120, 67, 0.14);
  background: rgba(255, 255, 255, 0.82);
  color: #315c35;
  text-decoration: none;
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 260px;
}

.character-image-photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(242, 250, 239, 0.84);
}

.character-image-photo-tile span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 8px 9px;
  overflow: hidden;
  border-top: 1px solid rgba(48, 120, 67, 0.12);
  background: rgba(255, 255, 255, 0.95);
}

.character-image-photo-tile strong,
.character-image-photo-tile em {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.character-image-photo-tile strong {
  color: #315c35;
}

.character-image-photo-tile i {
  color: #e94b5f;
  font-size: 14px;
  font-style: normal;
  line-height: 1;
}

.meme-page {
  display: grid;
  gap: 18px;
}

.meme-stage,
.meme-panel,
.meme-stat {
  border: 1px solid rgba(83, 45, 64, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.meme-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
  padding: 20px;
  overflow: hidden;
}

.meme-stage-copy {
  display: grid;
  align-content: center;
  gap: 10px;
}

.meme-stage-copy span,
.meme-stat span,
.meme-fieldset-head span,
.meme-composer-head span {
  color: rgba(68, 37, 51, 0.62);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.meme-stage-copy h3,
.meme-stage-copy p,
.meme-stat strong,
.meme-template-row strong,
.meme-template-row span,
.meme-template-row em,
.meme-composer-head h3,
.meme-composer-head p,
.meme-field,
.meme-option-check,
.meme-result-card figcaption {
  letter-spacing: 0;
}

.meme-stage-copy h3 {
  margin: 0;
  color: #3d2431;
  font-size: 1.55rem;
}

.meme-stage-copy p,
.meme-composer-head p {
  margin: 0;
  color: rgba(46, 36, 42, 0.72);
  line-height: 1.7;
}

.meme-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.meme-stat {
  padding: 12px;
}

.meme-stat strong {
  display: block;
  margin-top: 6px;
  color: #3b202e;
  font-size: 1.18rem;
}

.meme-workbench {
  display: grid;
  grid-template-columns: minmax(260px, 0.74fr) minmax(420px, 1.26fr);
  gap: 18px;
  align-items: start;
}

.meme-panel {
  padding: 16px;
}

.meme-search-row {
  margin-bottom: 12px;
}

.meme-search-row input,
.meme-field input,
.meme-field textarea,
.meme-field select {
  width: 100%;
  border: 1px solid rgba(83, 45, 64, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #301d27;
  font: inherit;
  font-weight: 700;
  outline: none;
}

.meme-search-row input,
.meme-field input,
.meme-field select {
  height: 40px;
  padding: 0 11px;
}

.meme-field textarea {
  min-height: 58px;
  resize: vertical;
  padding: 9px 11px;
}

.meme-template-list {
  display: grid;
  gap: 8px;
  max-height: 680px;
  overflow: auto;
  padding-right: 4px;
}

.meme-template-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  width: 100%;
  border: 1px solid rgba(83, 45, 64, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px 12px;
  color: #3a2230;
  cursor: pointer;
  text-align: left;
}

.meme-template-row[hidden],
#memeTemplateEmpty[hidden] {
  display: none !important;
}

.meme-template-row.is-active {
  border-color: rgba(214, 74, 119, 0.58);
  background: rgba(255, 239, 246, 0.92);
}

.meme-template-row strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meme-template-row span {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  color: rgba(54, 37, 46, 0.64);
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meme-template-row em {
  color: rgba(54, 37, 46, 0.55);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.meme-composer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.meme-composer-head h3 {
  margin: 4px 0;
  color: #3b202e;
  font-size: 1.3rem;
}

.meme-composer-head img {
  width: 132px;
  height: 132px;
  border: 1px solid rgba(83, 45, 64, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  object-fit: contain;
}

.meme-form {
  display: grid;
  gap: 12px;
}

.meme-fieldset {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(83, 45, 64, 0.12);
  border-radius: 8px;
  background: rgba(255, 249, 252, 0.72);
  padding: 12px;
}

.meme-fieldset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.meme-fieldset-head strong {
  color: #3a2230;
  font-weight: 900;
}

.meme-field {
  display: grid;
  gap: 6px;
  color: #3a2230;
  font-weight: 900;
}

.meme-field span {
  font-size: 0.78rem;
}

.meme-image-slots,
.meme-text-grid,
.meme-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.meme-image-slot {
  display: grid;
  gap: 10px;
  border: 1px dashed rgba(83, 45, 64, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px;
  color: #3a2230;
  font-size: 0.8rem;
  font-weight: 900;
}

.meme-image-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.meme-image-slot-head strong {
  font-size: 0.9rem;
}

.meme-image-slot-head span {
  border: 1px solid rgba(214, 74, 119, 0.22);
  border-radius: 999px;
  background: rgba(255, 239, 246, 0.82);
  color: #9d294f;
  padding: 3px 8px;
  font-size: 0.72rem;
}

.meme-source-switch {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 6px;
}

.meme-source-switch label {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(83, 45, 64, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(54, 37, 46, 0.72);
  cursor: pointer;
  font-size: 0.76rem;
}

.meme-source-switch label:has(input:checked) {
  border-color: rgba(214, 74, 119, 0.5);
  background: rgba(255, 239, 246, 0.92);
  color: #8e2449;
}

.meme-source-switch input {
  accent-color: #d64a77;
}

.meme-image-mode-panel[hidden] {
  display: none;
}

.meme-image-slot input {
  width: 100%;
  font-size: 0.78rem;
}

.meme-option-check {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(83, 45, 64, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 9px 10px;
  color: #3a2230;
  font-weight: 900;
}

.meme-form button {
  height: 42px;
  border: none;
  border-radius: 8px;
  background: #d64a77;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.meme-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.meme-result {
  margin-top: 14px;
}

.meme-result-card {
  display: grid;
  gap: 12px;
  margin: 0;
}

.meme-result-card img {
  width: 100%;
  max-height: 520px;
  border: 1px solid rgba(83, 45, 64, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  object-fit: contain;
}

.meme-result-card figcaption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  align-items: center;
}

.meme-result-card strong {
  color: #3a2230;
  font-weight: 900;
}

.meme-result-card span {
  color: rgba(54, 37, 46, 0.62);
  font-size: 0.8rem;
  font-weight: 800;
}

.meme-result-card a {
  grid-row: span 2;
  border: 1px solid rgba(214, 74, 119, 0.3);
  border-radius: 8px;
  color: #9d294f;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.meme-command-grid.command-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sgs-info-page {
  display: grid;
  gap: 14px;
}

.sgs-info-panel,
.sgs-info-stat {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.sgs-info-stats,
.sgs-info-grid {
  display: grid;
  gap: 10px;
}

.sgs-info-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sgs-info-stat {
  padding: 14px;
}

.sgs-info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.sgs-info-panel {
  min-width: 0;
  padding: 16px;
}

.sgs-info-command-grid.command-grid {
  grid-template-columns: 1fr;
}

.sgs-info-command-grid .command-card {
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
}

.sgs-info-type-panel {
  display: flex;
  flex-direction: column;
}

.sgs-type-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: minmax(44px, 1fr);
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
}

.sgs-type-grid span {
  display: grid;
  gap: 3px;
  min-height: 58px;
  align-content: center;
  padding: 9px 10px;
  border: 1px solid rgba(24, 32, 37, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.sgs-type-grid strong,
.sgs-type-grid em,
.sgs-intro-role-card strong,
.sgs-intro-role-card span {
  display: block;
}

.sgs-type-grid strong {
  color: #24192f;
  font-size: 13px;
  font-weight: 900;
}

.sgs-type-grid em {
  color: #74439e;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.sgs-role-preview-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.sgs-intro-role-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.sgs-intro-role-card img {
  width: 100%;
  aspect-ratio: 0.72;
  object-fit: cover;
  background: rgba(244, 236, 255, 0.65);
}

.sgs-intro-role-card strong {
  overflow: hidden;
  color: #24192f;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sgs-intro-role-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

@media (max-width: 860px) {
  .sgs-info-grid {
    grid-template-columns: 1fr;
  }

  .sgs-info-stats,
  .sgs-role-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sgs-info-command-grid .command-card {
    grid-template-columns: 1fr;
  }

  .sgs-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sgs-page {
  display: grid;
  gap: 16px;
  height: 100vh;
  overflow: hidden;
}

body:has(.sgs-page) {
  overflow: hidden;
  background: #171615;
}

body:has(.sgs-page) .app-shell {
  width: 100%;
  padding: 0;
}

body:has(.sgs-page) .topbar,
body:has(.sgs-page) .plugin-hero,
body:has(.sgs-page) .live2d-dock,
body:has(.sgs-page) .help-fab {
  display: none;
}

body:has(.sgs-page) .plugin-layout {
  margin: 0;
}

.sgs-table,
.sgs-panel {
  border: 1px solid rgba(24, 32, 37, 0.16);
  background: rgba(250, 248, 242, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.sgs-table {
  position: relative;
  display: grid;
  grid-template-rows: 58px 172px minmax(150px, 1fr) 220px;
  gap: 12px;
  padding: 16px;
  height: 100vh;
  min-height: 560px;
  background:
    linear-gradient(140deg, rgba(245, 241, 230, 0.92), rgba(232, 238, 230, 0.9)),
    url("/api/sgs/asset/basic/bg.png");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.sgs-table-head {
  margin-left: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(24, 32, 37, 0.18);
  background: rgba(255, 255, 255, 0.82);
}

.sgs-left-rail {
  position: absolute;
  z-index: 8;
  top: 16px;
  left: 16px;
  display: grid;
  gap: 8px;
  width: 58px;
}

.sgs-left-rail a,
.sgs-left-rail button {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid rgba(226, 208, 162, 0.45);
  background: rgba(45, 37, 32, 0.78);
  color: #f8efd3;
  text-decoration: none;
  font-size: 13px;
  font-weight: 1000;
  cursor: pointer;
}

.sgs-table-head span,
.sgs-mode {
  color: #61513b;
  font-size: 13px;
  font-weight: 900;
}

.sgs-table-head h3,
.sgs-action-panel p,
.sgs-character-card,
.sgs-character-card figcaption,
.sgs-role-info h4,
.sgs-role-info p {
  margin: 0;
}

.sgs-table-head h3 {
  margin-top: 3px;
  font-size: 23px;
}

.sgs-table-stats,
.sgs-tags,
.sgs-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sgs-table-stats span,
.sgs-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid rgba(24, 32, 37, 0.14);
  background: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 900;
}

.sgs-seat {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(24, 32, 37, 0.18);
  background: rgba(255, 255, 255, 0.76);
  min-width: 0;
  min-height: 0;
}

.sgs-seat-opponent {
  width: min(720px, calc(100vw - 170px));
  justify-self: center;
}

.sgs-seat-self {
  width: min(860px, calc(100vw - 110px));
  justify-self: end;
  align-self: end;
}

.sgs-seat.is-active {
  border-color: rgba(196, 76, 52, 0.72);
  box-shadow: 0 0 0 3px rgba(196, 76, 52, 0.1);
}

.sgs-character-zone {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.sgs-character-card {
  position: relative;
  border: 1px solid rgba(24, 32, 37, 0.22);
  background: #f9f6ec;
  overflow: hidden;
}

.sgs-character-card img {
  display: block;
  width: 104px;
  height: 138px;
  object-fit: cover;
}

.sgs-character-card figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 5px 6px;
  background: rgba(24, 32, 37, 0.72);
  color: #fff;
}

.sgs-character-card figcaption span,
.sgs-character-card figcaption strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sgs-character-card figcaption span {
  font-size: 11px;
  font-weight: 800;
}

.sgs-character-card figcaption strong {
  margin-top: 2px;
  font-size: 15px;
}

.sgs-vitals {
  display: grid;
  gap: 8px;
}

.sgs-hp {
  position: relative;
  min-height: 42px;
  border: 1px solid rgba(24, 32, 37, 0.22);
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.sgs-hp i {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #cf5d4e, #e1a443);
}

.sgs-hp div {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 4px;
  height: 100%;
  padding: 6px 9px;
  color: #101417;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.sgs-hp strong {
  font-size: 22px;
  font-weight: 1000;
}

.sgs-hp span {
  font-weight: 900;
}

.sgs-zones {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 0.9fr);
  gap: 10px;
  min-width: 0;
}

.sgs-equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sgs-equip-slot,
.sgs-zone,
.sgs-action-panel,
.sgs-deck-pile,
.sgs-discard-pile {
  border: 1px solid rgba(24, 32, 37, 0.16);
  background: rgba(255, 255, 255, 0.78);
}

.sticker-card.is-filtered-out {
  display: none;
}

.sticker-empty {
  margin-top: 12px;
}

.sgs-equip-slot {
  min-height: 54px;
  padding: 6px 8px;
  text-align: left;
}

.sgs-equip-slot span,
.sgs-equip-slot strong,
.sgs-zone-head strong,
.sgs-zone-head span {
  display: block;
}

.sgs-equip-slot span,
.sgs-zone-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.sgs-equip-slot strong {
  margin-top: 3px;
  color: #182025;
  font-size: 13px;
  font-weight: 900;
}

.sgs-equip-slot.is-selectable,
.sgs-zone-target,
.sgs-play-card.is-playable .sgs-card-main {
  cursor: pointer;
  border-color: rgba(36, 111, 85, 0.62);
  box-shadow: 0 0 0 2px rgba(36, 111, 85, 0.12);
}

.sgs-zone {
  min-width: 0;
  padding: 8px;
}

.sgs-zone-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.sgs-zone-cards {
  display: flex;
  gap: 6px;
  min-height: 68px;
  margin-top: 7px;
  overflow-x: auto;
}

.sgs-zone-cards em,
.sgs-hand em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.sgs-tiny-card {
  flex: 0 0 48px;
  margin: 0;
}

.sgs-tiny-card img {
  display: block;
  width: 48px;
  height: 64px;
  object-fit: cover;
  border: 1px solid rgba(24, 32, 37, 0.14);
}

.sgs-tiny-card figcaption {
  overflow: hidden;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sgs-zone-target {
  flex: 0 0 auto;
  min-height: 38px;
  align-self: center;
  background: rgba(255, 255, 255, 0.9);
  font-weight: 900;
}

.sgs-center {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 118px;
  gap: 12px;
  align-items: stretch;
  width: min(760px, calc(100vw - 160px));
  justify-self: center;
}

.sgs-deck-pile,
.sgs-discard-pile {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 10px;
}

.sgs-pile-card {
  width: 62px;
  height: 86px;
  border: 1px solid rgba(24, 32, 37, 0.18);
  background-size: cover;
  background-position: center;
  box-shadow: 5px 5px 0 rgba(24, 32, 37, 0.14);
}

.sgs-deck-pile strong,
.sgs-discard-pile strong {
  font-size: 24px;
}

.sgs-deck-pile span,
.sgs-discard-pile span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.sgs-action-panel {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 142px;
  padding: 16px;
}

.sgs-action-panel p {
  font-size: 18px;
  line-height: 1.5;
  font-weight: 900;
}

.sgs-action-buttons button,
.sgs-pending-cards button,
.sgs-discard-confirm button,
.sgs-start-card button {
  min-height: 38px;
  border: 1px solid rgba(24, 32, 37, 0.2);
  background: #24323d;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.sgs-action-buttons button.tone-primary {
  background: #2f7c64;
}

.sgs-action-buttons button.tone-danger,
.sgs-discard-confirm button:first-of-type {
  background: #b64d3f;
}

.sgs-action-buttons button:disabled,
.sgs-pending-cards button:disabled,
.sgs-discard-confirm button:disabled,
.sgs-card-main:disabled,
.sgs-equip-slot:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.sgs-pending-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sgs-pending-cards button {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 180px;
  padding: 6px;
  text-align: left;
}

.sgs-pending-cards img {
  width: 54px;
  height: 74px;
  object-fit: cover;
}

.sgs-hand {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  min-height: 154px;
  overflow-x: auto;
  padding: 10px 2px 4px;
}

.sgs-play-card {
  position: relative;
  flex: 0 0 90px;
}

.sgs-card-main {
  position: relative;
  width: 90px;
  height: 128px;
  padding: 0;
  border: 1px solid rgba(24, 32, 37, 0.18);
  background: #f9f6ec;
  overflow: hidden;
}

.sgs-card-main img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sgs-card-main span {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  min-height: 20px;
  padding: 2px 4px;
  background: rgba(255, 255, 255, 0.9);
  color: #101417;
  font-size: 12px;
  font-weight: 1000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sgs-play-card.is-selected .sgs-card-main {
  outline: 4px solid rgba(196, 76, 52, 0.7);
  outline-offset: 2px;
}

.sgs-card-skill {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: -4px;
  min-height: 28px;
  border: 1px solid rgba(24, 32, 37, 0.2);
  background: rgba(47, 124, 100, 0.95);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.sgs-discard-confirm {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(24, 32, 37, 0.16);
  background: rgba(255, 255, 255, 0.78);
}

.sgs-discard-confirm span {
  margin-right: auto;
  font-weight: 900;
}

.sgs-start-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 16px;
  align-items: center;
  width: 100%;
}

.sgs-start-card img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.8);
}

.sgs-side-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 16px;
}

.sgs-drawer {
  position: absolute;
  z-index: 12;
  left: 86px;
  top: 76px;
  bottom: 16px;
  width: min(520px, calc(100vw - 118px));
  padding: 14px;
  border: 1px solid rgba(226, 208, 162, 0.55);
  background: rgba(250, 248, 242, 0.94);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
  overflow: auto;
}

.sgs-drawer header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sgs-drawer h3 {
  margin: 0;
}

.sgs-drawer header button {
  min-height: 32px;
  border: 1px solid rgba(24, 32, 37, 0.18);
  background: #24323d;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.sgs-panel {
  padding: 16px;
}

.sgs-event-log {
  display: grid;
  gap: 7px;
  max-height: 320px;
  overflow: auto;
}

.sgs-event-log p {
  margin: 0;
  padding: 8px 10px;
  border-left: 4px solid rgba(24, 32, 37, 0.22);
  background: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
  font-weight: 800;
}

.sgs-event-log p.tone-danger {
  border-left-color: #b64d3f;
}

.sgs-event-log p.tone-good {
  border-left-color: #2f7c64;
}

.sgs-help-list {
  display: grid;
  gap: 8px;
}

.sgs-help-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-weight: 800;
}

.sgs-role-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sgs-role-info {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
  border: 1px solid rgba(24, 32, 37, 0.14);
  background: rgba(255, 255, 255, 0.72);
}

.sgs-role-info img {
  width: 100%;
  aspect-ratio: 0.72;
  object-fit: cover;
}

.sgs-role-info h4 {
  font-size: 16px;
}

.sgs-role-info p,
.sgs-role-info li {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
  font-weight: 750;
}

.sgs-role-info ul {
  margin: 6px 0 0;
  padding-left: 16px;
}

.sgs-card-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 480px;
  overflow: auto;
}

.sgs-catalog-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 8px;
  padding: 7px;
  border: 1px solid rgba(24, 32, 37, 0.14);
  background: rgba(255, 255, 255, 0.72);
}

.sgs-catalog-card img {
  width: 50px;
  height: 68px;
  object-fit: cover;
}

.sgs-catalog-card strong,
.sgs-catalog-card span {
  display: block;
}

.sgs-catalog-card strong {
  font-size: 14px;
}

.sgs-catalog-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sgs-page {
  position: fixed;
  z-index: 50;
  inset: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

.sgs-table {
  position: relative;
  display: block;
  width: 100vw;
  height: 100vh;
  min-height: 620px;
  padding: 0;
  border: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(231, 216, 178, 0.52), rgba(73, 63, 52, 0.4) 38%, rgba(28, 25, 23, 0.88) 100%),
    url("/api/sgs/asset/basic/bg.png");
  background-position: center;
  background-size: cover;
  box-shadow: none;
  overflow: hidden;
}

.sgs-table-aura {
  position: absolute;
  inset: 66px 128px 118px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(244, 231, 190, 0.22), rgba(244, 231, 190, 0.08) 36%, transparent 68%),
    repeating-radial-gradient(circle, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 22px);
  pointer-events: none;
}

.sgs-table-head {
  position: absolute;
  z-index: 7;
  top: 12px;
  right: 18px;
  width: min(420px, calc(100vw - 110px));
  margin: 0;
  padding: 8px 11px;
  border: 1px solid rgba(241, 222, 170, 0.38);
  background: rgba(34, 28, 24, 0.72);
  color: #f8efd3;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.sgs-table-head span,
.sgs-mode {
  color: #ead79b;
}

.sgs-table-head h3 {
  color: #fff7dd;
  font-size: 18px;
}

.sgs-table-stats span {
  min-height: 24px;
  border-color: rgba(241, 222, 170, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff7dd;
  font-size: 12px;
}

.sgs-left-rail {
  top: 86px;
  left: 18px;
  width: 56px;
}

.sgs-left-rail a,
.sgs-left-rail button {
  min-height: 42px;
  border-color: rgba(241, 222, 170, 0.42);
  background: rgba(38, 31, 27, 0.82);
  color: #f8efd3;
  box-shadow: inset 0 0 12px rgba(255, 232, 166, 0.08), 0 8px 16px rgba(0, 0, 0, 0.2);
}

.sgs-seat {
  position: absolute;
  z-index: 4;
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.sgs-seat.is-active {
  border: 0;
  box-shadow: none;
}

.sgs-seat-opponent {
  top: 72px;
  left: 50%;
  width: 500px;
  height: 168px;
  transform: translateX(-50%);
}

.sgs-seat-self {
  right: 24px;
  bottom: 18px;
  width: 216px;
  height: 288px;
}

.sgs-seat.is-active .sgs-character-card {
  border-color: rgba(83, 236, 103, 0.92);
  box-shadow: 0 0 0 3px rgba(83, 236, 103, 0.18), 0 0 24px rgba(83, 236, 103, 0.38);
}

.sgs-character-zone {
  position: relative;
  display: block;
  width: max-content;
}

.sgs-seat-opponent .sgs-character-zone {
  margin: 0 auto;
}

.sgs-character-card {
  --sgs-role-w: 116px;
  --sgs-role-h: 160px;
  position: relative;
  width: var(--sgs-role-w);
  height: var(--sgs-role-h);
  border: 2px solid rgba(244, 224, 168, 0.6);
  border-radius: 4px;
  background: rgba(20, 18, 16, 0.86);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.42);
  overflow: visible;
}

.sgs-seat-self .sgs-character-card {
  --sgs-role-w: 164px;
  --sgs-role-h: 236px;
}

.sgs-character-card > img {
  width: 100%;
  height: 100%;
  border-radius: 2px;
  object-fit: cover;
}

.sgs-card-frame {
  position: absolute;
  inset: -4px;
  border: 2px solid rgba(38, 31, 27, 0.72);
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px rgba(255, 245, 206, 0.18);
  pointer-events: none;
}

.sgs-character-card figcaption {
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4px 6px;
  border-top: 1px solid rgba(244, 224, 168, 0.38);
  background: linear-gradient(90deg, rgba(30, 24, 21, 0.94), rgba(72, 45, 41, 0.84));
}

.sgs-seat-self .sgs-character-card figcaption {
  padding: 7px 8px;
}

.sgs-character-card figcaption span {
  font-size: 10px;
}

.sgs-character-card figcaption strong {
  color: #fff2c4;
  font-size: 14px;
}

.sgs-seat-self .sgs-character-card figcaption strong {
  font-size: 17px;
}

.sgs-card-status {
  position: absolute;
  z-index: 3;
  top: 5px;
  left: 5px;
  display: flex;
  max-width: calc(100% - 10px);
  flex-wrap: wrap;
  gap: 3px;
}

.sgs-card-status span {
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  padding: 1px 5px;
  border: 1px solid rgba(255, 245, 206, 0.35);
  border-radius: 999px;
  background: rgba(26, 22, 20, 0.78);
  color: #fff4ce;
  font-size: 10px;
  font-weight: 1000;
  text-shadow: 0 1px 2px #000;
}

.sgs-card-status span.is-danger {
  border-color: rgba(245, 92, 72, 0.68);
  background: rgba(116, 37, 28, 0.84);
}

.sgs-character-card .sgs-hp {
  position: absolute;
  z-index: 4;
  left: 6px;
  bottom: 32px;
  width: 58px;
  min-height: 28px;
  border-color: rgba(255, 245, 206, 0.48);
  background: rgba(24, 20, 18, 0.66);
}

.sgs-seat-self .sgs-character-card .sgs-hp {
  width: 78px;
  min-height: 34px;
  bottom: 44px;
}

.sgs-character-card .sgs-hp i {
  background: linear-gradient(90deg, #40bd69, #e5c24b);
}

.sgs-character-card .sgs-hp div {
  padding: 3px 6px;
  color: #fff;
  text-shadow: 0 1px 3px #000;
}

.sgs-character-card .sgs-hp strong {
  font-size: 17px;
}

.sgs-seat-self .sgs-character-card .sgs-hp strong {
  font-size: 22px;
}

.sgs-character-card .sgs-equipment-grid {
  position: absolute;
  z-index: 4;
  top: 45px;
  right: 4px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  width: 48px;
}

.sgs-seat-self .sgs-character-card .sgs-equipment-grid {
  top: 58px;
  width: 58px;
  gap: 4px;
}

.sgs-equip-slot {
  position: relative;
  min-height: 26px;
  padding: 2px 3px;
  border: 1px solid rgba(255, 245, 206, 0.34);
  border-radius: 3px;
  background: rgba(28, 24, 21, 0.72);
  color: #fff4ce;
  overflow: hidden;
}

.sgs-seat-self .sgs-equip-slot {
  min-height: 32px;
}

.sgs-equip-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.72;
  object-fit: cover;
}

.sgs-equip-slot span,
.sgs-equip-slot strong {
  position: relative;
  z-index: 1;
  color: #fff4ce;
  font-size: 9px;
  line-height: 1.1;
  text-shadow: 0 1px 3px #000;
}

.sgs-equip-slot strong {
  margin-top: 1px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sgs-equip-slot.has-card {
  border-color: rgba(244, 224, 168, 0.72);
}

.sgs-equip-slot.is-selectable,
.sgs-zone-target,
.sgs-play-card.is-playable .sgs-card-main {
  cursor: pointer;
  border-color: rgba(94, 235, 126, 0.88);
  box-shadow: 0 0 0 2px rgba(94, 235, 126, 0.2), 0 0 18px rgba(94, 235, 126, 0.28);
}

.sgs-equip-slot.is-selected {
  border-color: rgba(255, 222, 96, 0.95);
  box-shadow: 0 0 0 3px rgba(255, 222, 96, 0.28), 0 0 20px rgba(255, 222, 96, 0.38);
}

.sgs-attached-zone {
  position: absolute;
  z-index: 5;
  left: 5px;
  right: 5px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 4px;
  align-items: center;
  min-height: 26px;
  padding: 2px 3px;
  border: 1px solid rgba(255, 245, 206, 0.3);
  border-radius: 4px;
  background: rgba(26, 22, 20, 0.72);
}

.sgs-attached-judgement {
  bottom: 63px;
}

.sgs-attached-skill {
  bottom: 92px;
}

.sgs-seat-self .sgs-attached-judgement {
  bottom: 84px;
}

.sgs-seat-self .sgs-attached-skill {
  bottom: 118px;
}

.sgs-attached-zone strong {
  color: #f8e6aa;
  font-size: 9px;
  font-weight: 1000;
  text-shadow: 0 1px 3px #000;
}

.sgs-attached-zone > div {
  display: flex;
  min-width: 0;
  gap: 2px;
  align-items: center;
}

.sgs-attached-card {
  position: relative;
  flex: 0 0 22px;
  width: 22px;
  height: 30px;
  margin: 0;
  border: 1px solid rgba(244, 224, 168, 0.5);
  border-radius: 2px;
  overflow: hidden;
}

.sgs-seat-self .sgs-attached-card {
  flex-basis: 26px;
  width: 26px;
  height: 36px;
}

.sgs-attached-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sgs-attached-card figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 1px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 7px;
  line-height: 1;
  text-align: center;
}

.sgs-zone-more,
.sgs-zone-target {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 245, 206, 0.9);
  color: #2a211b;
  font-size: 10px;
  font-weight: 1000;
}

.sgs-zone-target {
  border: 1px solid rgba(94, 235, 126, 0.88);
}

.sgs-opponent-hand {
  position: absolute;
  z-index: 4;
  top: 26px;
  left: calc(50% + 74px);
  display: flex;
  width: 245px;
  min-height: 92px;
  padding: 0;
  overflow: visible;
}

.sgs-self-hand {
  position: absolute;
  z-index: 6;
  left: 112px;
  right: 272px;
  bottom: 18px;
  display: flex;
  min-height: 164px;
  padding: 10px 0 0;
  overflow: visible;
}

.sgs-hand .sgs-play-card {
  flex: 0 0 var(--sgs-card-step, 70px);
  width: var(--sgs-card-width, 90px);
  transition: transform 140ms ease, filter 140ms ease;
}

.sgs-hand .sgs-play-card:last-child {
  flex-basis: var(--sgs-card-width, 90px);
}

.sgs-self-hand .sgs-play-card:hover,
.sgs-self-hand .sgs-play-card:focus-within {
  z-index: 9;
  transform: translateY(-12px);
}

.sgs-card-main {
  width: var(--sgs-card-width, 90px);
  height: var(--sgs-card-height, 128px);
  border: 2px solid rgba(44, 34, 26, 0.86);
  border-radius: 5px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.34);
}

.sgs-card-main span {
  left: 3px;
  right: 3px;
  bottom: 3px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 3px;
  background: rgba(255, 249, 231, 0.92);
  color: #1b1712;
  font-size: 11px;
}

.sgs-opponent-hand .sgs-card-main span {
  display: none;
}

.sgs-center {
  position: absolute;
  z-index: 5;
  top: 255px;
  left: 50%;
  display: grid;
  grid-template-columns: 96px minmax(220px, 520px) 96px;
  gap: 12px;
  width: min(760px, calc(100vw - 210px));
  transform: translateX(-50%);
}

.sgs-deck-pile,
.sgs-discard-pile,
.sgs-action-panel {
  border: 1px solid rgba(241, 222, 170, 0.38);
  border-radius: 4px;
  background: rgba(42, 34, 28, 0.72);
  color: #fff7dd;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

.sgs-deck-pile,
.sgs-discard-pile {
  min-height: 118px;
}

.sgs-deck-pile span,
.sgs-discard-pile span {
  color: #e7d4a1;
}

.sgs-action-panel {
  min-height: 118px;
  padding: 12px 14px;
}

.sgs-table.is-mode-respond .sgs-action-panel {
  border-color: rgba(218, 78, 58, 0.72);
  box-shadow: 0 0 0 3px rgba(218, 78, 58, 0.14), 0 16px 28px rgba(0, 0, 0, 0.24);
}

.sgs-table.is-mode-target_card .sgs-action-panel,
.sgs-table.is-mode-choose_target .sgs-action-panel,
.sgs-table.is-mode-select_hand .sgs-action-panel,
.sgs-table.is-mode-choose_pending_card .sgs-action-panel {
  border-color: rgba(94, 235, 126, 0.68);
  box-shadow: 0 0 0 3px rgba(94, 235, 126, 0.12), 0 16px 28px rgba(0, 0, 0, 0.24);
}

.sgs-table.is-mode-dying .sgs-action-panel {
  border-color: rgba(221, 173, 66, 0.78);
  animation: sgsDangerPulse 1100ms ease-in-out infinite;
}

.sgs-action-panel p {
  color: #fff8df;
  font-size: 16px;
  line-height: 1.42;
  text-shadow: 0 1px 3px #000;
}

.sgs-action-buttons button,
.sgs-pending-cards button,
.sgs-discard-confirm button,
.sgs-start-card button {
  border-color: rgba(244, 224, 168, 0.28);
  border-radius: 4px;
  background: rgba(47, 55, 58, 0.96);
}

.sgs-action-buttons button.tone-primary {
  background: #24764d;
}

.sgs-action-buttons button.tone-danger,
.sgs-discard-confirm button:first-of-type {
  background: #a84034;
}

.sgs-pending-cards {
  max-height: 118px;
  overflow: auto;
}

.sgs-pending-cards button {
  min-width: 150px;
  grid-template-columns: 44px minmax(0, 1fr);
  background: rgba(255, 248, 226, 0.92);
  color: #211a14;
}

.sgs-pending-cards img {
  width: 44px;
  height: 60px;
}

@keyframes sgsDangerPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(221, 173, 66, 0.1), 0 16px 28px rgba(0, 0, 0, 0.24);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(221, 173, 66, 0.18), 0 16px 28px rgba(0, 0, 0, 0.24);
  }
}

.sgs-discard-confirm {
  position: absolute;
  z-index: 10;
  left: 0;
  bottom: 164px;
  min-width: 270px;
  border-color: rgba(241, 222, 170, 0.38);
  background: rgba(42, 34, 28, 0.9);
  color: #fff7dd;
}

.sgs-card-skill {
  bottom: 2px;
  border-radius: 3px;
  background: rgba(36, 118, 77, 0.95);
}

.sgs-start-card {
  position: absolute;
  right: 24px;
  bottom: 26px;
  width: min(520px, calc(100vw - 150px));
  grid-template-columns: minmax(0, 1fr) 160px;
  padding: 14px;
  border: 1px solid rgba(241, 222, 170, 0.38);
  background: rgba(42, 34, 28, 0.78);
}

.sgs-drawer {
  left: 84px;
  top: 82px;
  bottom: 18px;
  background: rgba(250, 246, 232, 0.96);
}

@media (max-width: 900px) {
  .sgs-table {
    min-height: 600px;
  }

  .sgs-table-head {
    left: 84px;
    right: 10px;
    width: auto;
  }

  .sgs-seat-opponent {
    top: 76px;
    width: 390px;
  }

  .sgs-center {
    top: 245px;
    width: calc(100vw - 118px);
    grid-template-columns: 74px minmax(0, 1fr) 74px;
  }

  .sgs-seat-self {
    right: 12px;
    width: 168px;
  }

  .sgs-seat-self .sgs-character-card {
    --sgs-role-w: 132px;
    --sgs-role-h: 196px;
  }

  .sgs-self-hand {
    left: 78px;
    right: 182px;
  }
}

.ring-page {
  display: grid;
  gap: 16px;
}

.ring-hero,
.ring-panel,
.ring-mini-stat {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.ring-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 18px;
  min-height: 166px;
  padding: 18px 22px;
  border-top: 5px solid var(--green);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(230, 245, 232, 0.72)),
    url("/static/assets/shared/cv_random_bg_cropped.png");
  background-position: center;
  background-size: cover;
}

.ring-hero-copy {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
}

.ring-hero-copy span,
.ring-mini-stat span,
.ring-stat span,
.ring-effect-row span,
.ring-equipment span,
.ring-info-top span,
.ring-payload-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ring-hero-copy h3,
.ring-hero-copy p,
.ring-mini-stat strong,
.ring-stat strong,
.ring-equipment strong,
.ring-info-top h4,
.ring-info-top p,
.ring-log p {
  margin: 0;
}

.ring-hero-copy h3 {
  font-size: 30px;
  line-height: 1.12;
}

.ring-hero-copy p {
  max-width: 720px;
  color: #41534a;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.75;
}

.ring-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ring-mini-stat {
  min-height: 72px;
  padding: 12px;
}

.ring-mini-stat strong {
  display: block;
  margin-top: 6px;
  color: #284331;
  font-size: 24px;
  line-height: 1;
}

.ring-panel {
  min-width: 0;
  padding: 16px;
}

.ring-hp {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.ring-hp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #253b2a;
  font-size: 13px;
  font-weight: 900;
}

.ring-hp-bar {
  height: 18px;
  overflow: hidden;
  border: 1px solid rgba(35, 70, 42, 0.38);
  background: rgba(255, 255, 255, 0.86);
}

.ring-hp-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #58a45c, #f0c15e);
}

.ring-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ring-stat,
.ring-effect-row span {
  padding: 8px;
  border: 1px solid rgba(34, 77, 43, 0.14);
  background: rgba(255, 255, 255, 0.72);
}

.ring-stat strong {
  display: block;
  margin-top: 3px;
  color: #223e2a;
  font-size: 16px;
  font-weight: 900;
}

.ring-control-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.ring-control-row button {
  min-height: 40px;
  border: 1px solid rgba(34, 77, 43, 0.28);
  background: rgba(255, 255, 255, 0.94);
  color: #23442c;
  font-weight: 900;
  cursor: pointer;
}

.ring-control-row button:nth-child(2) {
  background: rgba(255, 255, 255, 0.94);
}

.ring-control-row button:last-child {
  grid-column: 1 / -1;
}

.ring-effect-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.ring-effect-row span {
  font-size: 11px;
}

.ring-player-panel {
  grid-area: player;
}

.ring-detail-panel {
  position: sticky;
  top: 12px;
}

.ring-info-card {
  display: grid;
  gap: 12px;
}

.ring-info-top {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.ring-info-top img {
  width: 82px;
  height: 104px;
  object-fit: contain;
  border: 1px solid rgba(24, 32, 37, 0.12);
  border-radius: 50%;
  background: #eef7f2;
}

.ring-info-top h4 {
  margin-top: 4px;
  color: #22392a;
  font-size: 20px;
  line-height: 1.15;
}

.ring-info-top p {
  margin-top: 8px;
  color: #53645a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.62;
}

.ring-payload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.ring-payload-grid div {
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(34, 77, 43, 0.12);
  background: rgba(255, 255, 255, 0.7);
}

.ring-payload-grid strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: #25392c;
  font-size: 13px;
  font-weight: 900;
}

.ring-grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 14px;
}

.ring-equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.ring-equipment {
  position: relative;
  display: grid;
  min-height: 82px;
  gap: 4px;
  padding: 9px 54px 9px 9px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.66);
  color: #28372e;
  text-align: left;
  cursor: pointer;
}

.ring-equipment.has-item {
  background: rgba(247, 255, 247, 0.82);
}

.ring-equipment strong {
  color: #22382a;
  font-size: 13px;
  line-height: 1.25;
}

.ring-equipment img {
  position: absolute;
  right: 7px;
  bottom: 6px;
  width: 42px;
  height: 54px;
  object-fit: contain;
}

.ring-log {
  display: grid;
  gap: 7px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.ring-log p {
  padding: 8px 9px;
  border: 1px solid rgba(24, 32, 37, 0.1);
  background: rgba(255, 255, 255, 0.68);
  color: #38483e;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.ring-command-grid.command-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ring-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 420px);
  grid-template-areas: "board side";
  gap: 14px;
  align-items: start;
}

.ring-board-panel {
  grid-area: board;
  position: relative;
  z-index: 2;
  isolation: isolate;
  overflow: visible;
}

.ring-board-panel::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("/static/assets/ring/decor/bread-background.png") center / cover no-repeat;
  content: "";
  opacity: 0.16;
  pointer-events: none;
}

.ring-board-panel > * {
  position: relative;
  z-index: 1;
}

.ring-side-stack {
  grid-area: side;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.ring-side-stack > .ring-panel {
  grid-area: auto;
  padding: 12px;
}

.ring-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.ring-board-head span,
.ring-board-chips span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ring-board-head h3 {
  margin: 3px 0 0;
  color: #17251e;
  font-size: 27px;
  line-height: 1.1;
}

.ring-board-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.ring-board-chips span {
  padding: 5px 7px;
  border: 1px solid rgba(34, 77, 43, 0.14);
  background: rgba(255, 255, 255, 0.86);
  color: #274232;
}

.ring-action-banner {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 40px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(34, 77, 43, 0.14);
  background: rgba(255, 255, 255, 0.82);
}

.ring-action-banner strong {
  color: #243a2c;
  font-size: 13px;
}

.ring-action-banner span {
  display: -webkit-box;
  overflow: hidden;
  color: #4a5b50;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ring-action-banner.is-attack {
  border-color: rgba(203, 78, 62, 0.32);
  background: rgba(255, 239, 235, 0.92);
}

.ring-action-banner.is-poison {
  border-color: rgba(85, 151, 76, 0.35);
  background: rgba(235, 250, 232, 0.92);
}

.ring-action-banner.is-explosion {
  border-color: rgba(226, 126, 34, 0.38);
  background: rgba(255, 242, 222, 0.94);
}

.ring-action-banner.is-heal {
  border-color: rgba(64, 149, 105, 0.34);
  background: rgba(232, 250, 240, 0.94);
}

.ring-action-banner.is-remote,
.ring-action-banner.is-reflect,
.ring-action-banner.is-wall {
  border-color: rgba(72, 112, 168, 0.34);
  background: rgba(232, 242, 255, 0.94);
}

.ring-action-banner.is-split,
.ring-action-banner.is-summon,
.ring-action-banner.is-scream,
.ring-action-banner.is-threat,
.ring-action-banner.is-curse {
  border-color: rgba(137, 93, 160, 0.34);
  background: rgba(249, 236, 255, 0.94);
}

.ring-action-banner.is-chest,
.ring-action-banner.is-attribute,
.ring-action-banner.is-treasure {
  border-color: rgba(190, 139, 44, 0.36);
  background: rgba(255, 248, 225, 0.94);
}

.ring-stage-wrap {
  display: grid;
  justify-items: center;
  padding-bottom: 0;
}

.ring-orbit {
  --ring-radius: 235px;
  position: relative;
  isolation: isolate;
  width: min(100%, 650px);
  min-width: 0;
  aspect-ratio: 1;
  margin: 2px auto 0;
  border: 1px solid rgba(34, 77, 43, 0.18);
  border-radius: 50%;
  background: linear-gradient(135deg, #f0cfe8 0%, #c8d7ee 54%, #d5ebdf 100%);
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(34, 77, 43, 0.12);
}

.ring-orbit.has-effect {
}

.ring-event-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.ring-event {
  --event-main: #cb4e3e;
  --event-soft: rgba(203, 78, 62, 0.22);
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
  filter: drop-shadow(0 10px 12px rgba(24, 44, 30, 0.25));
}

.ring-event i,
.ring-event em {
  grid-area: 1 / 1;
}

.ring-event i {
  width: 100%;
  height: 100%;
  border: 2px solid color-mix(in srgb, var(--event-main) 72%, white);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.94) 0 22%, var(--event-soft) 24% 100%);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.58), 0 0 18px var(--event-soft);
}

.ring-event em {
  position: relative;
  display: block;
  width: 42%;
  height: 42%;
  border-radius: 50%;
  background: var(--event-main);
  box-shadow: 0 0 12px var(--event-soft);
  content: "";
}

.ring-event-tone-treasure { --event-main: #be8b2c; --event-soft: rgba(190, 139, 44, 0.3); }
.ring-event-tone-attribute { --event-main: #be8b2c; --event-soft: rgba(190, 139, 44, 0.3); }
.ring-event-tone-heal { --event-main: #409569; --event-soft: rgba(64, 149, 105, 0.28); }
.ring-event-tone-curse { --event-main: #9757a8; --event-soft: rgba(151, 87, 168, 0.3); }
.ring-event-tone-chest-uncommon { --event-main: #46b873; --event-soft: rgba(70, 184, 115, 0.38); }
.ring-event-tone-chest-rare { --event-main: #3e8bd8; --event-soft: rgba(62, 139, 216, 0.38); }
.ring-event-tone-chest-epic { --event-main: #ddb246; --event-soft: rgba(221, 178, 70, 0.42); }
.ring-event-tone-attack { --event-main: #ef8b57; --event-soft: rgba(239, 139, 87, 0.34); }
.ring-event-tone-critical { --event-main: #f2c34b; --event-soft: rgba(242, 195, 75, 0.42); }
.ring-event-tone-enemy { --event-main: #d25252; --event-soft: rgba(210, 82, 82, 0.34); }
.ring-event-tone-pierce { --event-main: #9b5cc1; --event-soft: rgba(155, 92, 193, 0.34); }
.ring-event-tone-block { --event-main: #56a7d7; --event-soft: rgba(86, 167, 215, 0.35); }
.ring-event-tone-evade { --event-main: #9cb6bf; --event-soft: rgba(156, 182, 191, 0.3); }
.ring-event-tone-equip { --event-main: #48bcae; --event-soft: rgba(72, 188, 174, 0.36); }
.ring-event-tone-gear { --event-main: #4b9ed8; --event-soft: rgba(75, 158, 216, 0.34); }
.ring-event-tone-poison { --event-main: #55b86d; --event-soft: rgba(85, 184, 109, 0.34); }
.ring-event-tone-warp { --event-main: #a76ace; --event-soft: rgba(167, 106, 206, 0.34); }
.ring-event-tone-reflect { --event-main: #70a4e0; --event-soft: rgba(112, 164, 224, 0.36); }
.ring-event-tone-explosion { --event-main: #e85c3d; --event-soft: rgba(232, 92, 61, 0.4); }
.ring-event-tone-scream { --event-main: #c558b6; --event-soft: rgba(197, 88, 182, 0.34); }
.ring-event-tone-move { --event-main: #6a9aa4; --event-soft: rgba(106, 154, 164, 0.28); }

.ring-event b {
  position: absolute;
  left: var(--px);
  top: var(--py);
  z-index: 4;
  display: grid;
  place-items: center;
  width: 10px;
  height: 10px;
  opacity: 0;
  color: var(--event-main);
  filter: drop-shadow(0 0 8px var(--event-soft));
  transform: translate(-50%, -50%) scale(var(--ps));
}

.ring-event b::before {
  display: block;
  content: "";
}

.ring-event--interact {
  width: 72px;
  height: 72px;
  animation: ringInteractBurst 920ms ease-out var(--delay) 1 forwards;
}

.ring-event--interact i {
  border: 0;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.96) 0 20%, var(--event-soft) 21% 54%, transparent 55% 100%);
  box-shadow: 0 0 24px var(--event-soft);
}

.ring-event--interact em {
  width: 9px;
  height: 9px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: -18px -7px 0 -3px var(--event-main), 17px 8px 0 -3px var(--event-main), 2px 20px 0 -4px var(--event-main);
}

.ring-event--heal,
.ring-event--attribute,
.ring-event--curse {
  width: 148px;
  height: 178px;
  animation: ringPlayerAura 1280ms ease-out var(--delay) 1 forwards;
}

.ring-event--heal i,
.ring-event--attribute i,
.ring-event--curse i {
  align-self: end;
  width: 96px;
  height: 28px;
  margin-bottom: 18px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--event-soft) 0 38%, color-mix(in srgb, var(--event-main) 28%, transparent) 39% 64%, transparent 65% 100%);
  box-shadow: 0 0 26px var(--event-soft);
}

.ring-event--heal em,
.ring-event--attribute em,
.ring-event--curse em {
  display: none;
}

.ring-event--heal b,
.ring-event--attribute b {
  animation: ringParticleRise 1120ms ease-out calc(var(--delay) + var(--pd)) 1 forwards;
}

.ring-event--curse b {
  animation: ringParticleDrop 1120ms ease-in calc(var(--delay) + var(--pd)) 1 forwards;
}

.ring-event--heal b::before {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background:
    linear-gradient(90deg, transparent 0 35%, rgba(255, 255, 255, 0.94) 36% 64%, transparent 65% 100%),
    linear-gradient(0deg, transparent 0 35%, rgba(255, 255, 255, 0.94) 36% 64%, transparent 65% 100%),
    radial-gradient(circle, #61d28a 0 52%, transparent 53% 100%);
  box-shadow: 0 0 12px rgba(73, 190, 112, 0.72), 0 0 22px rgba(73, 190, 112, 0.28);
}

.ring-event--attribute b::before {
  width: 9px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(0deg, transparent 0 8%, rgba(255, 255, 255, 0.9) 24%, #ffd66b 58%, transparent 100%);
  clip-path: polygon(50% 0, 66% 34%, 100% 46%, 68% 58%, 50% 100%, 32% 58%, 0 46%, 34% 34%);
  box-shadow: 0 0 12px rgba(232, 178, 54, 0.74), 0 0 24px rgba(232, 178, 54, 0.28);
}

.ring-event--curse b::before {
  width: 7px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent 0 5%, #f0d8ff 6% 18%, #9f52b7 38% 88%, transparent 100%);
  box-shadow: 0 0 11px rgba(151, 87, 168, 0.74), 0 0 22px rgba(151, 87, 168, 0.28);
}

.ring-event--chest {
  width: 154px;
  height: 154px;
  animation: ringChestFlash 1380ms ease-out var(--delay) 1 forwards;
}

.ring-event--chest i {
  border: 0;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 1) 0 10%, rgba(255, 255, 255, 0.78) 11% 21%, var(--event-soft) 22% 43%, transparent 44% 100%),
    conic-gradient(from 15deg, transparent 0 7%, color-mix(in srgb, var(--event-main) 62%, white) 8% 12%, transparent 13% 24%, rgba(255, 255, 255, 0.95) 25% 29%, transparent 30% 48%, var(--event-main) 49% 53%, transparent 54% 100%);
  box-shadow: 0 0 38px var(--event-soft), 0 0 52px rgba(255, 255, 255, 0.5);
}

.ring-event--chest em {
  width: 58px;
  height: 58px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.82), transparent 62%);
  box-shadow: 0 0 24px var(--event-soft);
}

.ring-event--chest b {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.92), 0 0 18px var(--event-main);
  animation: ringChestParticle 1220ms ease-out calc(var(--delay) + var(--pd)) 1 forwards;
}

.ring-event--note {
  width: 62px;
  height: 62px;
  animation: ringNoteThrow 960ms cubic-bezier(0.18, 0.76, 0.22, 1) var(--delay) 1 forwards;
}

.ring-event--note i {
  width: 44px;
  height: 44px;
  border: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.88) 0 28%, var(--event-soft) 29% 58%, transparent 59% 100%);
  box-shadow: 0 0 20px var(--event-soft);
}

.ring-event--note em,
.ring-event--move em,
.ring-event--ready em,
.ring-event--wall em,
.ring-event--eat em,
.ring-event--split em,
.ring-event--death em,
.ring-event--equip-pop em {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: color-mix(in srgb, var(--event-main) 82%, white);
  color: #fff;
  font-size: 18px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 18px var(--event-soft);
}

.ring-event--note em::before,
.ring-event--move em::before,
.ring-event--ready em::before,
.ring-event--wall em::before,
.ring-event--eat em::before,
.ring-event--split em::before,
.ring-event--death em::before,
.ring-event--equip-pop em::before {
  content: attr(data-symbol);
}

.ring-event--note::after,
.ring-event--move::after,
.ring-event--ready::after,
.ring-event--wall::after,
.ring-event--eat::after,
.ring-event--split::after,
.ring-event--death::after,
.ring-event--equip-pop::after {
  grid-area: 1 / 1;
  z-index: 5;
  content: attr(data-symbol);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.24), 0 0 10px var(--event-main);
}

.ring-event--hit,
.ring-event--block-field,
.ring-event--smoke,
.ring-event--splash,
.ring-event--poison-cloud,
.ring-event--warp,
.ring-event--reflect,
.ring-event--explosion,
.ring-event--quake,
.ring-event--scream,
.ring-event--summon,
.ring-event--drop {
  width: 134px;
  height: 134px;
  animation: ringImpactBloom 940ms ease-out var(--delay) 1 forwards;
}

.ring-event--block-field {
  width: 160px;
  height: 140px;
  animation-duration: 1080ms;
}

.ring-event--move {
  width: 70px;
  height: 70px;
  animation: ringMoveToken 1360ms ease-in-out var(--delay) 1 forwards;
}

.ring-event--move i {
  width: 54px;
  height: 54px;
  border: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 24%, var(--event-soft) 25% 58%, transparent 59% 100%);
}

.ring-event--ready {
  width: 88px;
  height: 88px;
  animation: ringReadyPulse 1120ms ease-in-out var(--delay) 1 forwards;
}

.ring-event--ready i {
  width: 72px;
  height: 72px;
  border: 3px dashed color-mix(in srgb, var(--event-main) 70%, white);
  background: radial-gradient(circle, var(--event-soft) 0 48%, transparent 49% 100%);
  box-shadow: 0 0 26px var(--event-soft);
}

.ring-event--wall,
.ring-event--eat,
.ring-event--split,
.ring-event--death,
.ring-event--equip-pop {
  width: 88px;
  height: 88px;
  animation: ringIconPop 980ms ease-out var(--delay) 1 forwards;
}

.ring-event--wall i {
  width: 70px;
  height: 70px;
  border: 3px solid color-mix(in srgb, var(--event-main) 74%, white);
  border-radius: 8px;
  background: repeating-linear-gradient(90deg, var(--event-soft) 0 8px, rgba(255, 255, 255, 0.66) 8px 14px);
}

.ring-event--eat i,
.ring-event--split i,
.ring-event--death i,
.ring-event--equip-pop i {
  width: 74px;
  height: 74px;
  border: 0;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.82) 0 18%, var(--event-soft) 19% 58%, transparent 59% 100%),
    conic-gradient(from 0deg, transparent 0 12%, var(--event-main) 13% 18%, transparent 19% 36%, rgba(255, 255, 255, 0.8) 37% 42%, transparent 43% 100%);
}

.ring-event--equip-pop em {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.92) 0 18%, var(--event-main) 19% 56%, transparent 72%);
}

.ring-event--splash,
.ring-event--quake,
.ring-event--explosion,
.ring-event--scream {
  width: 188px;
  height: 188px;
  animation: ringSplashBloom 1120ms ease-out var(--delay) 1 forwards;
}

.ring-event--poison-cloud,
.ring-event--warp {
  width: 148px;
  height: 160px;
  animation-duration: 1160ms;
}

.ring-event--hit i,
.ring-event--smoke i,
.ring-event--splash i,
.ring-event--poison-cloud i,
.ring-event--warp i,
.ring-event--reflect i,
.ring-event--explosion i,
.ring-event--quake i,
.ring-event--scream i,
.ring-event--summon i,
.ring-event--drop i {
  border: 0;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.94) 0 8%, var(--event-soft) 9% 36%, transparent 37% 100%),
    conic-gradient(from 18deg, transparent 0 8%, color-mix(in srgb, var(--event-main) 72%, white) 9% 12%, transparent 13% 23%, rgba(255, 255, 255, 0.88) 24% 27%, transparent 28% 44%, var(--event-main) 45% 48%, transparent 49% 100%);
  box-shadow: 0 0 28px var(--event-soft), 0 0 42px color-mix(in srgb, var(--event-main) 24%, transparent);
}

.ring-event--block-field i {
  align-self: end;
  width: 118px;
  height: 104px;
  margin-bottom: 10px;
  border: 3px solid color-mix(in srgb, var(--event-main) 58%, white);
  border-bottom-color: transparent;
  border-radius: 999px 999px 28px 28px;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255, 255, 255, 0.62) 0 30%, transparent 31% 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--event-main) 22%, transparent), transparent 78%);
  box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.45), 0 0 34px var(--event-soft);
}

.ring-event--hit em,
.ring-event--block-field em,
.ring-event--smoke em,
.ring-event--splash em,
.ring-event--poison-cloud em,
.ring-event--warp em,
.ring-event--reflect em,
.ring-event--explosion em,
.ring-event--quake em,
.ring-event--scream em,
.ring-event--summon em,
.ring-event--drop em {
  width: 58px;
  height: 58px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.76), transparent 65%);
}

.ring-event--smoke i {
  background:
    radial-gradient(ellipse at 35% 45%, rgba(255, 255, 255, 0.7), transparent 42%),
    radial-gradient(ellipse at 70% 55%, var(--event-soft), transparent 46%);
  filter: blur(1.4px);
}

.ring-event--poison-cloud i {
  background:
    radial-gradient(circle at 35% 34%, rgba(255, 255, 255, 0.72) 0 7%, transparent 8% 100%),
    radial-gradient(circle at 66% 58%, var(--event-soft) 0 18%, transparent 19% 100%),
    radial-gradient(ellipse at 50% 80%, color-mix(in srgb, var(--event-main) 34%, transparent) 0 30%, transparent 31% 100%);
  filter: blur(0.8px);
}

.ring-event--warp i {
  border: 0;
  background:
    repeating-conic-gradient(from 12deg, transparent 0 8deg, color-mix(in srgb, var(--event-main) 42%, transparent) 9deg 13deg, transparent 14deg 24deg),
    radial-gradient(circle, rgba(255, 255, 255, 0.7) 0 15%, var(--event-soft) 16% 42%, transparent 43% 100%);
  box-shadow: 0 0 30px var(--event-soft);
}

.ring-event--explosion i {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.96) 0 8%, color-mix(in srgb, var(--event-main) 68%, #ffd76a) 9% 22%, var(--event-soft) 23% 46%, transparent 47% 100%),
    conic-gradient(from 12deg, transparent 0 5%, #fff2a8 6% 10%, transparent 11% 18%, var(--event-main) 19% 23%, transparent 24% 100%);
}

.ring-event--quake i {
  border-radius: 22px;
  background:
    repeating-linear-gradient(0deg, transparent 0 7px, color-mix(in srgb, var(--event-main) 34%, transparent) 7px 10px),
    radial-gradient(circle, rgba(255, 255, 255, 0.82), transparent 65%);
}

.ring-event--scream i {
  background:
    repeating-radial-gradient(circle, transparent 0 12px, var(--event-soft) 13px 17px),
    radial-gradient(circle, rgba(255, 255, 255, 0.82), transparent 66%);
}

.ring-event--hit b,
.ring-event--block-field b,
.ring-event--splash b,
.ring-event--warp b,
.ring-event--explosion b,
.ring-event--quake b,
.ring-event--scream b,
.ring-event--summon b,
.ring-event--drop b {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.88), 0 0 18px var(--event-main);
  animation: ringCombatParticle 980ms ease-out calc(var(--delay) + var(--pd)) 1 forwards;
}

.ring-event--poison-cloud b {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.78), var(--event-main) 62%, transparent 100%);
  filter: blur(0.4px);
  animation: ringMistParticle 1080ms ease-out calc(var(--delay) + var(--pd)) 1 forwards;
}

.ring-stage-transition {
  position: absolute;
  inset: 0;
  z-index: 12;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(12, 18, 20, 0.45) 0 54%, rgba(12, 18, 20, 0.28) 55% 78%, transparent 79% 100%);
  pointer-events: none;
  animation: ringStageExitTransition 1500ms ease-in-out 1 forwards;
}

.ring-center-card {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: block;
  width: 250px;
  height: 250px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
  transform: translate(-50%, -50%);
}

.ring-center-card::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.44);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38), 0 10px 22px rgba(24, 44, 30, 0.08);
  content: "";
  pointer-events: none;
}

.ring-center-card strong {
  position: absolute;
  left: 50%;
  top: calc(50% + 48px);
  z-index: 2;
  width: 210px;
  margin: 0;
  color: #17251e;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.22;
  text-shadow: 0 2px 5px rgba(255, 255, 255, 0.92);
  transform: translateX(-50%);
  overflow-wrap: anywhere;
}

.ring-center-card span {
  position: absolute;
  left: 50%;
  top: calc(50% + 88px);
  z-index: 2;
  width: 210px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.18;
  text-shadow: 0 2px 5px rgba(255, 255, 255, 0.92);
  transform: translateX(-50%);
}

.ring-player-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  display: grid;
  justify-items: center;
  width: 128px;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(var(--angle)) translate(calc(var(--ring-radius) + 116px)) rotate(var(--back-angle));
}

.ring-player-marker img {
  width: 104px;
  height: 132px;
  object-fit: contain;
  filter: drop-shadow(0 10px 12px rgba(23, 37, 30, 0.34)) drop-shadow(0 0 8px rgba(255, 255, 255, 0.9));
}

.ring-player-marker span {
  margin-top: -5px;
  padding: 3px 7px;
  border: 1px solid rgba(24, 32, 37, 0.16);
  background: rgba(255, 255, 255, 0.94);
  color: #17251e;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 12px rgba(24, 44, 30, 0.16);
}

.ring-node {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  justify-items: center;
  width: 94px;
  height: 104px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #17251e;
  cursor: pointer;
  transform: translate(-50%, -50%) rotate(var(--angle)) translate(var(--ring-radius)) rotate(var(--back-angle));
  transition: transform 160ms ease, filter 160ms ease;
}

.ring-node:hover,
.ring-node.is-active {
  z-index: 5;
  filter: drop-shadow(0 10px 18px rgba(22, 41, 27, 0.3));
}

.ring-node.is-active {
  transform: translate(-50%, -50%) rotate(var(--angle)) translate(var(--ring-radius)) rotate(var(--back-angle)) scale(1.12);
}

.ring-node-art,
.ring-current-art {
  --ring-art-bg: #eef7f2;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 72px;
  height: 72px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: var(--ring-art-bg);
  box-shadow: 0 7px 15px rgba(24, 44, 30, 0.18);
}

.ring-node-art::before,
.ring-node-art::after {
  position: absolute;
  inset: 6px;
  z-index: 1;
  border-radius: 50%;
  content: "";
  opacity: 0;
  pointer-events: none;
}

.ring-current-art {
  position: absolute;
  left: 50%;
  top: calc(50% - 22px);
  width: 112px;
  height: 112px;
  aspect-ratio: 1;
  z-index: 1;
  border-width: 3px;
  border-radius: 50%;
  clip-path: circle(50%);
  transform: translate(-50%, -50%);
}

.ring-node-art .ring-card-frame,
.ring-current-art .ring-card-frame {
  display: none !important;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 126%;
  height: 126%;
  object-fit: cover;
  transform: translate(-50%, -50%);
}

.ring-node-art .ring-card-image,
.ring-current-art .ring-card-image {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 78%;
  height: 78%;
  background: transparent !important;
  object-fit: contain;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-node-art.is-enemy-hp,
.ring-current-art.is-enemy-hp {
  border-color: transparent !important;
  box-shadow: 0 7px 15px rgba(24, 44, 30, 0.18), 0 0 0 1px rgba(24, 44, 30, 0.08);
}

.ring-hp-ring {
  position: absolute;
  inset: -3px;
  z-index: 6;
  display: block;
  overflow: visible;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  pointer-events: none;
  transform: rotate(-90deg);
}

.ring-hp-track,
.ring-hp-value {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.ring-hp-track {
  stroke: transparent;
  stroke-width: 5;
}

.ring-hp-value {
  stroke: var(--ring-hp-color);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: var(--ring-hp-ratio) 100;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--ring-hp-color) 52%, transparent));
}

.ring-node-art.is-hp-low .ring-hp-ring,
.ring-current-art.is-hp-low .ring-hp-ring {
  filter: drop-shadow(0 0 7px rgba(217, 85, 69, 0.58));
}

.ring-node-art[class*="type-slot-"] .ring-card-image,
.ring-current-art[class*="type-slot-"] .ring-card-image,
.ring-catalog-art[class*="type-slot-"] .ring-card-image {
  mix-blend-mode: normal;
}

.ring-node-name {
  display: block;
  width: 96px;
  max-height: 30px;
  margin-top: 4px;
  padding: 2px 5px;
  overflow: hidden;
  border: 1px solid rgba(24, 32, 37, 0.13);
  background: rgba(255, 255, 255, 0.93);
  color: #17251e;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.22;
  text-align: center;
}

.ring-node-badge {
  position: absolute;
  left: 9px;
  top: -2px;
  z-index: 6;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 4px;
  border: 1px solid rgba(24, 32, 37, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #203529;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(24, 44, 30, 0.14);
}

.ring-node.is-active .ring-node-art {
  border-color: #f0c15e;
  box-shadow: 0 0 0 4px rgba(240, 193, 94, 0.28), 0 10px 20px rgba(24, 44, 30, 0.24);
}

.ring-node.type-enemy .ring-node-art,
.ring-node.type-chase .ring-node-art,
.ring-node.type-eat .ring-node-art,
.ring-node-art.type-enemy,
.ring-node-art.type-chase,
.ring-node-art.type-eat,
.ring-current-art.type-enemy,
.ring-current-art.type-chase,
.ring-current-art.type-eat,
.ring-catalog-art.type-enemy,
.ring-catalog-art.type-chase,
.ring-catalog-art.type-eat {
  --ring-art-bg: #ffd7cd;
  border-color: rgba(203, 78, 62, 0.8);
  background: var(--ring-art-bg);
}

.ring-node.type-chase .ring-node-art::after {
  inset: 10px 5px;
  border-top: 3px solid rgba(203, 78, 62, 0.72);
  border-bottom: 3px solid rgba(203, 78, 62, 0.36);
  opacity: 1;
}

.ring-node.type-eat .ring-node-art::after {
  inset: 12px;
  border: 4px solid rgba(122, 46, 42, 0.48);
  border-left-color: transparent;
  opacity: 1;
}

.ring-node.type-explosion .ring-node-art,
.ring-node.type-explosion-move .ring-node-art,
.ring-node-art.type-explosion,
.ring-node-art.type-explosion-move,
.ring-current-art.type-explosion,
.ring-current-art.type-explosion-move,
.ring-catalog-art.type-explosion,
.ring-catalog-art.type-explosion-move {
  --ring-art-bg: #ffc572;
  border-color: rgba(226, 126, 34, 0.9);
  background: var(--ring-art-bg);
}

.ring-node.type-explosion .ring-node-art::after,
.ring-node.type-explosion-move .ring-node-art::after {
  inset: 4px;
  border: 2px dashed rgba(226, 126, 34, 0.7);
  opacity: 1;
}

.ring-node.type-poison .ring-node-art,
.ring-node.type-poison-move .ring-node-art,
.ring-node-art.type-poison,
.ring-node-art.type-poison-move,
.ring-current-art.type-poison,
.ring-current-art.type-poison-move,
.ring-catalog-art.type-poison,
.ring-catalog-art.type-poison-move {
  --ring-art-bg: #b7e8a9;
  border-color: rgba(73, 155, 77, 0.86);
  background: var(--ring-art-bg);
}

.ring-node.type-poison .ring-node-art::after,
.ring-node.type-poison-move .ring-node-art::after {
  inset: 12px;
  background:
    radial-gradient(circle at 30% 35%, rgba(73, 155, 77, 0.66) 0 4px, transparent 5px),
    radial-gradient(circle at 65% 58%, rgba(73, 155, 77, 0.5) 0 5px, transparent 6px);
  opacity: 1;
}

.ring-node.type-reflect .ring-node-art,
.ring-node.type-remote .ring-node-art,
.ring-node.type-wall .ring-node-art,
.ring-node.type-wall-move .ring-node-art,
.ring-node-art.type-reflect,
.ring-node-art.type-remote,
.ring-node-art.type-wall,
.ring-node-art.type-wall-move,
.ring-current-art.type-reflect,
.ring-current-art.type-remote,
.ring-current-art.type-wall,
.ring-current-art.type-wall-move,
.ring-catalog-art.type-reflect,
.ring-catalog-art.type-remote,
.ring-catalog-art.type-wall,
.ring-catalog-art.type-wall-move {
  --ring-art-bg: #b5d2f4;
  border-color: rgba(72, 112, 168, 0.82);
  background: var(--ring-art-bg);
}

.ring-node.type-remote .ring-node-art::after {
  inset: 9px;
  border: 2px solid rgba(72, 112, 168, 0.6);
  box-shadow: inset 0 0 0 9px rgba(72, 112, 168, 0.08);
  opacity: 1;
}

.ring-node.type-reflect .ring-node-art::after {
  inset: 7px;
  border: 3px double rgba(72, 112, 168, 0.58);
  opacity: 1;
}

.ring-node.type-wall .ring-node-art::after,
.ring-node.type-wall-move .ring-node-art::after {
  inset: 9px;
  background: repeating-linear-gradient(90deg, rgba(72, 112, 168, 0.46) 0 4px, transparent 4px 8px);
  opacity: 1;
}

.ring-node.type-scream .ring-node-art,
.ring-node.type-summon .ring-node-art,
.ring-node.type-split .ring-node-art,
.ring-node.type-spin .ring-node-art,
.ring-node.type-threat .ring-node-art,
.ring-node-art.type-scream,
.ring-node-art.type-summon,
.ring-node-art.type-split,
.ring-node-art.type-spin,
.ring-node-art.type-threat,
.ring-current-art.type-scream,
.ring-current-art.type-summon,
.ring-current-art.type-split,
.ring-current-art.type-spin,
.ring-current-art.type-threat,
.ring-catalog-art.type-scream,
.ring-catalog-art.type-summon,
.ring-catalog-art.type-split,
.ring-catalog-art.type-spin,
.ring-catalog-art.type-threat {
  --ring-art-bg: #dcadec;
  border-color: rgba(137, 93, 160, 0.84);
  background: var(--ring-art-bg);
}

.ring-node.type-scream .ring-node-art::after {
  inset: 5px;
  border: 2px solid rgba(137, 93, 160, 0.5);
  opacity: 1;
}

.ring-node.type-summon .ring-node-art::after {
  inset: 6px;
  border: 2px dotted rgba(137, 93, 160, 0.65);
  opacity: 1;
}

.ring-node.type-split .ring-node-art::after {
  inset: 9px;
  box-shadow: -9px 0 0 rgba(137, 93, 160, 0.16), 9px 0 0 rgba(137, 93, 160, 0.16);
  opacity: 1;
}

.ring-node.type-spin .ring-node-art::after {
  inset: 6px;
  border: 2px solid rgba(137, 93, 160, 0.5);
  border-left-color: transparent;
  opacity: 1;
}

.ring-node.type-threat .ring-node-art::after {
  inset: 13px;
  background: rgba(137, 93, 160, 0.22);
  clip-path: polygon(50% 0, 100% 52%, 50% 100%, 0 52%);
  opacity: 1;
}

.ring-node.type-treasure .ring-node-art,
.ring-node.type-chest-normal .ring-node-art,
.ring-node.type-chest-uncommon .ring-node-art,
.ring-node.type-chest-rare .ring-node-art,
.ring-node.type-chest-epic .ring-node-art,
.ring-node.type-attribute-small .ring-node-art,
.ring-node.type-attribute-large .ring-node-art,
.ring-node.type-attribute-shift .ring-node-art,
.ring-node-art.type-treasure,
.ring-node-art.type-chest-normal,
.ring-node-art.type-chest-uncommon,
.ring-node-art.type-chest-rare,
.ring-node-art.type-chest-epic,
.ring-node-art.type-attribute-small,
.ring-node-art.type-attribute-large,
.ring-node-art.type-attribute-shift,
.ring-current-art.type-treasure,
.ring-current-art.type-chest-normal,
.ring-current-art.type-chest-uncommon,
.ring-current-art.type-chest-rare,
.ring-current-art.type-chest-epic,
.ring-current-art.type-attribute-small,
.ring-current-art.type-attribute-large,
.ring-current-art.type-attribute-shift,
.ring-catalog-art.type-treasure,
.ring-catalog-art.type-chest-normal,
.ring-catalog-art.type-chest-uncommon,
.ring-catalog-art.type-chest-rare,
.ring-catalog-art.type-chest-epic,
.ring-catalog-art.type-attribute-small,
.ring-catalog-art.type-attribute-large,
.ring-catalog-art.type-attribute-shift {
  --ring-art-bg: #f3dd9a;
  border-color: rgba(190, 139, 44, 0.84);
  background: var(--ring-art-bg);
}

.ring-node.type-treasure .ring-node-art::after,
.ring-node.type-chest-normal .ring-node-art::after,
.ring-node.type-chest-uncommon .ring-node-art::after,
.ring-node.type-chest-rare .ring-node-art::after,
.ring-node.type-chest-epic .ring-node-art::after {
  inset: 7px;
  border: 2px solid rgba(190, 139, 44, 0.54);
  opacity: 1;
}

.ring-node.type-potion-heal .ring-node-art,
.ring-node-art.type-potion-heal,
.ring-current-art.type-potion-heal,
.ring-catalog-art.type-potion-heal {
  --ring-art-bg: #b4e8cb;
  border-color: rgba(64, 149, 105, 0.86);
  background: var(--ring-art-bg);
}

.ring-node.type-potion-heal .ring-node-art::after,
.ring-node.type-attribute-small .ring-node-art::after,
.ring-node.type-attribute-large .ring-node-art::after,
.ring-node.type-attribute-shift .ring-node-art::after {
  inset: 10px;
  border: 2px solid rgba(64, 149, 105, 0.5);
  opacity: 1;
}

.ring-node.type-potion-curse .ring-node-art,
.ring-node.type-curse-small .ring-node-art,
.ring-node.type-curse-large .ring-node-art,
.ring-node.type-curse-shift .ring-node-art,
.ring-node-art.type-potion-curse,
.ring-node-art.type-curse-small,
.ring-node-art.type-curse-large,
.ring-node-art.type-curse-shift,
.ring-current-art.type-potion-curse,
.ring-current-art.type-curse-small,
.ring-current-art.type-curse-large,
.ring-current-art.type-curse-shift,
.ring-catalog-art.type-potion-curse,
.ring-catalog-art.type-curse-small,
.ring-catalog-art.type-curse-large,
.ring-catalog-art.type-curse-shift {
  --ring-art-bg: #e0bbec;
  border-color: rgba(151, 87, 168, 0.86);
  background: var(--ring-art-bg);
}

.ring-node.type-potion-curse .ring-node-art::after,
.ring-node.type-curse-small .ring-node-art::after,
.ring-node.type-curse-large .ring-node-art::after,
.ring-node.type-curse-shift .ring-node-art::after {
  inset: 12px;
  background: rgba(151, 87, 168, 0.2);
  clip-path: polygon(50% 0, 62% 38%, 100% 38%, 69% 59%, 82% 100%, 50% 74%, 18% 100%, 31% 59%, 0 38%, 38% 38%);
  opacity: 1;
}

.ring-node.type-slot-guitar .ring-node-art,
.ring-node.type-slot-bass .ring-node-art,
.ring-node.type-slot-drum .ring-node-art,
.ring-node.type-slot-keyboard .ring-node-art,
.ring-node.type-slot-mic .ring-node-art,
.ring-node.type-slot-poster .ring-node-art,
.ring-node.type-slot-flyer .ring-node-art,
.ring-node.type-slot-menu .ring-node-art,
.ring-node.type-slot-magazine .ring-node-art,
.ring-node.type-slot-decoration .ring-node-art,
.ring-node.type-slot-personal .ring-node-art,
.ring-node-art[class*="type-slot-"],
.ring-current-art[class*="type-slot-"],
.ring-catalog-art[class*="type-slot-"] {
  --ring-art-bg: #b2e2dd;
  border-color: rgba(61, 131, 124, 0.82);
  background: var(--ring-art-bg);
}

.ring-node.type-slot-guitar .ring-node-art::after,
.ring-node.type-slot-bass .ring-node-art::after,
.ring-node.type-slot-drum .ring-node-art::after,
.ring-node.type-slot-keyboard .ring-node-art::after,
.ring-node.type-slot-mic .ring-node-art::after,
.ring-node.type-slot-poster .ring-node-art::after,
.ring-node.type-slot-flyer .ring-node-art::after,
.ring-node.type-slot-menu .ring-node-art::after,
.ring-node.type-slot-magazine .ring-node-art::after,
.ring-node.type-slot-decoration .ring-node-art::after,
.ring-node.type-slot-personal .ring-node-art::after {
  inset: 8px;
  border: 2px solid rgba(61, 131, 124, 0.5);
  opacity: 1;
}

.ring-node.type-exit .ring-node-art,
.ring-node-art.type-exit,
.ring-current-art.type-exit,
.ring-catalog-art.type-exit {
  --ring-art-bg: #96d9ab;
  border-color: rgba(71, 143, 94, 0.9);
  background: var(--ring-art-bg);
}

.ring-node.type-exit .ring-node-art::after {
  inset: 6px;
  border: 2px solid rgba(71, 143, 94, 0.52);
  opacity: 1;
}

.ring-node.type-desert .ring-node-art,
.ring-node-art.type-desert,
.ring-current-art.type-desert,
.ring-catalog-art.type-desert {
  --ring-art-bg: #e0e6e2;
  border-color: rgba(139, 153, 145, 0.65);
  background: var(--ring-art-bg);
}

.ring-node .ring-node-art::before,
.ring-node .ring-node-art::after {
  display: none;
  animation: none;
}

.ring-node .ring-node-art {
  animation: none;
}

.ring-current-art,
.ring-catalog-art {
  animation: none;
}

.ring-node.is-interacting {
  z-index: 12;
  pointer-events: none;
  animation: ringInteractNode 1120ms cubic-bezier(0.16, 0.86, 0.24, 1) 1 both;
}

.ring-node.is-interacting .ring-node-art {
  animation: ringInteractArt 1120ms cubic-bezier(0.16, 0.86, 0.24, 1) 1 both !important;
}

@keyframes ringInteractBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  18% {
    opacity: 0.92;
    transform: translate(-50%, -50%) scale(0.95);
  }
  72% {
    opacity: 0.62;
    transform: translate(-50%, -50%) scale(1.42);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.82);
  }
}

@keyframes ringPlayerAura {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
  }
  16% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  70% {
    opacity: 0.84;
    transform: translate(-50%, -50%) scale(1.02);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.06);
  }
}

@keyframes ringParticleRise {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translateX(0) translateY(0) scale(var(--ps));
  }
  18% {
    opacity: 0.98;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translateX(var(--dx)) translateY(var(--up)) scale(var(--ps));
  }
}

@keyframes ringParticleDrop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translateX(0) translateY(var(--drop-start)) scale(var(--ps));
  }
  18% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translateX(var(--dx)) translateY(var(--down)) scale(var(--ps));
  }
}

@keyframes ringChestFlash {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.52);
    filter: blur(0) brightness(1);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.9);
    filter: blur(0) brightness(1.15);
  }
  56% {
    opacity: 0.98;
    transform: translate(-50%, -50%) scale(1.24);
    filter: blur(0.2px) brightness(1.45);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.9);
    filter: blur(3px) brightness(1.8);
  }
}

@keyframes ringChestParticle {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, 0) scale(var(--ps));
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(var(--dx), var(--chest-up)) scale(var(--ps));
  }
}

@keyframes ringNoteThrow {
  0% {
    left: var(--x);
    top: var(--y);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55) rotate(-18deg);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(8deg);
  }
  76% {
    left: var(--tx);
    top: var(--ty);
    opacity: 0.96;
    transform: translate(-50%, -50%) scale(1.08) rotate(32deg);
  }
  100% {
    left: var(--tx);
    top: var(--ty);
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.6) rotate(58deg);
  }
}

@keyframes ringMoveToken {
  0% {
    left: var(--x);
    top: var(--y);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
  }
  18% {
    opacity: 1;
  }
  72% {
    left: var(--tx);
    top: var(--ty);
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1.05);
  }
  100% {
    left: var(--tx);
    top: var(--ty);
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.25);
  }
}

@keyframes ringReadyPulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
  }
  18%, 62% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  42% {
    opacity: 0.76;
    transform: translate(-50%, -50%) scale(1.22);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.42);
  }
}

@keyframes ringIconPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.42) rotate(-8deg);
  }
  24% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.06) rotate(4deg);
  }
  70% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1.14) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.48) rotate(8deg);
  }
}

@keyframes ringImpactBloom {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35);
    filter: blur(0) brightness(1);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.82);
    filter: blur(0) brightness(1.16);
  }
  58% {
    opacity: 0.86;
    transform: translate(-50%, -50%) scale(1.14);
    filter: blur(0.4px) brightness(1.28);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.68);
    filter: blur(3px) brightness(1.35);
  }
}

@keyframes ringSplashBloom {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.28);
    filter: blur(0) brightness(1);
  }
  20% {
    opacity: 0.96;
    transform: translate(-50%, -50%) scale(0.7);
    filter: blur(0) brightness(1.18);
  }
  62% {
    opacity: 0.78;
    transform: translate(-50%, -50%) scale(1.26);
    filter: blur(0.7px) brightness(1.28);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.88);
    filter: blur(4px) brightness(1.42);
  }
}

@keyframes ringCombatParticle {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, 0) scale(calc(var(--ps) * 0.75));
  }
  22% {
    opacity: 0.96;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(var(--dx), var(--up)) scale(var(--ps));
  }
}

@keyframes ringMistParticle {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, 0) scale(calc(var(--ps) * 0.72));
  }
  18% {
    opacity: 0.72;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(var(--dx), var(--down)) scale(calc(var(--ps) * 1.4));
  }
}

@keyframes ringStageExitTransition {
  0% {
    opacity: 0;
    transform: scale(0.82);
  }
  34% {
    opacity: 0.78;
    transform: scale(1);
  }
  64% {
    opacity: 0.9;
    transform: scale(1.04);
  }
  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}

@keyframes ringInteractNode {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--angle)) translate(var(--ring-radius)) rotate(var(--back-angle)) scale(1.12);
  }
  28% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--angle)) translate(var(--ring-radius)) rotate(var(--back-angle)) scale(1.34);
  }
  68% {
    opacity: 0.88;
    transform: translate(-50%, -50%) rotate(var(--angle)) translate(var(--ring-radius)) rotate(var(--back-angle)) scale(1.48);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--angle)) translate(var(--ring-radius)) rotate(var(--back-angle)) scale(0.18);
  }
}

@keyframes ringInteractArt {
  0% {
    filter: brightness(1);
  }
  45% {
    filter: brightness(1.24) saturate(1.12);
  }
  100% {
    filter: brightness(1.5) saturate(1.2);
  }
}

.ring-equipment-panel .bread-section-head,
.ring-detail-panel .bread-section-head,
.ring-log-panel .bread-section-head,
.ring-player-panel .bread-section-head {
  margin-bottom: 7px;
}

.ring-player-panel {
  padding-bottom: 10px;
}

.ring-player-panel .ring-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.ring-player-panel .ring-stat {
  padding: 5px;
}

.ring-player-panel .ring-stat span {
  font-size: 10px;
}

.ring-player-panel .ring-stat strong {
  margin-top: 1px;
  font-size: 13px;
}

.ring-player-panel .ring-control-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin-top: 14px;
}

.ring-player-panel .ring-control-row button {
  min-height: 30px;
  padding: 5px;
  font-size: 12px;
}

.ring-player-panel .ring-control-row button:last-child {
  grid-column: auto;
}

.ring-player-panel .ring-effect-row {
  gap: 4px;
  margin-top: 7px;
}

.ring-player-panel .ring-effect-row span {
  padding: 5px 6px;
  font-size: 10px;
}

.ring-equipment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.ring-equipment {
  position: relative;
  display: grid;
  min-height: 34px;
  gap: 1px;
  padding: 4px 25px 4px 5px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.66);
  color: #28372e;
  text-align: left;
  cursor: pointer;
}

.ring-equipment.has-item {
  background: rgba(247, 255, 247, 0.86);
}

.ring-equipment span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.ring-equipment strong {
  overflow: hidden;
  color: #22382a;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ring-equipment img {
  position: absolute;
  right: 5px;
  bottom: 4px;
  width: 18px;
  height: 24px;
  object-fit: contain;
}

.ring-detail-panel {
  min-height: 238px;
  overflow: hidden;
}

#ringDetail {
  max-height: 258px;
  overflow: auto;
  padding-right: 4px;
}

.ring-info-top {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 7px;
}

.ring-info-top img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: #eef7f2;
  object-fit: contain;
}

.ring-info-top h4 {
  margin: 1px 0 0;
  font-size: 14px;
  line-height: 1.18;
}

.ring-info-top p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ring-payload-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.ring-payload-grid div {
  padding: 4px 5px;
}

.ring-payload-grid span {
  font-size: 9px;
}

.ring-payload-grid strong {
  margin-top: 1px;
  font-size: 10px;
  line-height: 1.15;
}

.ring-guide-panel {
  display: grid;
  gap: 14px;
  margin-top: 2px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.ring-guide-overview {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 12px;
  align-items: stretch;
}

.ring-guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 12px;
}

.ring-guide-grid article,
.ring-guide-card-types,
.ring-howto-card,
.ring-attribute-card,
.ring-catalog-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.68);
}

.ring-howto-card,
.ring-attribute-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.ring-guide-panel h4,
.ring-guide-panel p {
  margin: 0;
}

.ring-guide-panel h4 {
  color: #17251e;
  font-size: 17px;
  font-weight: 900;
}

.ring-guide-panel p {
  margin-top: 8px;
  color: #405247;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.65;
}

.ring-guide-list,
.ring-card-type-grid,
.ring-step-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.ring-step-list {
  grid-template-columns: 1fr;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  height: 100%;
}

.ring-guide-list.compact {
  grid-template-columns: 1fr;
}

.ring-guide-list div,
.ring-card-type-grid div,
.ring-step-list div {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(24, 32, 37, 0.1);
  background: rgba(255, 255, 255, 0.74);
}

.ring-step-list div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.ring-guide-list strong,
.ring-guide-list span,
.ring-card-type-grid strong,
.ring-card-type-grid span,
.ring-step-list strong,
.ring-step-list span {
  display: block;
}

.ring-guide-list strong,
.ring-card-type-grid strong {
  color: #24382c;
  font-size: 12px;
  font-weight: 900;
}

.ring-step-list strong {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(75, 141, 88, 0.16);
  color: #274232;
  font-size: 13px;
  font-weight: 900;
}

.ring-guide-list span,
.ring-card-type-grid span,
.ring-step-list span {
  margin-top: 4px;
  color: #526258;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.ring-step-list span {
  margin-top: 0;
}

.ring-step-list b {
  display: block;
  margin-bottom: 3px;
  color: #24382c;
  font-size: 12px;
}

.ring-catalog-panel {
  display: grid;
  gap: 12px;
}

.ring-catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ring-catalog-filters button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(34, 77, 43, 0.18);
  background: rgba(255, 255, 255, 0.82);
  color: #284331;
  font-weight: 900;
  cursor: pointer;
}

.ring-catalog-filters button.is-active {
  border-color: rgba(75, 141, 88, 0.54);
  background: rgba(75, 141, 88, 0.16);
}

.ring-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 10px;
}

.ring-catalog-card {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  min-height: 236px;
  padding: 12px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 249, 239, 0.78));
}

.ring-catalog-card.is-filter-hidden {
  display: none !important;
}

.ring-catalog-visual {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.ring-catalog-art {
  --ring-art-bg: #eef7f2;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  align-self: start;
  overflow: hidden;
  width: 112px;
  height: 142px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 4px;
  background: var(--ring-art-bg);
  box-shadow: inset 0 0 0 1px rgba(24, 32, 37, 0.12), 0 8px 16px rgba(24, 44, 30, 0.12);
}

.ring-catalog-art .ring-card-frame,
.ring-catalog-art .ring-card-image {
  position: absolute;
  left: 50%;
  top: 50%;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

.ring-catalog-art .ring-card-frame {
  display: none !important;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.ring-catalog-art .ring-card-image {
  z-index: 3;
  top: 50%;
  width: 86%;
  height: 86%;
  background: transparent !important;
  border-radius: 0;
}

.ring-catalog-copy {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  gap: 7px;
}

.ring-catalog-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.ring-catalog-copy h4,
.ring-catalog-copy p {
  margin: 0;
}

.ring-catalog-copy h4 {
  color: #203529;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.18;
}

.ring-catalog-visual p {
  margin: 0;
  overflow: auto;
  color: #4b5d52;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.36;
  overflow-wrap: anywhere;
}

.ring-catalog-card.is-long-copy .ring-catalog-visual p {
  font-size: 10px;
  line-height: 1.3;
}

.ring-catalog-card.is-very-long-copy .ring-catalog-visual p {
  font-size: 9px;
  line-height: 1.24;
}

.ring-catalog-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  align-content: start;
  align-items: start;
  align-self: start;
  grid-auto-flow: row;
}

.ring-catalog-meta i {
  align-self: start;
  min-width: 0;
  min-height: 38px;
  padding: 5px 6px;
  border: 1px solid rgba(34, 77, 43, 0.1);
  background: rgba(255, 255, 255, 0.72);
  color: #324639;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ring-catalog-card.is-dense-meta .ring-catalog-meta i {
  min-height: 34px;
  padding: 4px 5px;
  font-size: 10px;
  line-height: 1.15;
}

.ring-catalog-card.is-packed-meta .ring-catalog-meta {
  gap: 4px;
}

.ring-catalog-card.is-packed-meta .ring-catalog-meta i {
  min-height: 30px;
  padding: 3px 4px;
  font-size: 9px;
  line-height: 1.1;
}

.ring-catalog-meta b {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.ring-catalog-card.is-packed-meta .ring-catalog-meta b {
  font-size: 9px;
}

.ring-log {
  max-height: 180px;
}

.ring-log p {
  padding: 6px 7px;
  font-size: 12px;
}

.ring-command-panel {
  margin-top: 2px;
}

.cv-page {
  display: grid;
  gap: 14px;
}

.cv-stage,
.cv-panel,
.cv-stat {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.cv-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: 16px;
  min-height: 430px;
  padding: 20px;
  border-top: 5px solid var(--blue);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(233, 244, 255, 0.74)),
    url("/static/assets/shared/cv_random_bg_cropped.png") center / cover no-repeat;
}

.cv-stage-copy {
  display: grid;
  align-content: center;
  gap: 12px;
}

.cv-stage-copy span,
.cv-card-title span,
.cv-search-row span,
.cv-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.cv-stage-copy h3,
.cv-stage-copy p,
.cv-stat strong,
.cv-card-title strong,
.cv-card-body p,
.cv-random-card,
.cv-random-card figcaption,
.cv-random-card span {
  margin: 0;
}

.cv-stage-copy h3 {
  font-size: 34px;
  line-height: 1.12;
}

.cv-stage-copy p {
  max-width: 680px;
  color: #405361;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.75;
}

.cv-random-form,
.cv-search-form {
  display: grid;
  gap: 8px;
}

.cv-random-form {
  grid-template-columns: auto minmax(0, 1fr) 112px;
  max-width: 640px;
  align-items: stretch;
}

.cv-search-form {
  grid-template-columns: minmax(0, 1fr) 112px;
}

.cv-random-mode {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 6px;
  align-items: center;
}

.cv-random-mode label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid rgba(23, 85, 136, 0.18);
  background: rgba(255, 255, 255, 0.86);
  color: #31556d;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.cv-random-fields {
  display: grid;
  min-width: 0;
}

.cv-random-form input,
.cv-random-form select,
.cv-random-form button,
.cv-search-form input,
.cv-search-form button,
.cv-tools input {
  min-height: 42px;
  border: 1px solid rgba(23, 85, 136, 0.22);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-weight: 900;
}

.cv-random-form input,
.cv-random-form select,
.cv-search-form input,
.cv-tools input {
  min-width: 0;
  padding: 0 12px;
}

.cv-random-form .is-hidden {
  display: none;
}

.cv-random-form button,
.cv-search-form button {
  background: #2f78b7;
  color: #fff;
  cursor: pointer;
}

.cv-random-frame {
  display: grid;
  min-height: 390px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(23, 85, 136, 0.2);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.58), rgba(233, 244, 255, 0.38)),
    url("/static/assets/shared/cv_random_bg_cropped.png") center / cover no-repeat;
}

.cv-random-card {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 390px;
  grid-template-rows: minmax(0, 1fr) auto;
}

.cv-random-card img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.62);
}

.cv-random-card figcaption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid rgba(23, 85, 136, 0.14);
  background: rgba(255, 255, 255, 0.92);
}

.cv-random-card strong {
  overflow-wrap: anywhere;
  color: #175588;
  font-size: 17px;
}

.cv-random-card span {
  grid-column: 1 / 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.cv-random-card a {
  grid-column: 2 / 3;
  grid-row: 1 / span 2;
  padding: 8px 12px;
  border: 1px solid rgba(23, 85, 136, 0.24);
  background: rgba(47, 120, 183, 0.1);
  color: #175588;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.cv-stats,
.cv-grid-two {
  display: grid;
  gap: 14px;
}

.cv-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cv-stat {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.cv-stat strong {
  color: #175588;
  font-size: 24px;
}

.cv-grid-two {
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
}

.cv-panel {
  padding: 18px;
}

.cv-search-result {
  margin-top: 10px;
}

.cv-search-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow-y: auto;
}

.cv-search-row {
  display: grid;
  width: 100%;
  min-height: 48px;
  align-items: center;
  border: 1px solid rgba(23, 85, 136, 0.14);
  background: rgba(245, 250, 255, 0.82);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.cv-search-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 9px 10px;
}

.cv-search-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.cv-search-row strong,
.cv-directory-main strong {
  color: #175588;
  overflow-wrap: anywhere;
}

.cv-search-row em,
.cv-directory-main span {
  color: #47606f;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.cv-tools {
  min-width: min(260px, 100%);
}

.cv-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.cv-card {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(23, 85, 136, 0.16);
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 286px;
}

.cv-sample-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  height: 138px;
  background: rgba(224, 238, 250, 0.7);
}

.cv-sample-strip img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cv-sample-empty {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.cv-card-body {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 12px;
  border-top: 1px solid rgba(23, 85, 136, 0.12);
  background: rgba(255, 255, 255, 0.92);
}

.cv-card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.cv-card-title strong {
  color: #175588;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.cv-card-body p {
  color: #536268;
  font-size: 12px;
  font-weight: 900;
}

.cv-alias-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cv-alias-list span {
  max-width: 100%;
  padding: 3px 6px;
  border: 1px solid rgba(23, 85, 136, 0.14);
  background: rgba(239, 247, 255, 0.9);
  color: #31556d;
  font-size: 11px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.cv-catalog-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.cv-catalog-actions button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(23, 85, 136, 0.22);
  background: #2f78b7;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.cv-catalog-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.cv-directory-panel details {
  display: grid;
  gap: 10px;
}

.cv-directory-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
  color: #175588;
  font-weight: 900;
}

.cv-directory-list {
  display: grid;
  max-height: 540px;
  overflow-y: auto;
  border: 1px solid rgba(23, 85, 136, 0.12);
  background: rgba(245, 250, 255, 0.62);
}

.cv-directory-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.34fr) minmax(0, 0.66fr);
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid rgba(23, 85, 136, 0.1);
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 72px;
}

.cv-directory-row:last-child {
  border-bottom: none;
}

.cv-directory-main {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  border: 1px solid rgba(23, 85, 136, 0.14);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  text-align: left;
}

.cv-directory-main,
.cv-directory-aliases button,
.cv-gallery-aliases button {
  padding: 7px 8px;
}

.cv-directory-aliases,
.cv-gallery-aliases {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.cv-directory-aliases button,
.cv-gallery-aliases button {
  border: 1px solid rgba(23, 85, 136, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: #31556d;
  font-size: 11px;
  font-weight: 900;
  cursor: copy;
}

.cv-gallery-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.93), rgba(233, 244, 255, 0.76)),
    url("/static/assets/shared/cv_random_bg_cropped.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.cv-gallery-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.cv-gallery-head h3,
.cv-gallery-head p {
  margin: 0;
}

.cv-gallery-head h3 {
  color: #175588;
  font-size: 32px;
  line-height: 1.12;
}

.cv-gallery-head p {
  margin-top: 3px;
  color: #405361;
  font-weight: 900;
}

.cv-back-button,
.cv-random-inline,
.cv-gallery-more button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(23, 85, 136, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: #175588;
  font-weight: 900;
  cursor: pointer;
}

.cv-random-inline {
  background: #2f78b7;
  color: #fff;
}

.cv-image-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.cv-image-tile {
  display: grid;
  grid-template-rows: 190px auto;
  overflow: hidden;
  border: 1px solid rgba(23, 85, 136, 0.14);
  background: rgba(255, 255, 255, 0.82);
  color: #31556d;
  text-decoration: none;
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 232px;
}

.cv-image-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(240, 247, 253, 0.8);
}

.cv-image-tile span {
  padding: 7px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cv-gallery-more {
  display: grid;
  justify-items: center;
  margin-top: 14px;
}

.web-chat-shell {
  display: grid;
  gap: 12px;
}

.web-chat-bot-guide {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: 18px;
}

.web-chat-bot-guide p {
  margin: 0;
}

.web-chat-bot-guide p {
  max-width: 940px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.65;
}

.web-chat-page {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  height: clamp(620px, calc(100vh - 270px), 760px);
  min-height: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.web-chat-sidebar {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) minmax(210px, 30%);
  gap: 12px;
  min-width: 0;
  min-height: 0;
  padding: 16px;
  border-right: 1px solid var(--line);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.58)),
    url("/api/assets/jjc/basic/bg5.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.web-chat-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.web-chat-side-head span,
.web-chat-select-label,
.web-chat-header span,
.web-chat-header-meta span,
.web-chat-role {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.web-chat-side-head strong {
  color: #9a3d55;
  font-size: 14px;
}

.web-chat-new-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 8px;
}

.web-chat-new-row select,
.web-chat-new-row button,
.web-chat-compose textarea,
.web-chat-compose button {
  border: 1px solid rgba(24, 32, 37, 0.2);
  background: rgba(255, 255, 255, 0.94);
}

.web-chat-new-row select {
  min-width: 0;
  height: 40px;
  padding: 0 9px;
  font-weight: 800;
}

.web-chat-new-row button,
.web-chat-compose button {
  cursor: pointer;
  font-weight: 900;
}

.web-chat-session-list {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.web-chat-session-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: stretch;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.web-chat-session-wrap.is-active {
  border-color: rgba(217, 87, 123, 0.44);
  background: rgba(255, 239, 245, 0.92);
}

.web-chat-session {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.web-chat-session-delete {
  border: 0;
  border-left: 1px solid rgba(24, 32, 37, 0.08);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(103, 52, 68, 0.72);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.web-chat-session-delete:hover {
  background: rgba(217, 87, 123, 0.14);
  color: #8f304b;
}

.web-chat-session strong,
.web-chat-session span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-chat-session strong {
  color: #1d2a31;
  font-size: 14px;
  font-weight: 900;
}

.web-chat-session span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.web-chat-character-card {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
  padding-top: 4px;
  overflow: hidden;
}

.web-chat-character-card img {
  display: block;
  width: auto;
  max-width: 90%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 10px 16px rgba(45, 37, 42, 0.18));
}

.web-chat-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.web-chat-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(255, 244, 239, 0.86));
}

.web-chat-header h3,
.web-chat-header p {
  margin: 0;
}

.web-chat-header h3 {
  margin-top: 5px;
  color: #17252d;
  font-size: 28px;
  line-height: 1.15;
}

.web-chat-header p {
  max-width: 760px;
  margin-top: 7px;
  color: #3f5158;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.web-chat-header-meta {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 5px;
  min-width: 160px;
}

.web-chat-header-meta strong {
  padding: 5px 8px;
  border: 1px solid rgba(217, 87, 123, 0.28);
  background: rgba(255, 255, 255, 0.82);
  color: #9a3d55;
  font-size: 13px;
  font-weight: 900;
}

.web-chat-header-meta span {
  max-width: 220px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 20px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.62)),
    url("/static/assets/chat/chat_messages_bg.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.web-chat-welcome {
  max-width: 620px;
  padding: 14px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.82);
}

.web-chat-welcome strong {
  color: #17252d;
  font-size: 17px;
}

.web-chat-welcome p {
  margin: 7px 0 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.55;
}

.web-chat-message {
  display: grid;
  gap: 5px;
  max-width: min(720px, 88%);
}

.web-chat-message.user {
  align-self: flex-end;
  justify-items: end;
}

.web-chat-message.assistant {
  align-self: flex-start;
}

.web-chat-bubble {
  padding: 12px 13px;
  border: 1px solid rgba(24, 32, 37, 0.13);
  background: rgba(255, 255, 255, 0.9);
  color: #202b31;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.7;
}

.web-chat-message.user .web-chat-bubble {
  border-color: rgba(22, 141, 160, 0.24);
  background: rgba(224, 244, 247, 0.92);
}

.web-chat-message.is-typing .web-chat-bubble {
  color: #9a3d55;
}

.web-chat-sources {
  margin-top: 10px;
  border-top: 1px solid rgba(24, 32, 37, 0.1);
  padding-top: 8px;
}

.web-chat-sources summary {
  color: #9a3d55;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.web-chat-sources section {
  margin-top: 8px;
  padding: 8px;
  border: 1px solid rgba(24, 32, 37, 0.1);
  background: rgba(255, 255, 255, 0.68);
}

.web-chat-sources strong,
.web-chat-sources p {
  display: block;
  margin: 0;
}

.web-chat-sources strong {
  color: #17252d;
  font-size: 12px;
}

.web-chat-sources p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.web-chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
}

.web-chat-compose textarea {
  min-width: 0;
  height: 72px;
  max-height: 160px;
  resize: none;
  padding: 10px 12px;
  font-weight: 800;
  line-height: 1.55;
}

.web-chat-compose button {
  min-height: 48px;
  align-self: end;
  color: #17252d;
}

.web-chat-moments-panel {
  height: 420px;
  min-height: 0;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.web-chat-moments-list {
  display: grid;
  align-content: start;
  gap: 12px;
  height: calc(100% - 40px);
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.web-chat-moment {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 246, 242, 0.78)),
    url("/static/assets/chat/chat_messages_bg.png");
  background-position: center;
  background-size: cover;
}

.web-chat-moment-avatar {
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid rgba(217, 87, 123, 0.24);
  background: rgba(255, 255, 255, 0.86);
}

.web-chat-moment-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.web-chat-moment-avatar span {
  display: grid;
  height: 100%;
  place-items: center;
  color: #9a3d55;
  font-weight: 900;
}

.web-chat-moment-body {
  min-width: 0;
}

.web-chat-moment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.web-chat-moment-head strong,
.web-chat-moment-head span,
.web-chat-moment-head time,
.web-chat-moment-body p {
  display: block;
}

.web-chat-moment-head strong {
  color: #17252d;
  font-size: 17px;
  font-weight: 900;
}

.web-chat-moment-head span,
.web-chat-moment-head time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.web-chat-moment-body p {
  margin: 8px 0 0;
  color: #24333a;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.7;
}

.web-chat-moment-image {
  width: min(360px, 100%);
  margin: 12px 0 0;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.82);
}

.web-chat-moment-image img {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  object-position: center 20%;
}

.web-chat-moment-image figcaption {
  padding: 6px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.web-chat-moment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.web-chat-moment-image figcaption .web-chat-moment-actions {
  margin-top: 0;
}

.web-chat-moment-like {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(217, 87, 123, 0.24);
  background: rgba(255, 255, 255, 0.62);
  color: #8f3d52;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.web-chat-moment-like span {
  color: rgba(143, 61, 82, 0.72);
  font-size: 18px;
  line-height: 1;
}

.web-chat-moment-like strong {
  font-size: 13px;
}

.web-chat-moment-like.is-liked {
  border-color: rgba(217, 87, 123, 0.44);
  background: rgba(255, 238, 244, 0.86);
  color: #9a2f4f;
}

.web-chat-moment-like.is-liked span {
  color: #d93f63;
}

.web-chat-moment-like:disabled {
  cursor: default;
}

.web-chat-moment-likes,
.web-chat-moment-comments {
  margin-top: 10px;
  border: 1px solid rgba(24, 32, 37, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.web-chat-moment-likes {
  padding: 8px 10px;
  color: #9a3d55;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.55;
}

.web-chat-moment-comments {
  display: grid;
}

.web-chat-moment-comment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid rgba(24, 32, 37, 0.08);
  color: #34444b;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.web-chat-moment-comment:first-child {
  border-top: 0;
}

.web-chat-moment-comment strong {
  color: #9a3d55;
  font-weight: 900;
}

.web-chat-moment-user-replies {
  display: grid;
  margin-top: 10px;
  border: 1px solid rgba(24, 32, 37, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.web-chat-moment-user-replies-head {
  padding: 8px 10px;
  color: #9a3d55;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.55;
}

.web-chat-moment-user-reply-list {
  display: grid;
}

.web-chat-moment-user-reply {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid rgba(24, 32, 37, 0.08);
  color: #34444b;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.web-chat-moment-user-reply.is-mine {
  background: rgba(237, 250, 250, 0.68);
}

.web-chat-moment-user-reply strong {
  color: #3c6f7a;
  font-weight: 900;
}

.web-chat-moment-user-reply span {
  min-width: 0;
}

.web-chat-moment-reply-delete {
  display: grid;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(182, 56, 80, 0.2);
  background: rgba(255, 242, 245, 0.86);
  color: #b63850;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.web-chat-moment-reply-delete:disabled {
  cursor: default;
  opacity: 0.62;
}

.web-chat-moment-replies-more {
  justify-self: start;
  min-height: 30px;
  margin: 8px 10px 0;
  padding: 0 10px;
  border: 1px solid rgba(60, 111, 122, 0.22);
  background: rgba(237, 250, 250, 0.76);
  color: #2d626d;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.web-chat-moment-reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(24, 32, 37, 0.08);
}

.web-chat-moment-reply-form input {
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(24, 32, 37, 0.14);
  background: rgba(255, 255, 255, 0.84);
  color: #24333a;
  font-size: 13px;
  font-weight: 800;
}

.web-chat-moment-reply-form button {
  min-height: 34px;
  padding: 0 12px;
  color: #17252d;
}

.web-chat-moment-reply-error {
  padding: 0 10px 10px;
  color: #b63850;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.5;
}

.shell-page,
.diagnostics-page {
  display: grid;
  gap: 16px;
}

.shell-panel,
.diagnostic-panel,
.diagnostic-stat {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.shell-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.shell-panel h3,
.shell-panel p {
  margin: 0;
}

.shell-panel h3 {
  margin-top: 6px;
  color: #15262e;
  font-size: 24px;
}

.shell-panel p {
  margin-top: 8px;
  max-width: 760px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.65;
}

.shell-kicker {
  color: #147a9a;
  font-size: 13px;
  font-weight: 900;
}

.shell-tags {
  justify-content: flex-end;
  min-width: 220px;
}

.shell-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shell-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.shell-grid strong,
.shell-grid span {
  display: block;
}

.shell-grid strong {
  color: var(--muted);
  font-size: 12px;
}

.shell-grid span {
  margin-top: 6px;
  overflow: hidden;
  color: #15262e;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-page {
  display: grid;
  gap: 22px;
}

.guide-hero,
.guide-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 14px;
  padding: 16px;
  overflow: hidden;
}

.guide-intro {
  min-width: 0;
  padding: 30px;
}

.guide-intro span,
.guide-section-head span,
.guide-command-group header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0;
}

.guide-intro h3,
.guide-intro p,
.guide-section-head h3,
.guide-command-group h4,
.guide-module-card p,
.guide-category-card p,
.guide-flow-list p,
.guide-contact p {
  margin: 0;
}

.guide-intro h3 {
  margin-top: 10px;
  font-size: 29px;
  line-height: 1.18;
}

.guide-intro p {
  max-width: 720px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  font-weight: 800;
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.guide-actions a,
.guide-command-group header a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(24, 32, 37, 0.16);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.guide-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-self: stretch;
  background: transparent;
}

.guide-stats article {
  min-height: 116px;
  padding: 20px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.74);
}

.guide-stats span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.guide-stats strong {
  display: block;
  margin-top: 8px;
  color: #344047;
  font-size: 28px;
  line-height: 1;
}

.guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 22px;
}

.guide-panel {
  min-width: 0;
  padding: 22px;
}

.guide-section-head,
.guide-command-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.guide-section-head h3 {
  font-size: 21px;
}

.guide-module-list,
.guide-category-list,
.guide-flow-list,
.guide-contact,
.guide-command-groups {
  display: grid;
  gap: 14px;
}

.guide-module-panel .guide-module-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-module-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  border-left: 5px solid var(--accent, var(--gray));
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  text-decoration: none;
}

.guide-module-card strong,
.guide-category-card strong,
.guide-flow-list strong,
.guide-contact strong,
.guide-command-group h4 {
  color: #1d2b31;
  font-weight: 1000;
}

.guide-module-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 800;
}

.guide-module-card .feature-tags {
  margin-top: 0;
}

.guide-category-card,
.guide-flow-list div,
.guide-contact div {
  padding: 15px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.guide-category-card p,
.guide-flow-list p,
.guide-contact p,
.guide-contact code {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 800;
}

.guide-contact code {
  display: block;
  overflow-wrap: anywhere;
  white-space: normal;
}

.guide-command-group {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.62);
}

.guide-command-group h4 {
  margin: 4px 0 0;
  font-size: 18px;
}

.guide-command-group .command-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.diagnostics-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.diagnostic-stat {
  min-height: 92px;
  padding: 14px;
}

.diagnostic-stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.diagnostic-stat strong {
  display: block;
  margin-top: 8px;
  color: #5b6870;
  font-size: 26px;
  line-height: 1;
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.diagnostic-usage-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.diagnostic-usage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.diagnostic-panel {
  padding: 18px;
}

.diagnostic-auth-panel,
.diagnostic-admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.diagnostic-auth-panel h3,
.diagnostic-auth-panel p,
.diagnostic-admin-bar strong {
  margin: 0;
}

.diagnostic-auth-panel h3 {
  margin-top: 8px;
  color: #182832;
  font-size: 24px;
}

.diagnostic-auth-panel p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.diagnostic-kicker {
  color: #25707c;
  font-size: 12px;
  font-weight: 1000;
}

.diagnostic-token-form,
.diagnostic-admin-actions,
.diagnostic-readonly-form,
.diagnostic-log-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.diagnostic-token-form input[type="password"],
.diagnostic-readonly-form input,
.diagnostic-log-toolbar select {
  min-height: 38px;
  border: 1px solid rgba(24, 32, 37, 0.14);
  background: rgba(255, 255, 255, 0.88);
  color: #24333a;
  font-size: 13px;
  font-weight: 800;
}

.diagnostic-token-form input[type="password"] {
  width: min(360px, 56vw);
}

.diagnostic-token-form label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.diagnostic-token-form button,
.diagnostic-admin-actions button,
.diagnostic-readonly-form button,
.diagnostic-log-toolbar button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(24, 32, 37, 0.16);
  background: #fff8ee;
  color: #26343c;
  font-size: 13px;
  font-weight: 1000;
  cursor: pointer;
}

.diagnostic-admin-bar {
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.diagnostic-admin-bar strong {
  display: block;
  margin-top: 4px;
  color: #20313a;
  font-size: 18px;
}

.diagnostic-admin-grid {
  align-items: stretch;
}

.diagnostic-readonly-panel p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.diagnostic-readonly-state {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.diagnostic-readonly-state strong {
  color: #22333c;
  font-size: 18px;
}

.diagnostic-readonly-state span,
.diagnostic-inline-status,
.diagnostic-log-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.diagnostic-readonly-state.is-on {
  border-color: rgba(190, 63, 72, 0.35);
  background: rgba(255, 239, 238, 0.86);
}

.diagnostic-readonly-state.is-off {
  border-color: rgba(52, 135, 92, 0.28);
  background: rgba(240, 250, 244, 0.86);
}

.diagnostic-readonly-form input {
  flex: 1;
  min-width: 180px;
}

.diagnostic-log-toolbar {
  margin-bottom: 10px;
}

.diagnostic-log-toolbar select {
  min-width: 140px;
  padding: 0 10px;
}

.diagnostic-log-view {
  max-height: 430px;
  min-height: 260px;
  margin: 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(20, 28, 32, 0.9);
  color: #e9f4f4;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.diagnostic-alert-list {
  display: grid;
  gap: 9px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 6px;
}

.diagnostic-alert-row {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.diagnostic-alert-row.level-danger {
  border-color: rgba(190, 63, 72, 0.36);
  background: rgba(255, 241, 240, 0.82);
}

.diagnostic-alert-row.level-warning {
  border-color: rgba(179, 124, 40, 0.32);
  background: rgba(255, 248, 230, 0.82);
}

.diagnostic-alert-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.diagnostic-alert-row p {
  margin: 0;
  color: #273640;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.diagnostic-table {
  overflow-x: auto;
}

.diagnostic-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.diagnostic-table th,
.diagnostic-table td {
  padding: 8px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  text-align: left;
  vertical-align: top;
}

.diagnostic-table th {
  background: rgba(245, 248, 250, 0.92);
  color: #39474e;
  font-weight: 900;
}

.diagnostic-table td {
  color: #4c5d65;
  font-weight: 800;
}

.diagnostic-ok {
  color: #168a55;
  font-weight: 900;
}

.diagnostic-bad {
  color: #b33145;
  font-weight: 900;
}

.diagnostic-route-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.diagnostic-route-list code {
  padding: 6px 8px;
  border: 1px solid rgba(24, 32, 37, 0.13);
  background: rgba(245, 248, 250, 0.92);
  color: #39474e;
  font-weight: 900;
}

.live2d-dock {
  position: fixed;
  left: -4px;
  bottom: -22px;
  z-index: 80;
  width: 240px;
  height: 330px;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  transition: transform 180ms ease;
}

body:has(.web-chat-page) .live2d-dock {
  left: -42px;
  bottom: -30px;
}

.live2d-canvas {
  display: block;
  width: 240px;
  height: 330px;
  background: transparent;
  pointer-events: auto;
}

.live2d-fallback {
  position: absolute;
  left: 38px;
  bottom: 18px;
  width: 150px;
  height: 150px;
  object-fit: contain;
  opacity: 0.92;
  transform-origin: 50% 88%;
  transition: transform 120ms linear;
  filter: drop-shadow(0 10px 18px rgba(28, 38, 43, 0.22));
}

.live2d-dock.is-static .live2d-canvas {
  display: none;
}

.live2d-dock.is-ready .live2d-fallback,
.live2d-dock.is-loading .live2d-fallback,
.live2d-dock.is-retrying .live2d-fallback,
.live2d-dock.is-hidden {
  display: none;
}

.live2d-dock.is-acting {
  transform: translateY(-4px);
}

.live2d-costume-button {
  position: absolute;
  top: 56px;
  left: 34px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 2px solid #e07a7d;
  border-radius: 999px;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.96) 0 22%, rgba(255, 224, 218, 0.98) 23% 100%);
  color: #d25d72;
  box-shadow:
    0 8px 18px rgba(64, 38, 46, 0.18),
    inset 0 0 0 2px rgba(255, 255, 255, 0.74);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform 140ms ease, background 140ms ease, opacity 140ms ease;
}

.live2d-costume-button[hidden] {
  display: none !important;
}

.live2d-costume-button img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.72));
}

.live2d-costume-button:hover {
  background:
    radial-gradient(circle at 34% 30%, #fff 0 22%, #ffd8d1 23% 100%);
  transform: translateY(-1px);
}

.live2d-costume-button:disabled,
.live2d-dock.is-switching .live2d-costume-button {
  cursor: wait;
  opacity: 0.58;
}

.assistant-chip {
  margin-top: 8px;
  width: fit-content;
}

.help-fab {
  display: none;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 11;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(24, 32, 37, 0.25);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}

.help-popover {
  display: none;
  position: fixed;
  right: 22px;
  bottom: 82px;
  z-index: 11;
  width: 240px;
  max-height: min(560px, calc(100vh - 110px));
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.help-popover h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.help-popover button {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 8px 10px;
  border: 1px solid rgba(24, 32, 37, 0.14);
  background: #fff;
  text-align: left;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.empty-state,
.error-state {
  padding: 12px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 940px) {
  .app-shell {
    width: min(720px, calc(100vw - 20px));
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-panel,
  .home-dashboard,
  .chat-panel {
    grid-template-columns: 1fr;
  }

  .home-hero {
    height: auto;
  }

  .plugin-hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 24px;
  }

  .hero-copy h2 {
    font-size: 30px;
  }

  .hero-visual {
    height: 210px;
    min-height: 210px;
    padding: 0;
    border-left: none;
    border-top: 1px solid var(--line);
  }

  .hero-visual img {
    width: auto;
    height: 100%;
  }

  .home-hero .hero-visual,
  .home-hero .hero-visual img {
    height: 210px;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .home-module-row-4,
  .home-module-row-5,
  .home-module-row-extra {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-guide {
    grid-template-columns: 1fr;
  }

  .chat-side {
    min-height: 260px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    background-position: right -16px bottom;
    background-size: 220px auto;
  }

  .chat-box {
    min-height: 360px;
  }

  .home-guide-panel {
    height: 620px;
  }

  .home-guide-panel .chat-box {
    min-height: 0;
  }

  .bread-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bread-lookup-panel,
  .bread-rank-shop {
    grid-template-columns: 1fr;
  }

  .bread-rank-list.compact,
  .sticker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jjc-stage,
  .jjc-lookup-panel,
  .jjc-grid-two,
  .jjc-guide-grid,
  .guide-hero,
  .guide-grid,
  .web-chat-page,
  .voice-stage,
  .voice-layout,
  .character-image-stage,
  .character-image-grid-two,
  .cv-stage,
  .cv-grid-two,
  .meme-stage,
  .meme-workbench,
  .ring-hero,
  .ring-workbench,
  .ring-grid-two {
    grid-template-columns: 1fr;
  }

  .ring-workbench {
    grid-template-areas:
      "board"
      "side";
  }

  .ring-guide-grid,
  .ring-guide-overview {
    grid-template-columns: 1fr;
  }

  .web-chat-sidebar {
    grid-template-rows: auto auto auto minmax(0, 220px) 190px;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .web-chat-page {
    height: auto;
    overflow: visible;
  }

  .web-chat-session-list {
    max-height: 220px;
  }

  .web-chat-main {
    height: 560px;
    min-height: 0;
  }

  .jjc-stage > img {
    justify-self: start;
    height: 190px;
  }

  .jjc-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .voice-control-grid,
  .voice-speaker-grid,
  .character-image-stats,
  .character-image-gallery-grid,
  .character-image-photo-grid,
  .cv-stats,
  .cv-catalog-grid,
  .cv-image-grid,
  .meme-status-grid,
  .meme-image-slots,
  .meme-text-grid,
  .meme-option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meme-command-grid.command-grid {
    grid-template-columns: 1fr;
  }

  .guide-stats {
    border-left: none;
    border-top: 1px solid var(--line);
  }

  .guide-command-group .command-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ring-orbit {
    --ring-radius: 180px;
    width: min(100%, 500px);
    min-width: 0;
  }

  .ring-side-stack {
    grid-area: side;
  }

  .ring-detail-panel {
    position: static;
  }

  .character-image-form {
    grid-template-columns: 1fr 1fr;
  }

  .character-image-form button {
    grid-column: 1 / -1;
  }

  .character-image-row {
    grid-template-columns: 1fr;
  }

  .cv-gallery-head {
    grid-template-columns: 1fr;
  }

  .cv-directory-row {
    grid-template-columns: 1fr;
  }

  .jjc-rank-list.compact,
  .jjc-character-grid {
    grid-template-columns: 1fr;
  }

  .shell-panel {
    flex-direction: column;
  }

  .shell-tags {
    justify-content: flex-start;
    min-width: 0;
  }

  .shell-grid,
  .diagnostics-stats,
  .diagnostic-usage-stats,
  .diagnostic-usage-grid,
  .diagnostic-grid {
    grid-template-columns: 1fr;
  }

  .jjc-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jjc-play-panel .jjc-command-grid {
    grid-template-columns: 1fr;
  }

  .command-grid {
    grid-template-columns: 1fr;
  }

  .assistant-chip {
    display: none;
  }
}

@media (max-width: 520px) {
  .brand-block h1 {
    font-size: 20px;
  }

  .hero-copy h2 {
    font-size: 25px;
    max-width: 100%;
    word-break: break-all;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .mobile-break {
    display: block;
  }

  .live2d-dock {
    width: 82px;
    height: 114px;
    left: 0;
    bottom: -7px;
  }

  .live2d-canvas {
    width: 82px;
    height: 114px;
  }

  .live2d-fallback {
    left: 12px;
    bottom: 8px;
    width: 56px;
    height: 56px;
  }

  .live2d-costume-button {
    top: 23px;
    left: 9px;
    width: 28px;
    height: 28px;
    border-width: 1px;
    font-size: 12px;
  }

  .live2d-costume-button img {
    width: 22px;
    height: 22px;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .home-module-row-4,
  .home-module-row-5,
  .home-module-row-extra,
  .home-bot-row {
    grid-template-columns: 1fr;
  }

  .feature-row {
    grid-template-columns: 1fr;
  }

  .chat-compose {
    grid-template-columns: 1fr;
  }

  .web-chat-header,
  .web-chat-compose {
    grid-template-columns: 1fr;
  }

  .web-chat-header-meta {
    justify-items: start;
  }

  .web-chat-header-meta span {
    max-width: 100%;
    text-align: left;
  }

  .web-chat-message {
    max-width: 100%;
  }

  .bread-stats,
  .bread-rank-list.compact,
  .sticker-grid,
  .sticker-tools,
  .jjc-stats,
  .jjc-tools,
  .jjc-guide-grid,
  .jjc-play-panel .jjc-command-grid,
  .jjc-team-strip,
  .jjc-mini-stat-grid,
  .jjc-skill-grid,
  .guide-stats,
  .guide-module-panel .guide-module-list,
  .guide-command-group .command-grid,
  .voice-control-grid,
  .voice-speaker-grid,
  .character-image-stats,
  .character-image-form,
  .character-image-gallery-grid,
  .character-image-photo-grid,
  .cv-stats,
  .cv-catalog-grid,
  .cv-image-grid,
  .cv-random-form,
  .cv-search-form,
  .meme-status-grid,
  .meme-image-slots,
  .meme-text-grid,
  .meme-option-grid,
  .meme-composer-head,
  .meme-result-card figcaption {
    grid-template-columns: 1fr;
  }

  .ring-hero-stats,
  .ring-stat-grid,
  .ring-payload-grid,
  .ring-guide-list,
  .ring-step-list,
  .ring-card-type-grid,
  .ring-catalog-grid,
  .ring-catalog-meta,
  .ring-command-grid.command-grid {
    grid-template-columns: 1fr;
  }

  .ring-step-list {
    grid-template-rows: none;
  }

  .ring-catalog-card {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 0;
  }

  .ring-catalog-art {
    width: 90px;
    height: 116px;
  }

  .ring-player-panel .ring-stat-grid,
  .ring-equipment-grid,
  .ring-player-panel .ring-control-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ring-board-head {
    flex-direction: column;
  }

  .ring-board-chips {
    justify-content: flex-start;
  }

  .ring-hero,
  .ring-panel {
    padding: 14px;
  }

  .plugin-layout,
  .plugin-hero,
  .guide-page,
  .guide-hero,
  .guide-panel,
  .ring-page,
  .ring-hero,
  .ring-panel {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .ring-hero-copy h3 {
    font-size: 25px;
  }

  .ring-orbit {
    --ring-radius: 118px;
    width: min(100%, 330px);
    min-width: 0;
  }

  .ring-stage-wrap {
    padding-bottom: 0;
  }

  .ring-center-card {
    width: 154px;
    height: 154px;
    min-height: 0;
    padding: 0;
  }

  .ring-node {
    width: 52px;
    height: 72px;
  }

  .ring-node-art {
    width: 42px;
    height: 42px;
  }

  .ring-current-art {
    top: calc(50% - 14px);
    width: 72px;
    height: 72px;
  }

  .ring-center-card strong {
    top: calc(50% + 30px);
    width: 132px;
    font-size: 11px;
    line-height: 1.15;
  }

  .ring-center-card span {
    top: calc(50% + 55px);
    width: 132px;
    font-size: 10px;
  }

  .ring-node-name {
    width: 100%;
    max-height: 24px;
    margin-top: 2px;
    font-size: 9px;
  }

  .ring-node-badge {
    left: 3px;
    top: -4px;
    min-width: 19px;
    height: 19px;
    font-size: 8px;
  }

  .ring-player-marker {
    width: 76px;
    transform: translate(-50%, -50%) rotate(var(--angle)) translate(calc(var(--ring-radius) + 74px)) rotate(var(--back-angle));
  }

  .ring-player-marker img {
    width: 62px;
    height: 80px;
  }

  .ring-info-top {
    grid-template-columns: 1fr;
  }

  .meme-stage,
  .meme-panel {
    padding: 14px;
  }

  .meme-template-list {
    max-height: 420px;
  }

  .meme-composer-head img {
    width: 100%;
    height: 168px;
  }

  .meme-result-card a {
    grid-row: auto;
    width: fit-content;
  }

  .cv-stage {
    min-height: 0;
    padding: 16px;
  }

  .cv-stage-copy h3 {
    font-size: 26px;
  }

  .cv-random-frame,
  .cv-random-card {
    min-height: 320px;
  }

  .cv-random-card figcaption {
    grid-template-columns: 1fr;
  }

  .cv-random-card a {
    grid-column: auto;
    grid-row: auto;
    width: fit-content;
  }

  .jjc-stage {
    padding: 18px;
  }

  .character-image-stage {
    min-height: 0;
    padding: 16px;
  }

  .character-image-copy h3 {
    font-size: 26px;
  }

  .character-image-result,
  .character-image-card {
    min-height: 320px;
  }

  .character-image-card figcaption {
    grid-template-columns: 1fr;
  }

  .character-image-card a {
    grid-column: auto;
    grid-row: auto;
    width: fit-content;
  }

  .jjc-stage strong {
    font-size: 26px;
  }

  .jjc-stage > img {
    height: 160px;
  }

  .jjc-rank-row {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .jjc-rank-number {
    grid-column: 1;
    grid-row: 2;
    font-size: 24px;
  }

  .jjc-rank-main {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .jjc-character-card {
    grid-template-columns: 1fr;
  }

  .jjc-character-art {
    width: 152px;
    height: 184px;
    min-height: 0;
  }

  .bread-rank-row {
    grid-template-columns: 56px 64px minmax(0, 1fr);
  }

  .bread-badge,
  .bread-rank-bread {
    grid-column: 3;
  }

  .sticker-card,
  .command-card {
    grid-template-columns: 1fr;
  }
}

body:has(.sgs-page) {
  overflow: hidden;
  background: #171615;
}

.sgs-page {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: block;
  width: 100vw;
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

.sgs-table {
  position: relative;
  display: block;
  width: 100vw;
  height: 100vh;
  min-height: 620px;
  padding: 0;
  border: 0;
  background:
    radial-gradient(circle at 50% 44%, rgba(231, 216, 178, 0.5), rgba(73, 63, 52, 0.36) 38%, rgba(28, 25, 23, 0.9) 100%),
    url("/api/sgs/asset/basic/bg.png");
  background-position: center;
  background-size: cover;
  box-shadow: none;
  overflow: hidden;
}

.sgs-table-aura {
  position: absolute;
  inset: 70px 130px 124px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(244, 231, 190, 0.2), rgba(244, 231, 190, 0.07) 36%, transparent 68%),
    repeating-radial-gradient(circle, rgba(255, 255, 255, 0.11) 0 1px, transparent 1px 22px);
  pointer-events: none;
}

.sgs-left-rail {
  position: absolute;
  z-index: 12;
  top: 84px;
  left: 18px;
  display: grid;
  gap: 8px;
  width: 58px;
}

.sgs-left-rail a,
.sgs-left-rail button {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid rgba(241, 222, 170, 0.42);
  border-radius: 4px;
  background: rgba(38, 31, 27, 0.84);
  color: #f8efd3;
  box-shadow: inset 0 0 12px rgba(255, 232, 166, 0.08), 0 8px 16px rgba(0, 0, 0, 0.2);
  font-size: 13px;
  font-weight: 1000;
  text-decoration: none;
  cursor: pointer;
}

.sgs-bgm-toggle {
  position: relative;
  isolation: isolate;
}

.sgs-bgm-toggle span {
  display: block;
  color: #ffe6a6;
  font-size: 26px;
  line-height: 1;
  transform: translateY(-1px);
}

.sgs-bgm-toggle.is-muted::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: #ffd36e;
  box-shadow: 0 0 8px rgba(255, 211, 110, 0.42);
  transform: translate(-50%, -50%) rotate(-44deg);
  transform-origin: center;
}

.sgs-table-head {
  position: absolute;
  z-index: 8;
  top: 12px;
  right: 18px;
  display: flex;
  width: min(420px, calc(100vw - 110px));
  margin: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid rgba(241, 222, 170, 0.38);
  background: rgba(34, 28, 24, 0.72);
  color: #f8efd3;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.sgs-table-head span,
.sgs-mode {
  color: #ead79b;
  font-size: 12px;
  font-weight: 1000;
}

.sgs-table-head h3 {
  margin: 2px 0 0;
  color: #fff7dd;
  font-size: 18px;
  line-height: 1.1;
}

.sgs-table-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.sgs-table-stats span {
  min-height: 23px;
  padding: 2px 7px;
  border: 1px solid rgba(241, 222, 170, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff7dd;
  font-size: 12px;
  font-weight: 900;
}

.diagnostic-message-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}

.diagnostic-message-row {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(24, 32, 37, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.diagnostic-message-row span,
.diagnostic-message-row p,
.diagnostic-message-row code {
  display: block;
}

.diagnostic-message-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.diagnostic-message-row p {
  margin: 0;
  color: #344047;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.diagnostic-message-row code {
  padding: 7px 8px;
  border: 1px solid rgba(24, 32, 37, 0.1);
  background: rgba(245, 248, 250, 0.92);
  color: #687179;
  font-size: 12px;
  font-weight: 800;
  white-space: normal;
}

.sgs-seat {
  position: absolute;
  z-index: 5;
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.sgs-seat.is-active {
  border: 0;
  box-shadow: none;
}

.sgs-seat-opponent {
  top: 70px;
  left: 50%;
  width: 560px;
  height: 226px;
  transform: translateX(-50%);
}

.sgs-seat-self {
  right: 22px;
  bottom: 14px;
  width: 332px;
  height: 350px;
}

.sgs-character-zone {
  position: relative;
  display: grid;
  width: max-content;
  grid-template-columns: max-content 138px;
  gap: 8px;
  align-items: start;
}

.sgs-seat-opponent .sgs-character-zone {
  margin: 0 auto;
  grid-template-columns: 124px 132px;
}

.sgs-role-stack {
  position: relative;
  display: grid;
  width: 118px;
  gap: 7px;
}

.sgs-seat-self .sgs-role-stack {
  width: 168px;
}

.sgs-character-card {
  --sgs-role-w: 118px;
  --sgs-role-h: 166px;
  position: relative;
  width: var(--sgs-role-w);
  height: var(--sgs-role-h);
  margin: 0;
  border: 2px solid rgba(244, 224, 168, 0.62);
  border-radius: 5px;
  background: rgba(20, 18, 16, 0.88);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.42);
  overflow: visible;
  cursor: pointer;
}

.sgs-seat-self .sgs-character-card {
  --sgs-role-w: 168px;
  --sgs-role-h: 224px;
}

.sgs-seat.is-active .sgs-character-card {
  border-color: rgba(83, 236, 103, 0.92);
  box-shadow: 0 0 0 3px rgba(83, 236, 103, 0.18), 0 0 24px rgba(83, 236, 103, 0.38);
}

.sgs-character-card > img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  object-fit: cover;
}

.sgs-card-frame {
  position: absolute;
  inset: -7px;
  background: url("/api/sgs/asset/basic/frame.png") center / 100% 100% no-repeat;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.48));
  pointer-events: none;
}

.sgs-character-name {
  position: absolute;
  z-index: 5;
  left: 7px;
  right: 7px;
  top: -32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
  padding: 3px 6px;
  border: 1px solid rgba(244, 224, 168, 0.42);
  border-radius: 4px;
  background: rgba(32, 26, 22, 0.86);
  color: #fff2c4;
  text-shadow: 0 1px 3px #000;
}

.sgs-character-name span,
.sgs-character-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sgs-character-name span {
  font-size: 10px;
  font-weight: 900;
}

.sgs-character-name strong {
  font-size: 14px;
  font-weight: 1000;
}

.sgs-seat-self .sgs-character-name strong {
  font-size: 17px;
}

.sgs-card-status {
  position: absolute;
  z-index: 6;
  right: 6px;
  bottom: 7px;
  display: grid;
  max-width: calc(100% - 48px);
  gap: 3px;
}

.sgs-card-status span {
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  justify-content: center;
  padding: 1px 5px;
  border: 1px solid rgba(255, 245, 206, 0.35);
  border-radius: 999px;
  background: rgba(26, 22, 20, 0.78);
  color: #fff4ce;
  font-size: 10px;
  font-weight: 1000;
  text-shadow: 0 1px 2px #000;
}

.sgs-card-status span.is-danger {
  border-color: rgba(245, 92, 72, 0.68);
  background: rgba(116, 37, 28, 0.84);
}

.sgs-hp-stars {
  position: absolute;
  z-index: 7;
  left: -21px;
  top: 40px;
  display: grid;
  width: 34px;
  justify-items: center;
  gap: 3px;
  padding: 4px 3px;
  border: 1px solid rgba(244, 224, 168, 0.5);
  border-radius: 14px;
  background: rgba(28, 23, 20, 0.78);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.28);
}

.sgs-seat-self .sgs-hp-stars {
  left: -24px;
  top: 54px;
  width: 38px;
}

.sgs-hp-stars strong {
  color: #fff6ce;
  font-size: 10px;
  font-weight: 1000;
  line-height: 1;
  text-shadow: 0 1px 3px #000;
}

.sgs-hp-stars div {
  display: grid;
  gap: 2px;
}

.sgs-hp-stars img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.58));
}

.sgs-seat-self .sgs-hp-stars img {
  width: 23px;
  height: 23px;
}

.sgs-hp-stars img.is-empty {
  opacity: 0.23;
  filter: grayscale(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.58));
}

.sgs-side-zones {
  display: grid;
  width: 138px;
  gap: 6px;
}

.sgs-seat-opponent .sgs-side-zones {
  width: 132px;
}

.sgs-seat-opponent .sgs-equipment-grid {
  position: absolute;
  top: 48px;
  right: calc(100% + 8px);
  width: 102px;
  gap: 4px;
  padding: 4px;
}

.sgs-seat-opponent .sgs-equip-slot {
  min-height: 31px;
}

.sgs-skill-controls,
.sgs-attached-zone,
.sgs-equipment-grid {
  border: 1px solid rgba(244, 224, 168, 0.34);
  border-radius: 5px;
  background: rgba(35, 29, 25, 0.78);
  box-shadow: inset 0 0 12px rgba(255, 232, 166, 0.06), 0 8px 14px rgba(0, 0, 0, 0.18);
}

.sgs-skill-controls {
  display: grid;
  gap: 4px;
  padding: 6px;
}

.sgs-skill-controls span,
.sgs-attached-zone > strong {
  color: #f8e6aa;
  font-size: 11px;
  font-weight: 1000;
  text-shadow: 0 1px 3px #000;
}

.sgs-skill-controls button {
  min-height: 28px;
  border: 1px solid rgba(244, 224, 168, 0.28);
  border-radius: 4px;
  background: rgba(39, 95, 68, 0.96);
  color: #fff8df;
  font-size: 12px;
  font-weight: 1000;
  cursor: pointer;
}

.sgs-attached-zone {
  position: static;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  min-height: 34px;
  gap: 4px;
  align-items: center;
  padding: 4px;
}

.sgs-attached-zone > div {
  display: flex;
  min-width: 0;
  gap: 3px;
  align-items: center;
}

.sgs-attached-card {
  position: relative;
  flex: 0 0 26px;
  width: 26px;
  height: 36px;
  margin: 0;
  border: 1px solid rgba(244, 224, 168, 0.55);
  border-radius: 3px;
  overflow: hidden;
}

.sgs-attached-card.is-selectable {
  cursor: pointer;
  border-color: rgba(94, 235, 126, 0.88);
  box-shadow: 0 0 0 2px rgba(94, 235, 126, 0.2), 0 0 12px rgba(94, 235, 126, 0.28);
}

.sgs-attached-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sgs-attached-card figcaption {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  min-height: 14px;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
  color: #fff7dd;
  font-size: 11px;
  font-weight: 1000;
  line-height: 1;
  text-align: center;
}

.sgs-equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 5px;
}

.sgs-equip-slot {
  position: relative;
  display: grid;
  min-height: 43px;
  padding: 3px 4px;
  align-content: center;
  border: 1px solid rgba(255, 245, 206, 0.3);
  border-radius: 4px;
  background: rgba(28, 24, 21, 0.74);
  color: #fff4ce;
  overflow: hidden;
}

.sgs-equip-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.72;
  object-fit: cover;
}

.sgs-equip-slot span,
.sgs-equip-slot strong {
  position: relative;
  z-index: 1;
  display: block;
  color: #fff4ce;
  line-height: 1.08;
  text-shadow: 0 1px 3px #000;
}

.sgs-equip-slot span {
  font-size: 9px;
  font-weight: 1000;
}

.sgs-equip-slot strong {
  margin-top: 1px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sgs-equip-slot:not(.has-card) strong {
  opacity: 0.58;
}

.sgs-equip-slot.has-card {
  border-color: rgba(244, 224, 168, 0.72);
}

.sgs-equip-slot.is-selectable,
.sgs-zone-target,
.sgs-play-card.is-playable .sgs-card-main {
  cursor: pointer;
  border-color: rgba(94, 235, 126, 0.88);
  box-shadow: 0 0 0 2px rgba(94, 235, 126, 0.2), 0 0 18px rgba(94, 235, 126, 0.28);
}

.sgs-opponent-hand {
  position: absolute;
  z-index: 4;
  top: 30px;
  left: calc(50% + 74px);
  display: flex;
  width: 250px;
  min-height: 92px;
  padding: 0;
  overflow: visible;
}

.sgs-self-hand {
  position: absolute;
  z-index: 7;
  left: 112px;
  right: 370px;
  bottom: 16px;
  display: flex;
  min-height: 185px;
  padding: 11px 0 0;
  overflow: visible;
}

.sgs-self-hand.is-many {
  display: grid;
  grid-template-columns: repeat(var(--sgs-hand-columns, 7), var(--sgs-card-step, 92px));
  grid-auto-rows: var(--sgs-hand-row-height, 118px);
  align-content: start;
  min-height: 250px;
  row-gap: 4px;
}

.sgs-hand .sgs-play-card {
  flex: 0 0 var(--sgs-card-step, 78px);
  width: var(--sgs-card-width, 102px);
  transition: transform 140ms ease, filter 140ms ease;
}

.sgs-hand .sgs-play-card:last-child {
  flex-basis: var(--sgs-card-width, 102px);
}

.sgs-self-hand .sgs-play-card:hover,
.sgs-self-hand .sgs-play-card:focus-within,
.sgs-play-card.is-selected {
  z-index: 10;
  transform: translateY(-12px);
}

.sgs-card-main {
  position: relative;
  width: var(--sgs-card-width, 102px);
  height: var(--sgs-card-height, 143px);
  padding: 0;
  border: 2px solid rgba(44, 34, 26, 0.86);
  border-radius: 5px;
  background: rgba(255, 249, 231, 0.92);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.sgs-card-main img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sgs-card-main span {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  display: block;
  min-height: 15px;
  padding: 1px 3px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 3px;
  background: rgba(255, 249, 231, 0.86);
  color: #1b1712;
  font-size: 9px;
  font-weight: 1000;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: none;
  white-space: nowrap;
  overflow: hidden;
}

.sgs-opponent-hand .sgs-card-main span {
  display: none;
}

.sgs-play-card.is-selected .sgs-card-main {
  border-color: rgba(255, 231, 126, 0.95);
  box-shadow: 0 0 0 3px rgba(255, 231, 126, 0.24), 0 18px 28px rgba(0, 0, 0, 0.42);
}

.sgs-card-skill,
.sgs-start-card,
.sgs-deck-pile,
.sgs-discard-pile {
  display: none !important;
}

.sgs-center {
  position: absolute;
  z-index: 6;
  top: 272px;
  left: 50%;
  display: block;
  width: min(520px, calc(100vw - 560px));
  min-width: 360px;
  transform: translateX(-50%);
}

.sgs-center-idle {
  top: 50%;
  width: min(420px, calc(100vw - 150px));
  min-width: 0;
  transform: translate(-50%, -50%);
}

.sgs-action-panel {
  display: grid;
  min-height: 112px;
  align-content: center;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid rgba(241, 222, 170, 0.38);
  border-radius: 4px;
  background: rgba(42, 34, 28, 0.76);
  color: #fff7dd;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

.sgs-center-idle .sgs-action-panel {
  min-height: 138px;
  text-align: center;
}

.sgs-table.is-mode-respond .sgs-action-panel {
  border-color: rgba(218, 78, 58, 0.72);
  box-shadow: 0 0 0 3px rgba(218, 78, 58, 0.14), 0 16px 28px rgba(0, 0, 0, 0.24);
}

.sgs-table.is-mode-target_card .sgs-action-panel,
.sgs-table.is-mode-choose_target .sgs-action-panel,
.sgs-table.is-mode-select_hand .sgs-action-panel,
.sgs-table.is-mode-choose_pending_card .sgs-action-panel {
  border-color: rgba(94, 235, 126, 0.68);
  box-shadow: 0 0 0 3px rgba(94, 235, 126, 0.12), 0 16px 28px rgba(0, 0, 0, 0.24);
}

.sgs-table.is-mode-dying .sgs-action-panel {
  border-color: rgba(221, 173, 66, 0.78);
  animation: sgsDangerPulse 1100ms ease-in-out infinite;
}

.sgs-action-panel p {
  margin: 0;
  color: #fff8df;
  font-size: 16px;
  font-weight: 1000;
  line-height: 1.42;
  text-shadow: 0 1px 3px #000;
}

.sgs-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sgs-action-buttons button,
.sgs-pending-cards button,
.sgs-discard-confirm button,
.sgs-action-link {
  display: inline-grid;
  min-height: 36px;
  place-items: center;
  padding: 5px 12px;
  border: 1px solid rgba(244, 224, 168, 0.28);
  border-radius: 4px;
  background: rgba(47, 55, 58, 0.96);
  color: #fff;
  font-size: 13px;
  font-weight: 1000;
  text-decoration: none;
}

.sgs-action-buttons button.tone-primary,
.sgs-selected-action button.tone-primary {
  background: #24764d;
}

.sgs-action-buttons button.tone-danger,
.sgs-discard-confirm button:first-of-type {
  background: #a84034;
}

.sgs-selected-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 7px;
  align-items: center;
  padding: 7px;
  border: 1px solid rgba(255, 231, 126, 0.42);
  border-radius: 4px;
  background: rgba(255, 244, 199, 0.16);
}

.sgs-selected-action.is-waiting {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.sgs-selected-action span {
  color: #f8e6aa;
  font-size: 12px;
  font-weight: 1000;
}

.sgs-selected-action strong {
  overflow: hidden;
  color: #fff8df;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sgs-selected-action button {
  min-height: 28px;
  border: 1px solid rgba(244, 224, 168, 0.3);
  border-radius: 4px;
  background: rgba(47, 55, 58, 0.96);
  color: #fff;
  font-size: 12px;
  font-weight: 1000;
}

.sgs-pending-cards {
  display: flex;
  max-height: 118px;
  gap: 8px;
  overflow: auto;
}

.sgs-pending-cards button {
  min-width: 150px;
  grid-template-columns: 44px minmax(0, 1fr);
  background: rgba(255, 248, 226, 0.92);
  color: #211a14;
}

.sgs-pending-cards img {
  width: 44px;
  height: 60px;
}

.sgs-discard-confirm {
  position: static;
  z-index: auto;
  display: flex;
  width: 100%;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid rgba(241, 222, 170, 0.38);
  border-radius: 4px;
  background: rgba(42, 34, 28, 0.92);
  color: #fff7dd;
}

.sgs-discard-confirm span {
  min-width: 0;
  margin-right: auto;
  overflow: hidden;
  font-size: 13px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sgs-judgement-dock {
  position: absolute;
  z-index: 8;
  left: 112px;
  bottom: 300px;
  display: flex;
  min-height: 44px;
  max-width: calc(100vw - 500px);
  gap: 5px;
  align-items: center;
  padding: 4px 6px;
  border: 1px solid rgba(244, 224, 168, 0.34);
  border-radius: 5px;
  background: rgba(35, 29, 25, 0.76);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.18);
}

.sgs-judgement-token {
  position: relative;
  flex: 0 0 30px;
  width: 30px;
  height: 40px;
  margin: 0;
  border: 1px solid rgba(244, 224, 168, 0.55);
  border-radius: 3px;
  overflow: hidden;
}

.sgs-judgement-token img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sgs-judgement-token figcaption {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  min-height: 15px;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
  color: #fff7dd;
  font-size: 12px;
  font-weight: 1000;
  line-height: 1;
}

.sgs-zone-more,
.sgs-zone-target {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 245, 206, 0.9);
  color: #2a211b;
  font-size: 10px;
  font-weight: 1000;
}

.sgs-zone-target {
  border: 1px solid rgba(94, 235, 126, 0.88);
}

.sgs-drawer {
  position: absolute;
  z-index: 20;
  left: 84px;
  top: 82px;
  bottom: 18px;
  width: min(520px, calc(100vw - 110px));
  padding: 14px;
  border: 1px solid rgba(24, 32, 37, 0.16);
  border-radius: 8px;
  background: rgba(250, 246, 232, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
  overflow: auto;
}

@media (max-width: 900px) {
  .sgs-table {
    min-height: 600px;
  }

  .sgs-table-head {
    left: 84px;
    right: 10px;
    width: auto;
  }

  .sgs-seat-opponent {
    top: 76px;
    width: 430px;
  }

  .sgs-center {
    top: 246px;
    width: calc(100vw - 520px);
    min-width: 300px;
  }

  .sgs-seat-self {
    right: 12px;
    width: 292px;
  }

  .sgs-seat-self .sgs-character-card {
    --sgs-role-w: 142px;
    --sgs-role-h: 206px;
  }

  .sgs-character-zone,
  .sgs-seat-opponent .sgs-character-zone {
    grid-template-columns: max-content 118px;
  }

  .sgs-side-zones,
  .sgs-seat-opponent .sgs-side-zones {
    width: 118px;
  }

  .sgs-self-hand {
    left: 78px;
    right: 322px;
  }

  .sgs-judgement-dock {
    left: 78px;
    max-width: calc(100vw - 410px);
  }
}

.sgs-center-idle .sgs-action-buttons {
  justify-content: center;
}

.sgs-center-idle .sgs-action-panel {
  justify-items: center;
}

.sgs-seat-self {
  right: 24px;
  bottom: 14px;
  width: 430px;
  height: auto;
}

.sgs-seat-opponent {
  top: 78px;
  width: 430px;
  height: auto;
}

.sgs-character-zone,
.sgs-seat-opponent .sgs-character-zone {
  position: relative;
  display: grid;
  width: max-content;
  grid-template-columns: auto;
  align-items: end;
  gap: 0;
}

.sgs-seat-self .sgs-character-zone {
  justify-items: end;
  margin-left: auto;
}

.sgs-player-frame {
  position: relative;
  display: grid;
  width: 306px;
  grid-template-rows: auto auto auto;
  gap: 7px;
  padding: 11px 11px 10px;
  border: 1px solid rgba(244, 224, 168, 0.48);
  border-radius: 8px;
  background: rgba(36, 30, 26, 0.86);
  box-shadow: inset 0 0 18px rgba(255, 232, 166, 0.08), 0 18px 34px rgba(0, 0, 0, 0.36);
}

.sgs-seat-opponent .sgs-player-frame {
  width: 244px;
  padding: 9px;
}

.sgs-role-main {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 8px;
  align-items: stretch;
}

.sgs-seat-opponent .sgs-role-main {
  grid-template-columns: 44px 1fr;
}

.sgs-role-meta {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.sgs-character-name {
  position: static;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 5px 4px;
  border: 1px solid rgba(244, 224, 168, 0.42);
  border-radius: 5px;
  background: rgba(32, 26, 22, 0.88);
  color: #fff2c4;
  text-align: center;
}

.sgs-character-name span,
.sgs-character-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sgs-character-name span {
  font-size: 10px;
}

.sgs-character-name strong {
  font-size: 15px;
}

.sgs-seat-self .sgs-character-name strong {
  font-size: 17px;
}

.sgs-hp-stars,
.sgs-seat-self .sgs-hp-stars {
  position: static;
  display: grid;
  width: auto;
  justify-items: center;
  gap: 4px;
  padding: 5px 3px;
  border: 1px solid rgba(244, 224, 168, 0.5);
  border-radius: 16px;
  background: rgba(28, 23, 20, 0.78);
}

.sgs-hp-stars strong {
  font-size: 10px;
}

.sgs-hp-stars img,
.sgs-seat-self .sgs-hp-stars img {
  width: 22px;
  height: 22px;
}

.sgs-character-card {
  --sgs-role-w: 172px;
  --sgs-role-h: 232px;
  position: relative;
  width: var(--sgs-role-w);
  height: var(--sgs-role-h);
  margin: 0;
  overflow: visible;
}

.sgs-seat-opponent .sgs-character-card {
  --sgs-role-w: 132px;
  --sgs-role-h: 178px;
}

.sgs-seat-self .sgs-character-card {
  --sgs-role-w: 172px;
  --sgs-role-h: 232px;
}

.sgs-card-status {
  display: none !important;
}

.sgs-character-card.is-tapped::after {
  content: "";
  position: absolute;
  z-index: 6;
  inset: 0;
  border-radius: 4px;
  background: rgba(42, 42, 42, 0.54);
  box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.58);
  pointer-events: none;
}

.sgs-character-card.is-chained::before {
  content: "";
  position: absolute;
  z-index: 7;
  left: 50%;
  right: auto;
  top: 50%;
  width: calc(var(--sgs-role-w) * 0.96);
  height: calc(var(--sgs-role-w) * 0.42);
  transform: translate(-50%, -50%);
  background: url("/static/assets/sgs/chain_ribbon.png") center / 100% auto no-repeat;
  filter: drop-shadow(0 4px 7px rgba(67, 35, 48, 0.45));
  pointer-events: none;
}

.sgs-hand-count-badge {
  position: absolute;
  right: -68px;
  top: 48px;
  display: grid;
  min-width: 58px;
  min-height: 32px;
  place-items: center;
  border: 1px solid rgba(244, 224, 168, 0.42);
  border-radius: 5px;
  background: rgba(32, 26, 22, 0.86);
  color: #fff2c4;
  font-size: 13px;
  font-weight: 1000;
  text-shadow: 0 1px 3px #000;
}

.sgs-seat-self .sgs-hand-count-badge {
  display: none;
}

.sgs-equipment-grid,
.sgs-seat-opponent .sgs-equipment-grid {
  position: static;
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 5px;
}

.sgs-equip-slot,
.sgs-seat-opponent .sgs-equip-slot {
  min-height: 38px;
}

.sgs-frame-zones {
  display: grid;
  gap: 6px;
}

.sgs-skill-area-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-height: 32px;
  padding: 4px 7px;
  border: 1px solid rgba(244, 224, 168, 0.34);
  border-radius: 5px;
  background: rgba(35, 29, 25, 0.82);
  color: #fff4ce;
  font-weight: 1000;
  cursor: pointer;
}

.sgs-skill-area-button strong {
  display: grid;
  min-width: 24px;
  min-height: 24px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 245, 206, 0.9);
  color: #2a211b;
}

.sgs-skill-area-button:not(.has-cards) {
  opacity: 0.78;
}

.sgs-side-zones {
  position: absolute;
  right: calc(306px + 6px);
  bottom: 8px;
  display: grid;
  width: 132px;
  gap: 6px;
}

.sgs-seat-opponent .sgs-side-zones {
  right: calc(244px + 6px);
  width: 118px;
}

.sgs-skill-controls {
  display: grid;
  gap: 5px;
  padding: 6px;
}

.sgs-skill-controls button {
  min-height: 31px;
}

.sgs-attached-zone {
  grid-template-columns: 18px minmax(0, 1fr);
}

.sgs-center:not(.sgs-center-idle) {
  top: auto;
  bottom: 238px;
  width: min(520px, calc(100vw - 620px));
  min-width: 360px;
}

.sgs-action-panel {
  min-height: 92px;
  padding: 12px 14px;
}

.sgs-action-panel p {
  font-size: 15px;
}

.sgs-action-panel.is-ended {
  border-color: rgba(221, 173, 66, 0.78);
  background: rgba(54, 37, 31, 0.9);
}

.sgs-timeout-note {
  padding: 7px 9px;
  border: 1px solid rgba(255, 231, 126, 0.28);
  border-radius: 4px;
  background: rgba(255, 244, 199, 0.13);
  color: #fff2c4;
  font-size: 12px;
  font-weight: 900;
}

.sgs-recent-events {
  display: grid;
  max-height: 78px;
  gap: 3px;
  overflow: auto;
}

.sgs-recent-events span {
  display: block;
  overflow: hidden;
  padding: 3px 6px;
  border-left: 3px solid rgba(244, 224, 168, 0.36);
  background: rgba(255, 248, 226, 0.08);
  color: #fff2c4;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sgs-recent-events span.tone-danger {
  border-left-color: rgba(229, 86, 70, 0.86);
}

.sgs-recent-events span.tone-good {
  border-left-color: rgba(94, 235, 126, 0.76);
}

.sgs-self-hand {
  left: 88px;
  right: 520px;
  bottom: 14px;
  min-height: 222px;
  padding-top: 9px;
  gap: 0;
  overflow: visible;
  z-index: 6;
}

.sgs-hand {
  gap: 0;
  overflow: visible;
}

.sgs-seat-self {
  z-index: 10;
}

.sgs-self-hand.is-many {
  display: flex;
  min-height: 222px;
}

.sgs-hand .sgs-play-card {
  flex: 0 0 var(--sgs-card-width, 136px);
  width: var(--sgs-card-width, 136px);
  margin-left: calc((var(--sgs-card-width, 136px) - var(--sgs-card-step, 64px)) * -1);
  position: relative;
  z-index: 1;
}

.sgs-hand .sgs-play-card:first-child {
  margin-left: 0;
}

.sgs-hand .sgs-play-card.is-playable {
  z-index: 3;
}

.sgs-hand .sgs-play-card.is-selected {
  z-index: 4;
}

.sgs-hand .sgs-play-card:last-child {
  flex-basis: var(--sgs-card-width, 136px);
}

.sgs-card-main {
  border: 2px solid rgba(44, 34, 26, 0.86);
  outline: 0 solid transparent;
  outline-offset: 4px;
}

.sgs-play-card.is-playable .sgs-card-main {
  border-color: rgba(44, 34, 26, 0.86);
  outline: 3px solid rgba(94, 235, 126, 0.86);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.34), 0 0 18px rgba(94, 235, 126, 0.2);
}

.sgs-play-card.is-selected .sgs-card-main {
  border-color: rgba(44, 34, 26, 0.86);
  outline: 4px solid rgba(255, 231, 126, 0.95);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.42), 0 0 22px rgba(255, 231, 126, 0.28);
}

.sgs-card-main span {
  display: none !important;
}

.sgs-judgement-dock {
  left: 88px;
  bottom: 245px;
}

.sgs-target-choice-panel {
  position: absolute;
  z-index: 8;
  top: 112px;
  left: calc(50% + 80px);
  display: grid;
  gap: 6px;
  padding: 7px 8px;
  border: 1px solid rgba(94, 235, 126, 0.7);
  border-radius: 6px;
  background: rgba(35, 29, 25, 0.78);
  box-shadow: 0 0 0 3px rgba(94, 235, 126, 0.12), 0 14px 24px rgba(0, 0, 0, 0.3);
}

.sgs-target-choice-panel span {
  color: #f8e6aa;
  font-size: 12px;
  font-weight: 1000;
}

.sgs-target-choice-panel > div {
  display: flex;
  gap: 7px;
}

.sgs-target-choice-panel button {
  width: 54px;
  height: 76px;
  padding: 0;
  border: 2px solid rgba(94, 235, 126, 0.88);
  border-radius: 5px;
  background: transparent;
  box-shadow: 0 0 14px rgba(94, 235, 126, 0.25);
  overflow: hidden;
}

.sgs-target-choice-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sgs-skill-tray {
  position: absolute;
  z-index: 16;
  right: 462px;
  bottom: 238px;
  display: grid;
  width: min(480px, calc(100vw - 570px));
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(244, 224, 168, 0.42);
  border-radius: 8px;
  background: rgba(35, 29, 25, 0.92);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.35);
}

.sgs-skill-tray header,
.sgs-role-preview header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sgs-skill-tray header strong,
.sgs-role-preview header strong {
  color: #fff2c4;
}

.sgs-skill-tray header button,
.sgs-role-preview header button {
  min-height: 28px;
  border: 1px solid rgba(244, 224, 168, 0.3);
  border-radius: 4px;
  background: rgba(47, 55, 58, 0.96);
  color: #fff;
  font-weight: 1000;
}

.sgs-skill-tray-cards {
  display: flex;
  min-height: 98px;
  gap: 8px;
  overflow-x: auto;
}

.sgs-skill-tray-cards button {
  flex: 0 0 70px;
  width: 70px;
  height: 98px;
  padding: 0;
  border: 2px solid rgba(44, 34, 26, 0.86);
  border-radius: 5px;
  background: transparent;
  overflow: hidden;
}

.sgs-skill-tray-cards button.is-selectable {
  outline: 3px solid rgba(94, 235, 126, 0.86);
  outline-offset: 3px;
}

.sgs-skill-tray-cards img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sgs-skill-tray-cards em {
  color: #f8e6aa;
  font-style: normal;
  font-weight: 1000;
}

.sgs-role-preview {
  position: absolute;
  z-index: 24;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  width: min(560px, calc(100vw - 150px));
  max-height: min(460px, calc(100vh - 80px));
  padding: 12px;
  border: 1px solid rgba(244, 224, 168, 0.42);
  border-radius: 8px;
  background: rgba(35, 29, 25, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  overflow: auto;
}

.sgs-opponent-hand {
  display: none !important;
}

.sgs-role-preview .sgs-role-info {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.sgs-role-preview .sgs-role-info img {
  width: 128px;
  height: 178px;
  aspect-ratio: auto;
  border: 1px solid rgba(244, 224, 168, 0.38);
  border-radius: 5px;
  object-fit: cover;
}

.sgs-role-preview .sgs-role-info h4 {
  color: #fff2c4;
  font-size: 18px;
}

.sgs-role-preview .sgs-role-info p,
.sgs-role-preview .sgs-role-info li {
  color: #f8e6aa;
  font-size: 13px;
  line-height: 1.55;
}

.sgs-role-preview .sgs-role-info ul {
  max-height: 270px;
  overflow: auto;
}

.sgs-center-idle .sgs-action-panel {
  justify-content: center;
}

.sgs-center-idle .sgs-action-buttons {
  width: 100%;
  justify-content: center;
}

.sgs-seat-self {
  right: 0;
  width: 454px;
}

.sgs-seat-self .sgs-player-frame {
  width: 316px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.sgs-seat-self .sgs-side-zones {
  right: calc(316px + 6px);
  bottom: 0;
  width: 132px;
}

.sgs-seat-opponent {
  top: 4px;
  width: 560px;
}

.sgs-seat-opponent .sgs-player-frame {
  width: 312px;
  padding: 10px;
}

.sgs-seat-opponent .sgs-role-main {
  grid-template-columns: 52px 1fr;
}

.sgs-seat-opponent .sgs-character-card {
  --sgs-role-w: 160px;
  --sgs-role-h: 216px;
}

.sgs-seat-opponent .sgs-side-zones {
  right: calc(312px + 6px);
  bottom: 0;
  width: 128px;
}

.sgs-self-hand {
  right: 464px;
  min-height: 244px;
  padding-top: 14px;
}

.sgs-judgement-dock {
  bottom: 268px;
}

.sgs-hp-stars,
.sgs-seat-self .sgs-hp-stars {
  padding: 5px 4px;
  border-color: rgba(255, 245, 206, 0.62);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 8px rgba(80, 54, 26, 0.14), 0 5px 12px rgba(0, 0, 0, 0.28);
}

.sgs-hp-stars strong {
  color: #20140f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.sgs-hp-stars img,
.sgs-seat-self .sgs-hp-stars img {
  width: 23px;
  height: 23px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.32));
}

.sgs-hp-stars img.is-empty {
  opacity: 0.92;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.32));
}

.sgs-card-main,
.sgs-skill-tray-cards button,
.sgs-target-choice-panel button,
.sgs-pending-cards button {
  overflow: visible;
}

.sgs-card-main img,
.sgs-skill-tray-cards img,
.sgs-target-choice-panel img,
.sgs-pending-cards img {
  object-fit: contain;
  object-position: center;
  border-radius: 3px;
  background: rgba(255, 249, 231, 0.96);
}

.sgs-play-card.is-playable .sgs-card-main {
  outline: 0;
}

.sgs-play-card.is-selected .sgs-card-main {
  outline: 0;
}

.sgs-play-card.is-playable .sgs-card-main img {
  box-shadow: 0 0 0 2px rgba(94, 235, 126, 0.95), 0 0 10px rgba(94, 235, 126, 0.55);
}

.sgs-play-card.is-selected .sgs-card-main img {
  box-shadow: 0 0 0 3px rgba(255, 231, 126, 0.98), 0 0 14px rgba(255, 231, 126, 0.62);
}

.sgs-table.is-mode-discard .sgs-center {
  z-index: 32;
}

.sgs-center {
  pointer-events: none;
}

.sgs-center button,
.sgs-center [data-sgs-action],
.sgs-center [data-sgs-confirm-selected],
.sgs-center [data-sgs-discard-confirm],
.sgs-center [data-sgs-discard-clear],
.sgs-center [data-sgs-clear-selected],
.sgs-center [data-sgs-skill-card-mode] {
  pointer-events: auto;
}

.sgs-hand {
  pointer-events: none;
}

.sgs-self-hand {
  --sgs-self-hand-left: clamp(74px, 10vw, 88px);
  --sgs-self-hand-right: clamp(8px, calc(140vw - 1252px), 520px);
  left: var(--sgs-self-hand-left);
  right: var(--sgs-self-hand-right);
  max-width: calc(100vw - var(--sgs-self-hand-left) - var(--sgs-self-hand-right) - 24px);
  z-index: 31;
  pointer-events: none;
  overflow: visible;
}

.sgs-self-hand .sgs-play-card,
.sgs-self-hand .sgs-card-main,
.sgs-opponent-hand .sgs-play-card,
.sgs-opponent-hand .sgs-card-main {
  pointer-events: auto;
}

.sgs-card-main img {
  pointer-events: none;
}

.sgs-table.is-mode-discard .sgs-self-hand {
  z-index: 31;
  left: var(--sgs-self-hand-left);
  right: var(--sgs-self-hand-right);
  display: flex;
  max-width: calc(100vw - var(--sgs-self-hand-left) - var(--sgs-self-hand-right) - 24px);
  gap: 0;
  align-items: flex-start;
  overflow: visible;
  padding: 18px 8px 18px 0;
}

.sgs-table.is-mode-discard .sgs-seat-self {
  z-index: 12;
  pointer-events: none;
}

.sgs-table.is-mode-discard .sgs-self-hand .sgs-play-card {
  position: relative;
  z-index: 1;
  flex: 0 0 var(--sgs-card-width, 136px);
  width: var(--sgs-card-width, 136px);
  margin-left: calc((var(--sgs-card-width, 136px) - var(--sgs-card-step, 64px)) * -1);
  pointer-events: auto;
}

.sgs-table.is-mode-discard .sgs-self-hand .sgs-play-card:first-child {
  margin-left: 0;
}

.sgs-table.is-mode-discard .sgs-self-hand .sgs-card-main {
  width: var(--sgs-card-width, 136px);
  height: var(--sgs-card-height, 190px);
  pointer-events: auto;
}

.sgs-table.is-mode-discard .sgs-self-hand .sgs-play-card:hover,
.sgs-table.is-mode-discard .sgs-self-hand .sgs-play-card:focus-within,
.sgs-table.is-mode-discard .sgs-self-hand .sgs-play-card.is-selected {
  z-index: 2;
  transform: translateY(-8px);
}

.sgs-resolution-stack {
  display: flex;
  min-height: 124px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px auto 10px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 238, 190, 0.55);
  border-radius: 8px;
  background: rgba(33, 22, 16, 0.38);
  box-shadow: inset 0 0 18px rgba(255, 221, 150, 0.1);
  pointer-events: none;
}

.sgs-resolution-stack.is-thinking {
  min-height: 50px;
  color: rgba(255, 246, 216, 0.88);
  font-weight: 900;
}

.sgs-resolution-card {
  position: relative;
  width: 72px;
  margin: 0;
  animation: sgs-card-resolve 760ms cubic-bezier(0.18, 0.82, 0.22, 1) both;
  animation-delay: var(--delay, 0ms);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.38));
}

.sgs-resolution-card.side-self {
  --from-y: 72px;
}

.sgs-resolution-card.side-opponent {
  --from-y: -72px;
}

.sgs-resolution-card img {
  display: block;
  width: 72px;
  height: 101px;
  object-fit: contain;
  border-radius: 4px;
}

.sgs-resolution-card span,
.sgs-resolution-card figcaption,
.sgs-resolution-skill span,
.sgs-resolution-skill strong,
.sgs-resolution-skill em,
.sgs-resolution-phase span,
.sgs-resolution-phase strong {
  display: block;
  overflow: hidden;
  color: #fff4cf;
  font-size: 10px;
  font-weight: 1000;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sgs-resolution-skill {
  position: relative;
  display: grid;
  width: 116px;
  min-height: 82px;
  align-content: center;
  gap: 4px;
  padding: 10px 9px;
  border: 1px solid rgba(255, 238, 190, 0.42);
  border-radius: 8px;
  background: linear-gradient(150deg, rgba(68, 40, 37, 0.94), rgba(28, 38, 48, 0.9));
  box-shadow: inset 0 0 16px rgba(255, 230, 170, 0.1), 0 12px 20px rgba(0, 0, 0, 0.32);
  animation: sgs-card-resolve 760ms cubic-bezier(0.18, 0.82, 0.22, 1) both;
  animation-delay: var(--delay, 0ms);
}

.sgs-resolution-skill.side-self {
  --from-y: 72px;
}

.sgs-resolution-skill.side-opponent {
  --from-y: -72px;
}

.sgs-resolution-skill strong {
  color: #ffe38a;
  font-size: 16px;
}

.sgs-resolution-skill em {
  color: rgba(255, 246, 218, 0.88);
  font-size: 11px;
  font-style: normal;
}

.sgs-resolution-skill::after {
  position: absolute;
  inset: 8px -10px;
  z-index: -1;
  border-radius: 999px;
  background: rgba(255, 198, 94, 0.36);
  content: "";
  filter: blur(14px);
}

.sgs-resolution-skill.effect-slash::after {
  background: rgba(255, 94, 72, 0.42);
}

.sgs-resolution-skill.effect-heal::after {
  background: rgba(111, 238, 153, 0.4);
}

.sgs-resolution-skill.effect-damage::after {
  background: rgba(255, 72, 72, 0.46);
}

.sgs-resolution-skill.effect-respond::after {
  background: rgba(94, 209, 255, 0.38);
}

.sgs-resolution-card::after {
  position: absolute;
  inset: 12px -14px 14px;
  z-index: -1;
  border-radius: 999px;
  content: "";
  opacity: 0.9;
  filter: blur(12px);
}

.sgs-resolution-card::before {
  position: absolute;
  inset: -20px;
  z-index: 2;
  border-radius: 10px;
  content: "";
  opacity: 0;
  pointer-events: none;
}

.sgs-resolution-card.effect-slash::after {
  background: rgba(255, 82, 54, 0.78);
}

.sgs-resolution-card.effect-slash::before {
  opacity: 1;
  background:
    linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.95) 47%, rgba(255, 70, 54, 0.95) 52%, transparent 60%),
    linear-gradient(135deg, transparent 48%, rgba(255, 40, 28, 0.8) 50%, transparent 56%);
  animation: sgs-slash-cut 920ms ease-out both;
}

.sgs-resolution-card.effect-fire::after {
  background: rgba(255, 136, 35, 0.9);
  animation: sgs-fire-pulse 900ms ease-out both;
}

.sgs-resolution-card.effect-fire::before {
  opacity: 1;
  background: radial-gradient(circle, rgba(255, 236, 126, 0.95) 0 12%, rgba(255, 96, 28, 0.78) 28%, transparent 62%);
  animation: sgs-fire-ring 1100ms ease-out both;
}

.sgs-resolution-card.effect-lightning::after {
  background: linear-gradient(135deg, rgba(122, 205, 255, 0.9), rgba(255, 255, 130, 0.86));
  animation: sgs-lightning-flash 820ms steps(2, end) both;
}

.sgs-resolution-card.effect-lightning::before {
  opacity: 1;
  background: linear-gradient(112deg, transparent 35%, rgba(255, 255, 255, 1) 40%, rgba(109, 204, 255, 0.95) 45%, transparent 53%);
  animation: sgs-lightning-bolt 1000ms steps(3, end) both;
}

.sgs-resolution-card.effect-equip::after {
  background: rgba(104, 190, 255, 0.78);
}

.sgs-resolution-card.effect-equip::before {
  opacity: 1;
  border: 2px solid rgba(134, 214, 255, 0.95);
  box-shadow: 0 0 18px rgba(134, 214, 255, 0.82), inset 0 0 14px rgba(134, 214, 255, 0.42);
  animation: sgs-equip-lock 1000ms ease-out both;
}

.sgs-resolution-card.effect-delayed::after,
.sgs-resolution-card.effect-chain::after,
.sgs-resolution-card.effect-supply::after,
.sgs-resolution-card.effect-le::after {
  background: rgba(180, 142, 255, 0.82);
}

.sgs-resolution-card.effect-delayed::before,
.sgs-resolution-card.effect-chain::before,
.sgs-resolution-card.effect-supply::before,
.sgs-resolution-card.effect-le::before {
  opacity: 1;
  border: 2px dashed rgba(220, 198, 255, 0.95);
  box-shadow: 0 0 18px rgba(172, 120, 255, 0.78);
  animation: sgs-delayed-rune 1200ms ease-out both;
}

.sgs-resolution-card.effect-heal::after {
  background: rgba(111, 238, 139, 0.82);
}

.sgs-resolution-card.effect-heal::before {
  opacity: 1;
  background:
    linear-gradient(90deg, transparent 42%, rgba(147, 255, 169, 0.95) 42% 58%, transparent 58%),
    linear-gradient(0deg, transparent 42%, rgba(147, 255, 169, 0.95) 42% 58%, transparent 58%);
  animation: sgs-heal-pop 1000ms ease-out both;
}

.sgs-resolution-card.effect-respond::after {
  background: rgba(255, 245, 144, 0.78);
}

.sgs-resolution-card.effect-respond::before {
  opacity: 1;
  border: 2px solid rgba(255, 247, 150, 0.95);
  box-shadow: 0 0 20px rgba(255, 244, 130, 0.75);
  animation: sgs-respond-shield 900ms ease-out both;
}

.sgs-resolution-card.effect-duel::after,
.sgs-resolution-card.effect-nanman::after,
.sgs-resolution-card.effect-arrows::after {
  background: rgba(255, 67, 67, 0.82);
}

.sgs-resolution-card.effect-duel::before {
  opacity: 1;
  background:
    linear-gradient(38deg, transparent 43%, rgba(255, 250, 214, 0.95) 47%, rgba(255, 74, 74, 0.92) 53%, transparent 58%),
    linear-gradient(142deg, transparent 43%, rgba(255, 250, 214, 0.95) 47%, rgba(255, 74, 74, 0.92) 53%, transparent 58%);
  animation: sgs-duel-cross 1100ms ease-out both;
}

.sgs-resolution-card.effect-nanman::before {
  opacity: 1;
  background:
    radial-gradient(circle at 50% 52%, transparent 0 24%, rgba(255, 86, 52, 0.95) 25% 32%, transparent 34%),
    radial-gradient(circle at 50% 52%, transparent 0 40%, rgba(255, 174, 82, 0.78) 41% 46%, transparent 48%);
  animation: sgs-nanman-roar 1200ms ease-out both;
}

.sgs-resolution-card.effect-arrows::before {
  opacity: 1;
  background:
    repeating-linear-gradient(100deg, transparent 0 14px, rgba(255, 244, 206, 0.96) 15px 18px, rgba(255, 80, 64, 0.8) 19px 22px, transparent 23px 36px);
  animation: sgs-arrows-rain 1100ms ease-out both;
}

.sgs-resolution-card.effect-duel {
  animation-name: sgs-card-duel;
}

.sgs-resolution-card.effect-arrows {
  animation-name: sgs-card-arrows;
}

.sgs-resolution-card.effect-wugu::after,
.sgs-resolution-card.effect-draw::after {
  background: rgba(255, 211, 88, 0.82);
}

.sgs-resolution-card.effect-dismantle::after,
.sgs-resolution-card.effect-steal::after,
.sgs-resolution-card.effect-borrow::after {
  background: rgba(114, 220, 180, 0.82);
}

.sgs-resolution-card.effect-dismantle::before,
.sgs-resolution-card.effect-steal::before,
.sgs-resolution-card.effect-borrow::before {
  opacity: 1;
  background: linear-gradient(90deg, transparent 0 22%, rgba(130, 255, 209, 0.9) 36%, transparent 52% 100%);
  animation: sgs-trick-sweep 1000ms ease-out both;
}

.sgs-resolution-card.effect-wine::after {
  background: rgba(202, 82, 168, 0.82);
}

.sgs-resolution-phase {
  min-width: 88px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 239, 195, 0.62);
  border-radius: 8px;
  background: rgba(255, 248, 226, 0.2);
  animation: sgs-card-resolve 640ms ease-out both;
  animation-delay: var(--delay, 0ms);
}

.sgs-resolution-judgement {
  position: relative;
  display: grid;
  min-width: 150px;
  max-width: 220px;
  min-height: 112px;
  padding: 10px 12px;
  place-items: center;
  border: 1px solid rgba(255, 239, 195, 0.72);
  border-radius: 8px;
  background: rgba(31, 21, 18, 0.78);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34), inset 0 0 18px rgba(255, 229, 166, 0.16);
  animation: sgs-card-resolve 720ms cubic-bezier(0.18, 0.82, 0.22, 1) both;
  animation-delay: var(--delay, 0ms);
  overflow: hidden;
}

.sgs-resolution-judgement::before {
  position: absolute;
  inset: -26px;
  content: "";
  opacity: 0.78;
  background: radial-gradient(circle, rgba(195, 157, 255, 0.72), transparent 64%);
  animation: sgs-delayed-rune 1450ms ease-out both;
}

.sgs-resolution-judgement.effect-judgement::before {
  background: radial-gradient(circle, rgba(255, 232, 144, 0.86), transparent 62%);
}

.sgs-resolution-judgement.effect-judge-pass::before {
  background: radial-gradient(circle, rgba(120, 255, 154, 0.78), transparent 62%);
}

.sgs-resolution-judgement.effect-judge-fail::before {
  background: radial-gradient(circle, rgba(255, 86, 86, 0.82), transparent 62%);
}

.sgs-resolution-judgement.effect-lightning::before {
  background: linear-gradient(112deg, transparent 35%, rgba(255, 255, 255, 0.98) 41%, rgba(109, 204, 255, 0.9) 48%, transparent 56%);
  animation: sgs-lightning-bolt 1100ms steps(3, end) both;
}

.sgs-resolution-judgement span,
.sgs-resolution-judgement strong {
  position: relative;
  z-index: 1;
  color: #fff4cf;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.78);
}

.sgs-resolution-judgement span {
  font-size: 12px;
  font-weight: 1000;
}

.sgs-resolution-judgement strong {
  font-size: 14px;
  line-height: 1.25;
}

.sgs-resolution-judgement img {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
}

@keyframes sgs-card-resolve {
  0% {
    opacity: 0;
    transform: translate3d(0, var(--from-y, 34px), 0) scale(0.86);
  }
  55% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1.08);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes sgs-fire-pulse {
  0% {
    transform: scale(0.72);
  }
  60% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes sgs-slash-cut {
  0% {
    opacity: 0;
    transform: translate(-42px, 34px) scale(0.7);
  }
  40% {
    opacity: 1;
    transform: translate(0, 0) scale(1.14);
  }
  100% {
    opacity: 0;
    transform: translate(42px, -34px) scale(1);
  }
}

@keyframes sgs-fire-ring {
  0% {
    opacity: 0;
    transform: scale(0.35);
  }
  35% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}

@keyframes sgs-lightning-bolt {
  0%,
  100% {
    opacity: 0;
  }
  20%,
  55% {
    opacity: 1;
  }
}

@keyframes sgs-equip-lock {
  0% {
    opacity: 0;
    transform: scale(1.38) rotate(8deg);
  }
  50% {
    opacity: 1;
    transform: scale(0.92) rotate(0);
  }
  100% {
    opacity: 0.35;
    transform: scale(1);
  }
}

@keyframes sgs-heal-pop {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes sgs-respond-shield {
  0% {
    opacity: 0;
    transform: scale(0.75);
  }
  45% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 0.45;
    transform: scale(1);
  }
}

@keyframes sgs-delayed-rune {
  0% {
    opacity: 0;
    transform: scale(1.35) rotate(-8deg);
  }
  45% {
    opacity: 1;
    transform: scale(0.95) rotate(0);
  }
  100% {
    opacity: 0.42;
    transform: scale(1.04) rotate(6deg);
  }
}

@keyframes sgs-duel-cross {
  0% {
    opacity: 0;
    transform: scale(0.6) rotate(-10deg);
  }
  40% {
    opacity: 1;
    transform: scale(1.08) rotate(0);
  }
  100% {
    opacity: 0.18;
    transform: scale(1) rotate(4deg);
  }
}

@keyframes sgs-nanman-roar {
  0% {
    opacity: 0;
    transform: scale(0.45);
  }
  38% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(1.78);
  }
}

@keyframes sgs-arrows-rain {
  0% {
    opacity: 0;
    transform: translateX(-34px);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(42px);
  }
}

@keyframes sgs-trick-sweep {
  0% {
    opacity: 0;
    transform: translateX(-42px) skewX(-16deg);
  }
  45% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(42px) skewX(-16deg);
  }
}

@keyframes sgs-lightning-flash {
  0%,
  100% {
    opacity: 0.72;
  }
  35% {
    opacity: 1;
  }
  60% {
    opacity: 0.45;
  }
}

@keyframes sgs-card-duel {
  0% {
    opacity: 0;
    transform: translate3d(-34px, var(--from-y, 34px), 0) rotate(-7deg) scale(0.86);
  }
  55% {
    opacity: 1;
    transform: translate3d(10px, 0, 0) rotate(5deg) scale(1.08);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0) scale(1);
  }
}

@keyframes sgs-card-arrows {
  0% {
    opacity: 0;
    transform: translate3d(42px, var(--from-y, 34px), 0) scale(0.86);
  }
  50% {
    opacity: 1;
    transform: translate3d(-12px, 0, 0) scale(1.08);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.sgs-skill-controls button {
  display: grid;
  min-height: 38px;
  align-content: center;
  gap: 1px;
  padding: 4px 5px;
  cursor: default;
}

.sgs-skill-controls button strong {
  color: inherit;
  font-size: 12px;
  font-weight: 1000;
  line-height: 1.05;
}

.sgs-skill-controls button small {
  display: block;
  overflow: hidden;
  color: rgba(255, 248, 223, 0.82);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sgs-skill-controls button.is-active-skill {
  border-color: rgba(94, 235, 126, 0.72);
  background: rgba(39, 112, 74, 0.96);
  cursor: pointer;
}

.sgs-skill-controls button.is-disabled-skill {
  background: rgba(62, 56, 50, 0.92);
  color: rgba(255, 244, 206, 0.62);
}

.sgs-skill-controls button.is-passive-skill {
  border-color: rgba(244, 224, 168, 0.22);
  background: rgba(42, 38, 34, 0.86);
  color: rgba(255, 244, 206, 0.78);
}

.sgs-target-choice-panel,
.sgs-floating-choice-panel {
  position: absolute;
  z-index: 15;
  top: auto;
  bottom: 354px;
  left: 50%;
  display: grid;
  width: min(560px, calc(100vw - 620px));
  min-width: 430px;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid rgba(94, 235, 126, 0.72);
  border-radius: 7px;
  background: rgba(35, 29, 25, 0.88);
  box-shadow: 0 0 0 3px rgba(94, 235, 126, 0.12), 0 16px 28px rgba(0, 0, 0, 0.32);
  transform: translateX(-50%);
}

.sgs-target-choice-panel span,
.sgs-floating-choice-panel > span {
  color: #f8e6aa;
  font-size: 14px;
  font-weight: 1000;
  text-shadow: 0 1px 3px #000;
}

.sgs-target-choice-panel .sgs-target-choice-title {
  display: block;
  max-width: 100%;
  line-height: 1.35;
  white-space: normal;
}

.sgs-target-choice-panel > div,
.sgs-pending-cards {
  display: flex;
  max-height: 138px;
  gap: 10px;
  overflow-x: auto;
  overflow-y: visible;
}

.sgs-target-choice-panel button {
  width: 76px;
  height: 106px;
  padding: 0;
  border: 2px solid rgba(94, 235, 126, 0.88);
  border-radius: 5px;
  background: rgba(255, 249, 231, 0.96);
  box-shadow: 0 0 14px rgba(94, 235, 126, 0.25);
}

.sgs-pending-cards button {
  min-width: 126px;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 8px;
  background: rgba(255, 248, 226, 0.94);
  color: #211a14;
}

.sgs-pending-cards img {
  width: 66px;
  height: 92px;
}

.sgs-skill-tray {
  right: 462px;
  bottom: 262px;
  width: min(520px, calc(100vw - 560px));
}

.sgs-skill-tray-cards {
  min-height: 138px;
  gap: 0;
  align-items: end;
  overflow-x: auto;
  overflow-y: visible;
}

.sgs-skill-tray-cards button {
  flex: 0 0 var(--sgs-tray-card-width, 84px);
  width: var(--sgs-tray-card-width, 84px);
  height: var(--sgs-tray-card-height, 118px);
  margin-left: calc((var(--sgs-tray-card-width, 84px) - var(--sgs-tray-card-step, 54px)) * -1);
  background: rgba(255, 249, 231, 0.96);
}

.sgs-skill-tray-cards button:first-child {
  margin-left: 0;
}

.sgs-skill-tray-cards button.is-selectable {
  outline-offset: 0;
}

.sgs-target-hint {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 225, 133, 0.55);
  border-radius: 8px;
  background: rgba(255, 246, 204, 0.92);
  color: #5d3516;
  font-size: 13px;
  font-weight: 1000;
  line-height: 1.4;
}

.sgs-seat.is-targeting-zones .sgs-player-frame {
  box-shadow:
    0 0 0 2px rgba(255, 228, 126, 0.55),
    0 0 24px rgba(255, 215, 98, 0.34),
    var(--shadow);
}

.sgs-seat.is-targeting-zones .sgs-equip-slot.has-card,
.sgs-seat.is-targeting-zones .sgs-attached-judgement.has-cards {
  border-color: rgba(255, 224, 112, 0.92);
  background: rgba(255, 246, 196, 0.24);
  box-shadow: 0 0 0 2px rgba(255, 226, 117, 0.35), 0 0 22px rgba(255, 224, 112, 0.42);
}

.sgs-seat.is-targeting-zones .sgs-equip-slot.is-selectable,
.sgs-seat.is-targeting-zones .sgs-zone-target,
.sgs-table.is-mode-target_card .sgs-target-choice-panel button {
  animation: sgs-target-pulse 1100ms ease-in-out infinite;
}

.sgs-equip-slot.is-selected,
.sgs-seat.is-targeting-zones .sgs-equip-slot.is-selected {
  border-color: rgba(255, 222, 96, 0.95);
  box-shadow: 0 0 0 3px rgba(255, 222, 96, 0.28), 0 0 20px rgba(255, 222, 96, 0.38);
}

.sgs-damage-burst {
  position: absolute;
  z-index: 12;
  left: 50%;
  top: 45%;
  min-width: 120px;
  transform: translate(-50%, -50%);
  color: #ff2a2a;
  font-size: 76px;
  font-weight: 1000;
  line-height: 1;
  text-align: center;
  text-shadow:
    0 4px 0 #fff,
    0 -2px 0 #fff,
    2px 0 0 #fff,
    -2px 0 0 #fff,
    0 9px 20px rgba(0, 0, 0, 0.68);
  pointer-events: none;
  animation: sgs-damage-burst 1450ms cubic-bezier(0.18, 0.8, 0.28, 1) var(--delay, 0ms) both;
}

.sgs-seat-opponent .sgs-damage-burst {
  min-width: 90px;
  font-size: 58px;
}

@keyframes sgs-target-pulse {
  0%,
  100% {
    filter: brightness(1);
    transform: translateY(0);
  }

  50% {
    filter: brightness(1.18);
    transform: translateY(-1px);
  }
}

@keyframes sgs-damage-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.42) rotate(-8deg);
  }

  18% {
    opacity: 1;
    transform: translate(-50%, -58%) scale(1.22) rotate(4deg);
  }

  42% {
    opacity: 1;
    transform: translate(-50%, -52%) scale(1) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -82%) scale(0.82) rotate(4deg);
  }
}
