:root {
  --bg: #FFFAF6;
  --panel: #FFFFFF;
  --muted: #999;
  --text: #1A1A1A;
  --primary: #E8651A;
  --primary-700: #C4520E;
  --border: #F0EAE2;
}

* { 
  box-sizing: border-box; 
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans,
    Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: #FFFAF6;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

/* Marketing mode: fully independent full-width layout */
.card.marketing-card {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  margin-bottom: 0;
  background: white;
  border-bottom: 1px solid #F0EAE2;
}

.header-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.title { 
  font-size: 18px; 
  font-weight: 700; 
  letter-spacing: .4px; 
}

.header-title-group .subtitle {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

.language-switcher-container {
  display: flex;
  align-items: center;
  margin-left: 8px;
}

.muted { 
  color: var(--muted); 
  font-size: 13px; 
}

.list { 
  padding: 10px; 
}

.list-item { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 14px 16px; 
  border-top: 1px solid var(--border); 
}

.list-item:first-child { 
  border-top: 0; 
}

.btn {
  background: var(--primary);
  color: #fff;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(232,101,26,0.25);
  transition: transform .06s ease, filter .2s ease;
}

.btn:hover { 
  filter: brightness(1.05); 
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.3);
  box-shadow: none;
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.3);
  box-shadow: none;
  pointer-events: auto;
}

.btn.secondary {
  background: #F5F0EB;
  color: #1A1A1A;
  box-shadow: none;
  border: 1px solid #F0EAE2;
}

.form { 
  padding: 18px; 
  border-top: 1px solid var(--border); 
}

.field { 
  margin-bottom: 14px; 
}

.label { 
  display: block; 
  font-size: 13px; 
  color: var(--muted); 
  margin-bottom: 8px; 
}

.input, .textarea {
  width: 100%;
  background: #F9F6F2;
  color: var(--text);
  border: 1px solid #F0EAE2;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.input:focus, .textarea:focus {
  border-color: #E8651A;
  box-shadow: 0 0 0 3px rgba(232,101,26,0.12);
}

.textarea { 
  min-height: 90px; 
  resize: vertical; 
}

.row { 
  display: flex; 
  gap: 10px; 
  align-items: center; 
}

.row .input { 
  flex: 1; 
}

.row .btn { 
  flex: 1; 
}

.preview { 
  padding: 16px; 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
  gap: 12px; 
}

.imgbox {
  background: #F9F6F2;
  border: 1px solid #F0EAE2;
  border-radius: 12px;
  overflow: hidden;
}

.imgbox img { 
  width: 100%; 
  display: block; 
}

.status { 
  padding: 10px 16px; 
  border-top: 1px solid var(--border); 
  color: var(--muted); 
  font-size: 13px; 
}

.danger {
  color: #dc2626;
}

/* Login Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: white;
  border: 1px solid #F0EAE2;
  border-radius: 14px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
}

.modal-close:hover {
  color: var(--text);
}

/* Sticky header inside scrollable modal (.modal with overflow-y:auto):
   Change the close button (position:absolute) wrapper from relative to sticky,
   so header with × always sticks to scroll container top, preventing close button from scrolling out of view. */
.modal-sticky-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: white;
}

.modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.modal-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.modal-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.modal-tab:hover {
  color: var(--text);
}

/* API Token section styles */
.api-token-section {
  padding: 16px 0;
}

.api-token-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.05);
  border-radius: 8px;
  font-family: monospace;
  font-size: 14px;
  word-break: break-all;
}

.api-token-masked {
  color: var(--text);
  letter-spacing: 1px;
  font-weight: 500;
}

.api-token-hint {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f0f9ff;
  border-left: 3px solid #0ea5e9;
  border-radius: 4px;
  font-size: 13px;
  color: var(--muted);
}

.api-token-new-section {
  margin-bottom: 20px;
}

.api-token-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* API Token new UI styles */
.api-token-success,
.api-token-empty,
.api-token-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(232,101,26,0.08) 0%, rgba(232,101,26,0.03) 100%);
  border-radius: 12px;
  margin-bottom: 16px;
}

.api-token-empty {
  background: linear-gradient(135deg, rgba(59,130,246,0.1) 0%, rgba(59,130,246,0.05) 100%);
}

.api-token-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.api-token-icon.success {
  color: #E8651A;
}

.api-token-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.api-token-desc {
  font-size: 13px;
  color: var(--muted);
}

.code-btn {
  background: var(--primary);
  color: #fff;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.2s;
}

.code-btn:hover {
  filter: brightness(1.05);
}

.code-btn:disabled {
  background: #E5E1DC;
  color: #999;
  cursor: not-allowed;
}

