:root {
  color-scheme: light;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --accent: #8b5cf6;
  --dark: #0f172a;
  --muted: #334155;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #22c55e;
  --success-hover: #16a34a;
  --chatgpt-a: #2f80ed;
  --chatgpt-b: #7c3aed;
  --claude: #b87355;
  --grok: #111827;
  --x-premium: #0f172a;
  --content-max: 800px;
  --inner-max: 100%;
  --radius-xl: 2rem;
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
}

html {
  scrollbar-gutter: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
textarea::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  min-height: 100vh;
  padding-top: 3.15rem;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  color: var(--dark);
  background: linear-gradient(135deg, #e8edf7 0%, #eef1f7 54%, #f5f3fb 100%);
  background-size: 300% 300%;
  animation: gradient 15s ease infinite;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  margin: 0;
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.shell {
  width: 100%;
  max-width: var(--content-max);
  margin-right: auto;
  margin-left: auto;
  padding-right: 1rem;
  padding-left: 1rem;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  padding: 0.45rem 1rem;
  border-bottom: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.brand {
  grid-column: 2;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: #111827;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.brand-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  object-fit: cover;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.nav {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.nav-link,
.lang-button,
.icon-button {
  min-height: 2.5rem;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 9999px;
  color: #334155;
  background: rgba(248, 250, 252, 0.62);
  box-shadow: 0 12px 26px -20px rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-height: 2.1rem;
  padding: 0.35rem 0.75rem;
  color: #334155;
  border-color: rgba(148, 163, 184, 0.42);
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}

.nav-link.active {
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.58);
  background: rgba(226, 232, 240, 0.78);
}

.nav-link.pending {
  color: #475569;
}

.nav-link:nth-of-type(2) {
  border-color: rgba(148, 163, 184, 0.42);
}

.nav-link:nth-of-type(2):hover {
  color: #0f172a;
  background: rgba(226, 232, 240, 0.78);
}

.nav-link:nth-of-type(3) {
  border-color: rgba(148, 163, 184, 0.42);
}

.nav-link:nth-of-type(3):hover {
  color: #0f172a;
  background: rgba(226, 232, 240, 0.78);
}

.nav-link:nth-of-type(4) {
  border-color: rgba(148, 163, 184, 0.42);
}

.nav-link:nth-of-type(4):hover {
  color: #0f172a;
  background: rgba(226, 232, 240, 0.78);
}

.nav-link:hover,
.lang-button:hover,
.icon-button:hover {
  background: rgba(226, 232, 240, 0.78);
  transform: translateY(-1px);
}

.nav-link.active:hover {
  color: #0f172a;
  background: rgba(226, 232, 240, 0.86);
}

.lang-button {
  min-width: 2.1rem;
  min-height: 2.1rem;
  margin-left: auto;
  padding: 0.35rem 0.6rem;
  font-size: 1rem;
  font-weight: 500;
  flex: 0 0 auto;
}

.icon-button {
  width: 2.5rem;
  display: grid;
  place-items: center;
}

.shell {
  margin-top: 0.35rem;
  padding: 1rem 1rem 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 20px 45px -34px rgba(15, 23, 42, 0.55);
}

.hero-card,
.workspace {
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hero-card {
  max-width: 720px;
  margin: 0 auto 0.9rem;
  padding: 1.15rem;
  text-align: center;
}

h1 {
  margin: 0;
  color: transparent;
  background: radial-gradient(circle, var(--chatgpt-a) 0%, var(--chatgpt-b) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
}

.hero-card p {
  margin: 0.5rem 0 0;
  color: #334155;
  font-size: 1rem;
  line-height: 1.5rem;
}

.hero-line {
  width: 5rem;
  height: 0.25rem;
  display: block;
  margin: 0.75rem auto 0;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.25rem auto 0;
  max-width: var(--inner-max);
}

.feature-card {
  min-height: 5rem;
  padding: 0.875rem 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.46);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  gap: 0.35rem;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.38);
}

.feature-card span {
  font-size: 1.35rem;
  line-height: 1;
}

.feature-icon {
  width: 1.45rem;
  height: 1.45rem;
  display: block;
}

.shield-icon {
  position: relative;
  border: 2px solid #64748b;
  border-bottom: 0;
  border-radius: 0.5rem 0.5rem 0.35rem 0.35rem;
  background: linear-gradient(135deg, #e2e8f0 0%, #ffffff 100%);
  transform: perspective(20px) rotateX(2deg);
}

.shield-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.52rem;
  width: 0.95rem;
  height: 0.95rem;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  border-radius: 0 0 0.32rem 0;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  transform: translateX(-50%) rotate(45deg);
}

.shield-icon::after {
  content: "";
  position: absolute;
  inset: 0.22rem 0.48rem 0.05rem;
  border-radius: 9999px;
  background: #ef4444;
  opacity: 0.85;
}

.feature-card strong {
  font-size: 0.875rem;
  font-weight: 700;
}

.guide-block {
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  max-width: var(--inner-max);
  border-top: 1px solid rgba(148, 163, 184, 0.5);
  text-align: left;
}

.guide-block p {
  margin: 0.5rem 0;
  color: #4b5563;
  font-size: 0.9375rem;
  line-height: 1.55;
  font-weight: 500;
}

.guide-block strong {
  color: #1f2937;
  font-weight: 800;
}

.guide-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.notice-block {
  margin: 0 auto 1.5rem;
  padding: 1.15rem 1.35rem;
  max-width: 700px;
  border: 2px solid #c26f09;
  border-radius: 1.25rem;
  color: #1f2937;
  background: rgba(254, 243, 199, 0.78);
  text-align: left;
}

.notice-block strong {
  display: block;
  font-size: 0.9375rem;
  line-height: 1.45;
  font-weight: 800;
}

.notice-block p {
  margin: 0.35rem 0 0;
  color: #4b5563;
  font-size: 0.875rem;
  line-height: 1.55;
  font-weight: 600;
}

.stock-list {
  min-height: 0;
  max-width: 720px;
  margin: 0 auto 0.9rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stock {
  --stock-dot: #94a3b8;
  --stock-ring: rgba(148, 163, 184, 0.2);
  width: fit-content;
  max-width: 100%;
  min-height: 2.35rem;
  padding: 0.52rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.42);
}

.stock::before {
  content: "";
  width: 0.62rem;
  height: 0.62rem;
  flex: 0 0 auto;
  border-radius: 9999px;
  background: var(--stock-dot);
  animation: stockPulse 1.8s ease-in-out infinite;
}

.stock strong {
  min-width: 0;
  color: inherit;
  font-size: 0.86rem;
  line-height: 1.2;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock.high {
  --stock-dot: #22c55e;
  --stock-ring: rgba(34, 197, 94, 0.22);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(220, 252, 231, 0.9);
}

.stock.low {
  --stock-dot: #f59e0b;
  --stock-ring: rgba(245, 158, 11, 0.22);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.48);
  background: rgba(254, 243, 199, 0.92);
}

.stock.none {
  --stock-dot: #ef4444;
  --stock-ring: rgba(239, 68, 68, 0.22);
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(254, 226, 226, 0.92);
}

@keyframes stockPulse {
  0%,
  100% {
    transform: scale(0.86);
    box-shadow: 0 0 0 0 var(--stock-ring);
    opacity: 0.82;
  }

  50% {
    transform: scale(1);
    box-shadow: 0 0 0 0.45rem rgba(255, 255, 255, 0);
    opacity: 1;
  }
}

.workspace {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.15rem;
  overflow-anchor: none;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 0;
  margin: 0 auto 2rem;
  padding: 0.5rem 0.75rem 0;
  max-width: 100%;
  position: relative;
}

.step {
  width: auto;
  min-width: 0;
  min-height: 4.6rem;
  padding: 0;
  border: 0;
  color: #475569;
  background: transparent;
  position: relative;
  isolation: isolate;
}

.step:not(:last-child)::after {
  content: "";
  width: 100%;
  height: 0.1875rem;
  position: absolute;
  left: 50%;
  top: 1.125rem;
  z-index: 0;
  transform: none;
  background: #c9c7bf;
}

.step span,
.step strong {
  position: relative;
  z-index: 2;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.step::before {
  content: none;
}

.step span {
  width: 2.25rem;
  height: 2.25rem;
  margin: 0 auto 0.65rem;
  border: 2px solid #c9c7bf;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
  background: #e5e7eb;
  font-size: 0.95rem;
  line-height: 1;
  font-weight: 800;
}

.step strong {
  margin-bottom: 0;
  color: inherit;
  font-size: 0.8125rem;
  line-height: 1.15rem;
  font-weight: 800;
}

.step.active,
.step.done {
  color: var(--primary);
}

.step.done:not(:last-child)::after {
  background: var(--primary);
}

.step.active span,
.step.done span {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
}

.panel {
  padding: 0;
  overflow-anchor: none;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.field {
  display: block;
  margin: 0 0 1.5rem;
}

.field > span {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
}

.field em {
  margin-left: 0.25rem;
  color: var(--danger);
  font-style: normal;
}

.field-icon {
  margin-right: 0.25rem;
  color: var(--warning);
}

.lock-icon {
  margin-right: 0.25rem;
  color: var(--accent);
}

input[type="text"],
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.875rem;
  padding: 0.75rem;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.9);
  outline: none;
  font-size: 1rem;
  line-height: 1.5rem;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

textarea {
  min-height: 10.5rem;
  resize: vertical;
  font-size: 0.9375rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

input::placeholder,
textarea::placeholder {
  color: #64748b;
  opacity: 1;
}

input[type="text"]:focus,
textarea:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--primary);
}

textarea,
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.primary-button,
.secondary-button,
.success-button,
.action-button {
  min-height: 44px;
  border: 0;
  border-radius: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 500;
  transition: opacity 0.3s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.primary-button,
.success-button {
  width: 100%;
  padding: 0.75rem 1rem;
  color: #fff;
}

.primary-button {
  background: var(--primary);
}

.primary-button:hover,
.success-button:hover {
  opacity: 0.9;
}

.success-button {
  background: var(--success);
}

.secondary-button {
  padding: 0.75rem 1rem;
  color: #1e293b;
  background: #e2e8f0;
}

.secondary-button:hover {
  background: #cbd5e1;
}

.button-row {
  display: flex;
  gap: 1rem;
}

.button-row .secondary-button {
  width: 33.333333%;
}

.button-row .primary-button,
.button-row .success-button {
  width: 66.666667%;
}

.button-icon {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid currentColor;
  border-radius: 9999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.75rem;
}

.card-query {
  width: 100%;
  max-width: 720px;
  margin: 0.8rem auto 0;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.42);
  overflow: hidden;
}

.card-query summary {
  min-height: 3rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.card-query summary::-webkit-details-marker {
  display: none;
}

.card-query summary::after {
  content: "▾";
  color: #64748b;
  font-size: 0.8rem;
  transition: transform 0.15s ease;
}

.card-query[open] summary::after {
  transform: rotate(180deg);
}

.card-query-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  padding: 0 1rem 1rem;
  align-items: start;
}

.card-query-body .secondary-button {
  min-width: 5.5rem;
}

.query-textarea {
  min-height: 3rem;
  max-height: 8rem;
  overflow: auto;
  resize: vertical;
  font-size: 0.95rem;
}

.query-result {
  grid-column: 1 / -1;
  padding: 0.45rem 0.65rem;
  border-radius: 0.75rem;
  color: #64748b;
  background: rgba(255, 255, 255, 0.42);
  font-size: 0.8375rem;
  line-height: 1.4;
  font-weight: 600;
}

.query-result.success {
  color: #047857;
  background: rgba(220, 252, 231, 0.6);
}

.query-result.error {
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.62);
}

.query-result.empty {
  color: #64748b;
  background: rgba(248, 250, 252, 0.72);
}

.query-result.detailed {
  padding: 0;
  color: #0f172a;
  background: transparent;
}

.query-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  width: 100%;
}

.query-filters {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.45rem;
  min-width: 0;
}

.query-filter,
.query-copy,
.query-copy-all {
  border: 0;
  border-radius: 9999px;
  font-weight: 800;
  cursor: pointer;
}

.query-filter {
  padding: 0.4rem 0.65rem;
  color: #475569;
  background: #eef2f7;
  font-size: 0.78rem;
}

.query-filter.active {
  color: #fff;
  background: var(--primary);
}

.query-copy,
.query-copy-all {
  padding: 0.42rem 0.7rem;
  color: var(--primary);
  background: #eff6ff;
  font-size: 0.8rem;
  white-space: nowrap;
}

.query-copy-all {
  flex: 0 0 auto;
  margin-left: auto;
}

.query-copy:hover,
.query-copy-all:hover {
  background: #dbeafe;
}

.query-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 0.875rem;
  background: rgba(255, 255, 255, 0.62);
  scrollbar-width: none;
}