/* User Info Styles */
.user-info-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.user-agent-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-phone {
  font-size: 14px;
  color: var(--muted);
}


.agent-connection-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 4px;
}

.agent-connection-desc,
.agent-connection-warning {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.agent-connection-warning {
  padding: 10px 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.08);
  border-radius: 8px;
}

.agent-connection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.agent-connection-grid code {
  display: block;
  padding: 8px 10px;
  background: #F9F6F2;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  word-break: break-all;
}

.agent-connection-text {
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
}

/* Agent default model (CLI preference, simplified UI version) */
.cli-media-pref-panel {
  gap: 14px;
}

.cli-media-pref-intro {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(232, 101, 26, 0.18);
  border-radius: 10px;
  background: rgba(232, 101, 26, 0.06);
}

.cli-media-pref-intro-title {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.cli-media-pref-intro-desc {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.cli-media-pref-intro-desc strong {
  color: var(--text);
  font-weight: 600;
}

.cli-media-pref-world {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cli-media-pref-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel, #fff);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.cli-media-pref-select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.cli-media-pref-subhint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.cli-media-pref-loading,
.cli-media-pref-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.cli-media-pref-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cli-media-pref-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #FAFAF8;
}

.cli-media-pref-row-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.cli-media-pref-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.cli-media-pref-row-head .label {
  margin: 0;
  font-size: 13px;
}

.cli-media-pref-save-state {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1.4;
  padding-top: 1px;
}

.cli-media-pref-save-state.saving {
  color: var(--muted);
}

.cli-media-pref-save-state.saved {
  color: #E8651A;
}

.cli-media-pref-row-error {
  margin: 0;
  color: #dc2626;
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 640px) {
  header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
  }

  .agent-connection-grid {
    grid-template-columns: 1fr;
  }

  .user-info-wrapper {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  .user-agent-row {
    gap: 6px;
  }

  .computing-power-display {
    gap: 6px;
    font-size: 12px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
  }

  .header-title-group .subtitle {
    display: none;
  }

  .title {
    font-size: 16px;
  }

  header > div:last-child {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
  }
}

.computing-power-display {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
}

.computing-power-value {
  color: var(--primary);
  font-weight: 600;
}

.refresh-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 2px 6px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: all 0.2s;
}

.refresh-btn:hover {
  background: #F5F0EB;
  color: var(--text);
  border-color: var(--primary);
}

.checkin-badge {
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  background: transparent;
  color: var(--primary);
  border: none;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 4px;
  flex-shrink: 0;
  padding: 0 6px;
  white-space: nowrap;
}

.checkin-badge.checked {
  color: var(--primary);
  cursor: default;
}

.checkin-badge:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.checkin-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  background: white;
  border: 1px solid #F0EAE2;
  border-radius: 10px;
  padding: 14px 18px;
  color: #1A1A1A;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  max-width: 260px;
  animation: slideInRight 0.3s ease;
  cursor: pointer;
}

.checkin-toast-title {
  font-size: 15px;
  font-weight: 600;
  color: #a78bfa;
}

.checkin-toast-sub {
  font-size: 13px;
  color: #1A1A1A;
  margin-top: 4px;
}

.checkin-toast-next {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.refresh-btn:active {
  transform: rotate(180deg);
}

/* Prevent template flashing before Vue initializes */
[v-cloak] {
  display: none !important;
}

/* Terms of Service Styles */
.terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  margin-bottom: 12px;
}

.terms-checkbox input[type="checkbox"] {
  margin-top: 2px;
  cursor: pointer;
}

.terms-link {
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
}

.terms-link:hover {
  color: #C4520E;
}

.terms-modal {
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
}

.terms-content {
  padding: 16px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
}

.terms-content h1 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--primary);
}

.terms-content h2 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 12px;
  color: var(--text);
}

.terms-content strong {
  color: var(--primary);
  font-weight: 600;
}

/* Invite Code Styles */
.clickable {
  cursor: pointer;
  transition: color 0.2s;
}

.clickable:hover {
  color: var(--primary);
}

.invite-modal {
  position: relative;
  max-width: 500px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  scrollbar-width: none;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(232,101,26,0.06), transparent 34%),
    white;
}

.invite-modal::-webkit-scrollbar {
  display: none;
}

.invite-modal-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid #F0EAE2;
}

.invite-modal-eyebrow {
  color: #E8651A;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.invite-modal-title {
  color: #1A1A1A;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.invite-modal-body {
  padding: 20px 24px 24px;
}

.invite-user-card,
.invite-stat-card,
.commission-balance-card,
.commission-withdraw-form,
.commission-rate-card,
.commission-record-item {
  background: #F9F6F2;
  border: 1px solid #F0EAE2;
  box-shadow: none;
}

.invite-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.invite-user-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  background: var(--primary);
}

.invite-user-info {
  min-width: 0;
}

.invite-user-name {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-user-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-pass {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 18px 18px 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(232,101,26,0.2);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(232,101,26,0.06), transparent 34%, rgba(232,101,26,0.04)),
    #FFF8F3;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.invite-pass::before,
.invite-pass::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  transform: translateY(-50%);
}

.invite-pass::before {
  left: -11px;
}

.invite-pass::after {
  right: -11px;
}

.invite-pass-label {
  color: #E8651A;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.invite-pass-code {
  color: var(--primary);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: clamp(26px, 7vw, 38px);
  font-weight: 900;
  letter-spacing: 0.22em;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-indent: 0.22em;
}

.invite-pass-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 10px;
}

.invite-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.invite-stat-card {
  position: relative;
  border-radius: 12px;
  padding: 13px;
  text-align: center;
}

.invite-stat-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 5px;
}

.invite-stat-value {
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
}

.invite-stat-value span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-left: 4px;
}

.invite-reward-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(232, 101, 26, 0.26);
  border-radius: 12px;
  background: rgba(232, 101, 26, 0.08);
}

.invite-reward-mark {
  flex: 0 0 auto;
  min-width: 48px;
  padding: 7px 8px;
  border-radius: 10px;
  color: #fff;
  background: var(--primary);
  font-weight: 900;
  text-align: center;
}

.invite-reward-title {
  color: #E8651A;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.invite-reward-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 2px;
}

.invite-reward-desc strong {
  color: var(--primary);
}

.invite-copy-btn,
.commission-withdraw-btn,
.commission-confirm-btn,
.commission-save-btn {
  width: 100%;
}

.invite-copy-btn {
  padding: 13px;
  border-radius: 12px;
  font-size: 15px;
}

.commission-panel {
  margin-top: 22px;
}

.commission-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: #666;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.commission-divider::before,
.commission-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(203, 213, 225, 0.35);
}

.commission-balance-card,
.commission-withdraw-form,
.commission-rate-card {
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 14px;
}

.commission-balance-main,
.commission-section-head,
.commission-record-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.commission-balance-main {
  margin-bottom: 12px;
}

.commission-balance-main span,
.commission-section-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.commission-balance-main strong {
  color: #f59e0b;
  font-size: 28px;
  line-height: 1;
}

.commission-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #F0EAE2;
}

.commission-mini-grid div {
  text-align: center;
}

.commission-mini-grid span,
.commission-record-time {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.commission-mini-grid strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  margin-top: 3px;
}

.commission-withdraw-btn {
  margin-bottom: 16px;
}

.commission-link-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 4px 0;
}

.commission-link-btn:hover {
  color: var(--text);
}

.commission-method-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.commission-method-tabs button {
  padding: 8px;
  border: 1px solid #F0EAE2;
  border-radius: 10px;
  background: #F9F6F2;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.commission-method-tabs button.active {
  border-color: #E8651A;
  background: rgba(232,101,26,0.08);
  color: #E8651A;
}

.commission-field-group {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.commission-withdraw-form .input {
  background: #F9F6F2;
  color: var(--text);
  border-color: #F0EAE2;
  margin-bottom: 10px;
}

.commission-confirm-btn {
  margin-top: 0;
}

.commission-section-head strong {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 999px;
  color: #E8651A;
  background: rgba(232,101,26,0.08);
  font-size: 13px;
}

.commission-rate-range {
  width: 100%;
  margin: 10px 0 6px;
  accent-color: #E8651A;
}

.commission-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin-bottom: 10px;
}

.commission-save-btn {
  color: #E8651A;
  border: 1px solid #E8651A;
  background: rgba(232,101,26,0.05);
}

.commission-record-title {
  color: #1A1A1A;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 9px;
}

.commission-empty {
  color: #999;
  font-size: 12px;
  padding: 8px 0;
}

.commission-record-list {
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: none;
  padding-right: 2px;
}

.commission-record-list::-webkit-scrollbar {
  display: none;
}

.commission-record-item {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
}