.query-table-wrap::-webkit-scrollbar {
  display: none;
}

.query-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.84rem;
  line-height: 1.35;
  table-layout: fixed;
}

.query-col-card {
  width: 9.4rem;
}

.query-col-status {
  width: 5.4rem;
}

.query-col-time {
  width: 11.8rem;
}

.query-col-account {
  width: auto;
}

.query-table th,
.query-table td {
  padding: 0.78rem 0.65rem;
  text-align: center;
  vertical-align: middle;
}

.query-table th {
  color: #64748b;
  background: rgba(241, 245, 249, 0.85);
  font-weight: 800;
}

.query-table td {
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  color: #334155;
  overflow-wrap: normal;
}

.query-table td:nth-child(3) {
  overflow-wrap: anywhere;
}

.query-table code,
.query-card-item code {
  color: #020617;
  font-weight: 800;
  word-break: normal;
}

.query-key-copy {
  display: inline-flex;
  max-width: 100%;
  justify-content: center;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: center;
}

.query-key-copy code {
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.query-key-copy:hover code {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 0.15rem;
}

.query-time {
  display: inline-flex;
  align-items: baseline;
  flex-direction: row;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.query-card-item .query-time {
  justify-content: flex-start;
  white-space: normal;
  flex-wrap: wrap;
}

.query-card-item code {
  word-break: break-all;
}

.query-time small {
  color: #64748b;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 700;
}

.query-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.query-badge.normal {
  color: #166534;
  background: #dcfce7;
}

.query-badge.used {
  color: #475569;
  background: #f1f5f9;
}

.query-badge.stopped {
  color: #92400e;
  background: #fef3c7;
}

.query-badge.invalid {
  color: #991b1b;
  background: #fee2e2;
}

.query-card-list {
  display: none;
  gap: 0.65rem;
}

.query-card-item {
  padding: 0.8rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 0.875rem;
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.query-card-item > div {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.query-card-item p {
  margin: 0.35rem 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
}

.query-card-item strong {
  color: #0f172a;
}

.token-info {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 1px solid #bfdbfe;
  border-radius: 1rem;
  color: #2563eb;
  background: #eff6ff;
}

.token-info-title {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: #1d4ed8;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
}

.info-icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 9999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.75rem;
  line-height: 1;
}

.token-info p {
  margin: 0.25rem 0 0 1.75rem;
  color: #2563eb;
  font-size: 0.875rem;
  line-height: 1.25rem;
  word-break: break-all;
}

.token-info code {
  font-weight: 500;
}

.action-steps {
  display: block;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.action-label {
  min-width: 7.75rem;
  margin-right: 0;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
}

.bolt-icon {
  width: 1.25rem;
  margin-right: 0.25rem;
  color: var(--primary);
  font-size: 1.5rem;
  line-height: 1;
  text-align: center;
}

.action-button {
  min-width: 0;
  padding: 0.5rem 1.25rem;
  border-radius: 0.75rem;
  color: #fff;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
}

.action-button-login {
  background: var(--success);
}

.action-button-login:hover {
  background: var(--success-hover);
}

.action-button-token {
  background: var(--primary);
}

.action-button-token:hover {
  background: var(--primary-hover);
}

.button-glyph {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: currentColor;
  line-height: 1;
}

.button-glyph svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.warning-hint {
  margin: -0.25rem 0 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  color: #a16207;
  font-size: 0.875rem;
  line-height: 1.35;
  font-weight: 600;
}

.warning-icon {
  flex: 0 0 auto;
  color: #b45309;
  font-size: 1rem;
  line-height: 1.2;
}

.confirm-card {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #86efac;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.74);
}

.confirm-title {
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 700;
}

.confirm-grid {
  display: grid;
  gap: 0.75rem;
}

.confirm-grid span,
.confirm-grid strong,
.confirm-grid code {
  min-width: 0;
  font-size: 1rem;
  line-height: 1.5rem;
}

.confirm-grid span {
  color: #334155;
  font-weight: 500;
}

.confirm-grid strong,
.confirm-grid code {
  color: #020617;
  font-weight: 700;
  text-align: right;
  word-break: break-all;
}

.confirm-grid {
  grid-template-columns: minmax(7rem, auto) minmax(0, 1fr);
  align-items: center;
}

.status-panel,
.alert {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid transparent;
}

.status-panel strong {
  display: block;
  margin-bottom: 0.125rem;
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 700;
}

.status-panel p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5rem;
}

.alert.error,
.status-panel.failed {
  color: #b91c1c;
  background: #fef2f2;
}

.alert.error {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-color: rgba(248, 113, 113, 0.28);
  text-align: center;
  box-shadow: 0 0.75rem 1.5rem rgba(185, 28, 28, 0.06);
}

.alert.warning {
  color: #a16207;
  background: #fefce8;
}

.alert.info,
.status-panel.processing {
  color: #1e40af;
  background: #eff6ff;
}

.alert.success,
.status-panel.success {
  color: #166534;
  background: #dcfce7;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.28);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(22rem, 100%);
  position: relative;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 1.25rem;
  color: #1e40af;
  background: rgba(239, 246, 255, 0.96);
  box-shadow: 0 20px 50px -24px rgba(15, 23, 42, 0.5);
  text-align: center;
}

.modal-card strong {
  display: block;
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 800;
}

.site-footer {
  width: min(720px, calc(100% - 2rem));
  max-width: 720px;
  margin: 1.4rem auto 2rem;
  padding: 0.25rem 0 0;
  color: #64748b;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  font-weight: 600;
}

.site-footer p + p {
  margin-top: 0.15rem;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 500;
}

:root[data-theme="dark"] {
  color-scheme: light;
}

@media (min-width: 640px) {
  .shell {
    padding: 2rem 2rem 2.75rem;
  }

  .topbar {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }

  .hero-card {
    margin-bottom: 0.9rem;
    padding: 1.55rem 1.75rem;
  }

  h1 {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }

  .hero-card p {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }

  .guide-block p,
  .notice-block p {
    font-size: 0.9375rem;
    line-height: 1.55;
  }

  .hero-line {
    width: 6rem;
    margin-top: 1rem;
  }

  .workspace {
    padding: 1.55rem 1.75rem;
  }

  .steps {
    margin-bottom: 1.55rem;
  }

  .step {
    min-height: 4.75rem;
  }

  .step span {
    width: 2.35rem;
    height: 2.35rem;
  }

  .step strong {
    font-size: 0.875rem;
    line-height: 1.25rem;
  }

  .token-info {
    padding: 1rem;
  }

  .confirm-card {
    padding: 1.25rem;
  }
}

@media (max-width: 640px) {
  body {
    padding-top: 2.95rem;
    font-size: 15px;
  }

  .shell {
    margin-top: 0.2rem;
    padding: 0.75rem 0.75rem 1.15rem;
    border-radius: 1.25rem;
  }

  .topbar {
    padding: 0.45rem 0.75rem;
  }

  .nav {
    justify-content: flex-start;
    gap: 0.375rem;
  }

  .nav-link {
    min-height: 2rem;
    padding: 0.3rem 0.5rem;
    font-size: 0.68rem;
  }

  .lang-button {
    min-width: 2rem;
    min-height: 2rem;
    padding: 0.3rem 0.45rem;
    font-size: 0.95rem;
  }

  .hero-card {
    padding: 1rem;
    border-radius: 1.25rem;
  }

  h1 {
    font-size: 1.75rem;
    line-height: 2.1rem;
  }

  .hero-card > p {
    font-size: 0.9375rem;
    line-height: 1.45rem;
  }

  .feature-grid {
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .feature-card {
    min-height: 3.75rem;
    padding: 0.625rem 0.25rem;
  }

  .feature-card span {
    font-size: 1.1rem;
  }

  .feature-card strong {
    font-size: 0.75rem;
  }

  .guide-block {
    margin-top: 1rem;
    padding-top: 0.75rem;
  }

  .guide-block p {
    margin: 0.375rem 0;
    font-size: 0.8125rem;
    line-height: 1.45;
  }

  .guide-actions {
    grid-template-columns: 1fr;
    gap: 0.625rem;
  }

  .notice-block {
    margin-bottom: 0.875rem;
    padding: 0.75rem;
    border-radius: 1rem;
  }

  .notice-block strong,
  .notice-block p {
    font-size: 0.8125rem;
    line-height: 1.45;
  }

  .stock-list {
    margin-bottom: 0.9rem;
  }

  .workspace {
    padding: 1rem;
    border-radius: 1.25rem;
  }

  .panel {
    overflow-anchor: none;
  }

  .steps {
    gap: 0;
    margin-bottom: 1.25rem;
    padding: 0.25rem 0.2rem 0;
  }

  .step {
    min-height: 3.9rem;
    padding: 0;
  }

  .step:not(:last-child)::after {
    display: block;
    top: 0.95rem;
  }

  .step span {
    width: 1.9rem;
    height: 1.9rem;
    margin: 0 auto 0.45rem;
    font-size: 0.8125rem;
    line-height: 1;
  }

  .step strong {
    max-width: 4.25rem;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1rem;
  }

  input[type="text"] {
    font-size: 16px;
  }

  textarea {
    min-height: 9.25rem;
    font-size: 0.8125rem;
    line-height: 1.5;
  }

  .action-row {
    align-items: center;
    gap: 0.5rem;
  }

  .action-label {
    min-width: 5rem;
    margin-right: 0;
  }

  .action-button {
    flex: 1 1 auto;
    min-height: 2.75rem;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    white-space: normal;
  }

  .card-query summary {
    min-height: 2.7rem;
    padding: 0.65rem 0.75rem;
    font-size: 0.8375rem;
  }

  .card-query-body {
    grid-template-columns: 1fr;
    gap: 0.625rem;
    padding: 0 0.75rem 0.75rem;
  }

  .card-query-body .secondary-button {
    width: 100%;
  }

  .query-textarea {
    min-height: 3rem;
    max-height: 6.5rem;
    font-size: 0.9rem;
  }

  .query-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .query-filters {
    justify-content: flex-start;
  }

  .query-copy-all {
    width: 100%;
    margin-left: 0;
  }

  .query-table-wrap {
    display: none;
  }

  .query-card-list {
    display: grid;
  }

  .query-card-item > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .warning-hint {
    font-size: 0.8125rem;
  }

  .button-row {
    gap: 0.75rem;
  }

  .primary-button,
  .secondary-button,
  .success-button {
    white-space: normal;
    text-align: center;
  }

  .confirm-grid {
    grid-template-columns: 1fr;
    gap: 0.125rem;
  }

  .confirm-grid strong,
  .confirm-grid code {
    margin-bottom: 0.5rem;
    text-align: left;
  }
}