.commission-record-user {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.commission-record-time {
  margin-top: 2px;
}

.commission-record-amount {
  color: #E8651A;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 520px) {
  .invite-modal {
    width: calc(100% - 20px);
  }

  .invite-modal-header,
  .invite-modal-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .invite-pass-code {
    letter-spacing: 0.14em;
    text-indent: 0.14em;
  }

  .commission-balance-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

/* Invite Tip in Register Form */
.invite-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(232, 101, 26, 0.1);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  font-size: 13px;
}

.tip-icon {
  font-size: 16px;
  line-height: 1;
}

.tip-text {
  color: var(--muted);
  line-height: 1.4;
}

.tip-text strong {
  color: var(--primary);
  font-weight: 600;
}

/* Progress bar styles */
.progress-container {
  margin-top: 16px;
  width: 100%;
}

.progress-bar-wrapper {
  width: 100%;
  height: 24px;
  background: #F5F0EB;
  border: 1px solid #F0EAE2;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #E8651A, #C4520E);
  border-radius: 12px;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-text {
  text-align: center;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}



.progress-time {
  font-weight: 600;
  color: var(--primary);
}

/* Scene layout with textarea on the left */
.scene-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.scene-textarea-left {
  flex: 1;
  min-width: 0;
}

.scene-buttons-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

/* Video Results Styles */
.results {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.result-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.result-item .btn {
  margin-top: 8px;
  width: 100%;
  max-width: 240px;
}

.btn-full {
  width: 100%;
  display: inline-flex;
  justify-content: center;
}

/* Package List Styles */
.package-intro {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #F0EAE2;
}

.package-intro-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px 0;
}

.package-intro-subtext {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.package-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.package-item {
  position: relative;
  background: linear-gradient(135deg, rgba(232, 101, 26, 0.08) 0%, rgba(232, 101, 26, 0.03) 100%);
  border: 2px solid rgba(232, 101, 26, 0.25);
  border-radius: 14px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.package-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(232, 101, 26, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.package-item:hover::before {
  opacity: 1;
}

.package-item:hover {
  background: linear-gradient(135deg, rgba(232, 101, 26, 0.15) 0%, rgba(232, 101, 26, 0.08) 100%);
  border-color: var(--primary);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 24px rgba(232, 101, 26, 0.25);
}

.package-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.package-title-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.package-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.package-computing-power {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.package-computing-power::before {
  content: '⚡';
  font-size: 16px;
}

.package-price-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.package-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.package-unit-price {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.package-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #F0EAE2;
  position: relative;
  z-index: 1;
}

.package-select-hint {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.package-arrow {
  font-size: 18px;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.package-item:hover .package-arrow {
  transform: translateX(4px);
}

/* Loading Spinner */
.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 4px solid rgba(232, 101, 26, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ICP Registration Info */

.site-footer {
  padding: 20px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.site-footer-brand {
  font-weight: 600;
  color: #E8651A;
}

.site-footer-sep {
  margin: 0 6px;
  opacity: 0.4;
}

.site-footer-copy {
  opacity: 0.7;
}

/* ===== Homepage ===== */
.homepage-wrapper {
  background: #FFFAF6;
  min-height: calc(100vh - 64px);
}
.homepage-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 48px 0;
}

/* Pill toggle */
.hp-pill-row {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}
.hp-pill-track {
  display: flex;
  background: #F5F0EB;
  border-radius: 14px;
  padding: 5px;
  gap: 4px;
}
.hp-pill-btn {
  padding: 10px 28px;
  border-radius: 11px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #999;
  box-shadow: none;
  transition: all 0.25s ease;
}
.hp-pill-btn.active {
  background: white;
  color: #1A1A1A;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.hp-pill-btn:not(.active):hover {
  color: #666;
}

/* Hero section */
.hp-hero {
  display: flex;
  align-items: center;
  gap: 56px;
  margin-bottom: 0;
}
.hp-hero-text {
  flex: 1;
  min-width: 0;
}

.hp-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 20px;
}
.hp-badge--orange { background: #FFF0E6; color: #E8651A; }
.hp-badge--purple { background: #EDE9FE; color: #7C3AED; }
.hp-badge-dot { width: 7px; height: 7px; border-radius: 50%; }
.hp-badge-dot--orange { background: #E8651A; }
.hp-badge-dot--purple { background: #7C3AED; }

.hp-hero-title {
  font-size: 52px;
  font-weight: 700;
  color: #1A1A1A;
  line-height: 1.08;
  margin: 0 0 18px;
  letter-spacing: -1.5px;
}
.hp-accent--orange { color: #E8651A; }
.hp-accent--purple { color: #7C3AED; }

.hp-hero-desc {
  font-size: 17px;
  color: #777;
  line-height: 1.6;
  margin: 0 0 32px;
  max-width: 440px;
}
.hp-hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.hp-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}
.hp-btn--primary {
  padding: 14px 32px;
  color: #fff;
}
.hp-btn--orange { background: #E8651A; box-shadow: 0 4px 20px rgba(232,101,26,0.28); }
.hp-btn--orange:hover { background: #d05a15; }
.hp-btn--purple { background: #7C3AED; box-shadow: 0 4px 20px rgba(124,58,237,0.28); }
.hp-btn--purple:hover { background: #6d31d4; }
.hp-btn--outline {
  padding: 14px 24px;
  background: transparent;
  border: 1px solid #DDD;
  color: #1A1A1A;
  font-weight: 500;
}
.hp-btn--outline:hover { border-color: #BBB; }

.hp-hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid #F0EAE2;
}
.hp-stat-value { font-size: 26px; font-weight: 700; color: #1A1A1A; }
.hp-stat-label { font-size: 12px; color: #AAA; margin-top: 2px; }

/* Hero visual / illustration */
.hp-hero-visual {
  flex: 0 0 460px;
  height: 460px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.hp-hero-visual--orange {
  background: linear-gradient(145deg, #FFF2E8 0%, #FFE4D0 50%, #FFDABB 100%);
}
.hp-hero-visual--purple {
  background: linear-gradient(145deg, #F5F3FF 0%, #EDE9FE 50%, #DDD6FE 100%);
}
.hp-hero-stripe {
  position: absolute;
  width: 50px;
  height: 520px;
  top: -20px;
  background: rgba(232,101,26,0.06);
  border-radius: 4px;
}
.hp-hero-stripe--l { left: 28px; transform: rotate(-12deg); }
.hp-hero-stripe--r { right: 36px; transform: rotate(8deg); background: rgba(232,101,26,0.05); }
.hp-hero-stripe--purple { background: rgba(124,58,237,0.05); }

.hp-hero-visual-center {
  position: relative;
  z-index: 1;
  text-align: center;
}
.hp-hero-scene-label {
  margin-top: 12px;
  font-size: 13px;
  color: #C4520E;
  font-weight: 700;
  letter-spacing: 3px;
}

.hp-hero-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 8px;
  background: white;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 3px 12px rgba(0,0,0,0.07);
  z-index: 2;
}
.hp-hero-chip--tr { top: 36px; right: 36px; }
.hp-hero-chip--bl { bottom: 44px; left: 28px; color: #666; }
.hp-hero-chip--orange { color: #E8651A; }
.hp-hero-chip--orange svg { stroke: #E8651A; }
.hp-hero-chip--purple { color: #7C3AED; }
.hp-hero-chip--purple svg { stroke: #7C3AED; }

.hp-hero-chip-icon {
  width: 22px; height: 22px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
}
.hp-hero-chip-icon--orange { background: #E8651A; }
.hp-hero-chip-icon--purple { background: #7C3AED; }

/* Chat mockup in marketing hero */
.hp-chat-mock {
  position: relative;
  z-index: 1;
  width: 320px;
}
.hp-chat-bubble {
  background: white;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.hp-chat-bubble + .hp-chat-bubble { margin-top: 12px; }
.hp-chat-avatar {
  width: 24px; height: 24px; border-radius: 6px;
}
.hp-chat-avatar--user { background: #EDE9FE; }
.hp-chat-avatar--ai {
  background: #7C3AED;
  display: flex; align-items: center; justify-content: center;
}
.hp-chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.hp-chat-name {
  font-size: 11px;
  color: #AAA;
}
.hp-chat-name--ai { color: #7C3AED; font-weight: 600; }
.hp-chat-text { font-size: 13px; color: #555; line-height: 1.5; }
.hp-chat-tags { display: flex; gap: 6px; margin-top: 10px; }
.hp-chat-tag {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 5px;
  font-weight: 600;
}
.hp-chat-tag--purple { background: #F5F3FF; color: #7C3AED; }
.hp-chat-tag--orange { background: #FFF0E6; color: #E8651A; }
.hp-chat-tag--green { background: #ECFDF5; color: #059669; }

/* Section headings */
.hp-section {
  padding: 72px 0;
}
.hp-section-header { text-align: center; margin-bottom: 40px; }
.hp-section-header--left { text-align: left; }
.hp-section-title {
  font-size: 32px;
  font-weight: 700;
  color: #1A1A1A;
  margin: 0 0 10px;
  letter-spacing: -0.4px;
}
.hp-section-desc {
  font-size: 15px;
  color: #AAA;
  margin: 0;
}

/* Card grids */
.hp-cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.hp-cards-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* Cards */
.hp-card {
  background: white;
  border: 1px solid #F0EAE2;
  border-radius: 18px;
  padding: 32px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  overflow: hidden;
}
.hp-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.hp-card--dark {
  background: #1A1A1A;
  border-color: transparent;
}

.hp-card-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  pointer-events: none;
}
.hp-card-glow--orange { background: radial-gradient(circle, rgba(232,101,26,0.18) 0%, transparent 70%); }
.hp-card-glow--purple { background: radial-gradient(circle, rgba(124,58,237,0.2) 0%, transparent 70%); }

.hp-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.hp-card-icon--orange-light { background: #FFF0E6; }
.hp-card-icon--orange-dark { background: rgba(232,101,26,0.14); position: relative; z-index: 1; }
.hp-card-icon--purple-light { background: #EDE9FE; }
.hp-card-icon--purple-dark { background: rgba(124,58,237,0.14); position: relative; z-index: 1; }

.hp-card-badge {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  margin-bottom: 14px;
  width: fit-content;
  background: rgba(232,101,26,0.18);
  color: #FF9A5C;
  position: relative;
  z-index: 1;
}
.hp-card-badge--purple {
  background: rgba(124,58,237,0.18);
  color: #A78BFA;
}

.hp-card-title {
  font-size: 19px;
  font-weight: 600;
  color: #1A1A1A;
  margin: 0 0 8px;
}
.hp-card-title--white { color: #fff; }

.hp-card-desc {
  font-size: 13px;
  color: #999;
  line-height: 1.55;
  margin: 0 0 20px;
}
.hp-card-desc--muted { color: #999; }

.hp-card-link {
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  text-decoration: none;
  transition: gap 0.2s;
}
.hp-card-link--orange { color: #E8651A; }
.hp-card-link--purple { color: #7C3AED; }
.hp-card:hover .hp-card-link { gap: 8px; }

.hp-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  text-decoration: none;
  margin-top: auto;
  width: fit-content;
  position: relative;
  z-index: 1;
}
.hp-card-cta--orange { background: #E8651A; }
.hp-card-cta--purple { background: #7C3AED; }

/* Toolbox grid */
.hp-toolbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.hp-tool {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: white;
  border: 1px solid #F0EAE2;
  border-radius: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.hp-tool:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}
.hp-tool-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: #FFF0E6;
  flex-shrink: 0;
}
.hp-tool-title { font-size: 14px; font-weight: 600; color: #1A1A1A; }
.hp-tool-desc { font-size: 11px; color: #AAA; margin-top: 2px; }

/* CTA banner */
.hp-cta { padding-bottom: 72px; }
.hp-cta-inner {
  position: relative;
  border-radius: 22px;
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}
.hp-cta-inner--orange { background: linear-gradient(135deg, #1A1A1A 0%, #2A1F15 100%); }
.hp-cta-inner--purple { background: linear-gradient(135deg, #1A1A1A 0%, #1F152A 100%); }

.hp-cta-glow {
  position: absolute;
  top: -80px;
  right: -30px;
  width: 280px; height: 280px;
  border-radius: 50%;
  pointer-events: none;
}
.hp-cta-glow--orange { background: radial-gradient(circle, rgba(232,101,26,0.14) 0%, transparent 60%); }
.hp-cta-glow--purple { background: radial-gradient(circle, rgba(124,58,237,0.14) 0%, transparent 60%); }

.hp-cta-text { position: relative; z-index: 1; }
.hp-cta-title { font-size: 28px; font-weight: 700; color: #fff; margin: 0 0 10px; }
.hp-cta-desc { font-size: 15px; color: #999; margin: 0; }
.hp-cta-inner .hp-btn { position: relative; z-index: 1; flex-shrink: 0; }
.hp-cta-inner .hp-btn--orange { background: #E8651A; box-shadow: 0 4px 20px rgba(232,101,26,0.35); }
.hp-cta-inner .hp-btn--purple { background: #7C3AED; box-shadow: 0 4px 20px rgba(124,58,237,0.35); }

/* Homepage responsive */
@media (max-width: 900px) {
  .homepage-container { padding: 32px 24px 0; }
  .hp-hero { flex-direction: column; gap: 32px; }
  .hp-hero-visual { flex: none; width: 100%; height: 320px; }
  .hp-hero-title { font-size: 36px; }
  .hp-cards-3 { grid-template-columns: 1fr; }
  .hp-cards-2 { grid-template-columns: 1fr; }
  .hp-toolbox-grid { grid-template-columns: 1fr 1fr; }
  .hp-cta-inner { flex-direction: column; text-align: center; padding: 36px 24px; gap: 24px; }
}
@media (max-width: 480px) {
  .hp-toolbox-grid { grid-template-columns: 1fr; }
  .hp-hero-stats { gap: 20px; flex-wrap: wrap; }
  .hp-hero-actions { flex-direction: column; }
  .hp-hero-title { font-size: 28px; }
}

/* Feedback Button */
.feedback-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, #E8651A 0%, #C4520E 100%);
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 50px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(232,101,26,0.35);
  transition: all 0.3s ease;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(232,101,26,0.45);
}


/* Mode Selection Styles */
.mode-select-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mode-select-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-select-item:hover:not(.disabled) {
  border-color: var(--primary);
  background: rgba(232, 101, 26, 0.05);
}

.mode-select-item.active {
  border-color: var(--primary);
  background: rgba(232, 101, 26, 0.1);
}

.mode-select-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.mode-select-content {
  flex: 1;
}

.mode-select-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.mode-select-desc {
  font-size: 13px;
  color: var(--muted);
}

.beta-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.4;
}

.mode-select-check {
  font-size: 20px;
  color: var(--primary);
  font-weight: bold;
}

/* User Settings Modal Styles */
.settings-item {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.settings-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.settings-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.settings-select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.settings-select:hover {
  border-color: var(--primary);
}

.settings-select:focus {
  outline: none;
  border-color: var(--primary);
}

.settings-lock {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.settings-lock input[type="checkbox"] {
  margin: 0;
}

.settings-lock-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.status.success {
  color: var(--primary);
  background: rgba(232, 101, 26, 0.1);
  border-radius: 8px;
}

.status.danger {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.08);
  border-radius: 8px;
}

/* @ Mention Dropdown */
.mention-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 4px;
}

.mention-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #F0EAE2;
}

.mention-dropdown-item:last-child {
  border-bottom: none;
}

.mention-dropdown-item:hover,
.mention-dropdown-item.selected {
  background: rgba(59, 130, 246, 0.15);
}

/* ========== Skill Configuration Page ========== */
.skill-config-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}

.skill-config-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.skill-config-header h1 {
  font-size: 24px;
  color: #1A1A1A;
  margin: 0;
}

.back-btn {
  background: #F5F0EB;
  border: 1px solid #F0EAE2;
  color: #999;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.back-btn:hover {
  background: #EDE8E2;
  color: #1A1A1A;
}

.skill-config-desc {
  color: #999;
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.skill-loading {
  text-align: center;
  padding: 60px 0;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.skill-error {
  color: #f87171;
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-card {
  background: white;
  border: 1px solid #F0EAE2;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
}
.skill-card:hover {
  background: #FDFAF7;
  border-color: #E5DDD4;
}

.skill-card-info {
  flex: 1;
  min-width: 0;
}

.skill-card-name {
  font-size: 16px;
  font-weight: 600;
  color: #1A1A1A;
  margin-bottom: 2px;
}

.skill-card-id {
  font-size: 12px;
  color: #999;
  font-family: monospace;
  margin-bottom: 4px;
}

.skill-card-desc {
  font-size: 13px;
  color: #999;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.skill-size {
  font-size: 12px;
  color: #999;
}

.skill-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}
.skill-badge.custom {
  background: rgba(20,184,166,0.15);
  color: #14b8a6;
}
.skill-badge.default {
  background: rgba(148,163,184,0.15);
  color: #999;
}

.skill-card-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.skill-btn {
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid #F0EAE2;
  background: #F5F0EB;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.skill-btn:hover {
  background: #EDE8E2;
}
.skill-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.skill-btn.primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: transparent;
  color: #fff;
}
.skill-btn.primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* Skill Edit Modal */
.skill-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.skill-modal {
  background: white;
  border: 1px solid #F0EAE2;
  border-radius: 16px;
  width: 90vw;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.skill-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #F0EAE2;
}
.skill-modal-header h2 {
  font-size: 18px;
  color: #1A1A1A;
  margin: 0;
}
.skill-modal-close {
  background: none;
  border: none;
  color: #999;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.skill-modal-close:hover {
  color: #1A1A1A;
}

.skill-modal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 60px 0;
  color: #999;
}

.skill-modal-info {
  padding: 12px 24px;
  font-size: 13px;
  color: #999;
}
.skill-modal-label {
  color: #999;
}

.skill-modal-body {
  flex: 1;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.skill-textarea {
  width: 100%;
  min-height: 400px;
  max-height: 60vh;
  background: #F9F6F2;
  border: 1px solid #F0EAE2;
  border-radius: 10px;
  color: #1A1A1A;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  padding: 16px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}
.skill-textarea:focus {
  border-color: #E8651A;
}

.skill-textarea-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #999;
  padding: 8px 0;
}
.skill-changed {
  color: #f59e0b;
}

.skill-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #F0EAE2;
}

.marketing-home {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: #f8f9fa;
  overflow: hidden;
}

.marketing-nav {
  width: 64px;
  background: #fff;
  border-right: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 4px;
  flex-shrink: 0;
}

.marketing-nav-logo {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 16px;
  border-radius: 10px;
  transition: background 0.2s;
}

.marketing-nav-logo:hover {
  background: #f0f0f0;
}

.marketing-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  width: 56px;
  color: #666;
}

.marketing-nav-item:hover {
  background: #f0f0f0;
  color: #333;
}

.marketing-nav-item.active {
  background: #e6f7ff;
  color: #00a8e6;
}

.marketing-nav-icon {
  font-size: 20px;
  line-height: 1;
}

.marketing-nav-text {
  font-size: 11px;
  line-height: 1.2;
}

.marketing-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px;
  gap: 24px;
}

.marketing-hero {
  text-align: center;
  margin-bottom: 8px;
}

.marketing-title {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.marketing-title-highlight {
  color: #00a8e6;
}

.marketing-input-section {
  width: 100%;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8e8e8;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.marketing-input-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.marketing-input-upload {
  flex-shrink: 0;
}

.marketing-upload-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px dashed #d0d0d0;
  background: #fafafa;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.marketing-upload-btn:hover {
  border-color: #00a8e6;
  color: #00a8e6;
  background: #f0f9ff;
}

.marketing-textarea {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  font-size: 15px;
  line-height: 1.6;
  color: #1a1a1a;
  background: transparent;
  min-height: 60px;
  font-family: inherit;
}

.marketing-textarea::placeholder {
  color: #aaa;
}

.marketing-input-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.marketing-input-bar-left {
  display: flex;
  gap: 8px;
  align-items: center;
}

.marketing-input-bar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.marketing-bar-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  background: #fff;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.marketing-bar-btn:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.marketing-at-icon {
  color: #00a8e6;
  font-weight: 600;
}

.marketing-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: #00a8e6;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.marketing-send-btn:hover:not(:disabled) {
  background: #0095cc;
}

.marketing-send-btn:disabled {
  background: #d0d0d0;
  cursor: not-allowed;
}

.marketing-creation-types {
  width: 100%;
}

.marketing-type-label {
  font-size: 13px;
  color: #999;
  margin-bottom: 12px;
}

.marketing-type-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.marketing-type-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 140px;
}

.marketing-type-item:hover {
  border-color: #00a8e6;
  box-shadow: 0 2px 8px rgba(0,168,230,0.1);
}

.marketing-type-item.active {
  border-color: #00a8e6;
  background: #f0f9ff;
}

.marketing-type-icon {
  font-size: 20px;
}

.marketing-type-info {
  flex: 1;
}

.marketing-type-name {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
}

.marketing-type-desc {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.marketing-type-check {
  color: #00a8e6;
  font-weight: 600;
}

.marketing-feature-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.marketing-feature-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8e8e8;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.marketing-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.marketing-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
}

.marketing-feature-title {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
}

.marketing-feature-desc {
  font-size: 12px;
  color: #999;
}

/* Image Mode Segmented Buttons */
.mode-segment {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.mode-segment-item {
  flex: 1;
  padding: 10px 16px;
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  background: transparent;
  transition: all 0.2s;
  border-right: 1px solid var(--border);
  user-select: none;
}

.mode-segment-item:last-child {
  border-right: none;
}

.mode-segment-item:hover {
  color: var(--text);
}

.mode-segment-item.active {
  background: rgba(232, 101, 26, 0.15);
  color: var(--primary);
  font-weight: 600;
}

/* ===== Digital Human Top Card Tabs ===== */
/* Only override .form that directly contains .dh-tabs (i.e. digital human page root container),
   does not affect other pages' .form. Let tab+body fill container to form a unified card. */
.form > .dh-tabs {
  padding: 0;
  border-top: none;
}
.dh-tabs {
  display: flex;
  gap: 4px;
  margin: 0 4px -1px; /* 4px left/right aligned with body; -1px makes selected item's bottom edge seamlessly connect with card below */
}

.dh-tab {
  position: relative;
  flex: 1;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-align: center;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .06s ease;
}

.dh-tab:hover:not(:disabled):not(.active) {
  color: var(--text);
  background: #F5F0EB;
}

.dh-tab:active:not(:disabled) {
  transform: translateY(1px);
}

.dh-tab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dh-tab.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--border);
  box-shadow: 0 4px 14px rgba(232,101,26,0.25);
}

/* Form body card: continues from tab, creating unified "tab flip + card" appearance */
.dh-tab-body {
  margin: 0 4px; /* Aligned with .dh-tabs left/right */
  border: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  padding: 16px;
  background: var(--panel);
}
