@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Fira+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --ink: #0b1726;
  --muted: #5e6b7c;
  --subtle: #8a98aa;
  --line: #d8e4ee;
  --soft: #f3f8fb;
  --panel: rgba(255, 255, 255, 0.96);
  --blue: #0779e4;
  --blue-dark: #0758bd;
  --cyan: #11bfd0;
  --green: #08b978;
  --gold: #f6b51e;
  --red: #d64545;
  --violet: #406cff;
  --amber: #b87913;
  --display: "Aptos Display", "SF Pro Display", "Segoe UI Variable Display", "Inter", ui-sans-serif, system-ui, sans-serif;
  --text: "Aptos", "SF Pro Text", "Segoe UI Variable Text", "Inter", ui-sans-serif, system-ui, sans-serif;
  --shadow: 0 18px 60px rgba(7, 34, 58, 0.1);
  color: var(--ink);
  background: #f5f9fb;
  font-family: var(--text);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}


* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(238, 248, 251, 0.98) 420px),
    linear-gradient(135deg, #f7fbff 0%, #eefaf8 100%);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  min-height: 76px;
  padding: 0 34px;
  display: grid;
  grid-template-columns: 214px minmax(360px, 1fr) minmax(260px, auto) 190px;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid rgba(194, 217, 226, 0.9);
  background: rgba(251, 254, 255, 0.88);
  backdrop-filter: blur(22px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 900;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(17, 191, 208, 0.22);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(7, 121, 228, 0.12);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
}

.main-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 12px;
  color: #405064;
}

.main-nav a.active,
.main-nav a:hover {
  background: linear-gradient(135deg, rgba(7, 121, 228, 0.1), rgba(17, 191, 208, 0.12));
  color: #0758bd;
}

.global-ca {
  justify-self: end;
  max-width: 390px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(17, 191, 208, 0.26);
  background: linear-gradient(135deg, rgba(7, 121, 228, 0.08), rgba(8, 185, 120, 0.1));
  color: #076b8d;
  border-radius: 8px;
  padding: 4px 5px 4px 11px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.global-ca code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #07815b;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.global-ca button {
  min-height: 28px;
  border: 1px solid rgba(7, 121, 228, 0.2);
  border-radius: 7px;
  background: #ffffff;
  color: #0758bd;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.global-ca[data-copy-ca] {
  cursor: pointer;
}

.global-ca button:hover,
.global-ca button:focus-visible {
  border-color: rgba(17, 191, 208, 0.6);
  box-shadow: 0 0 0 3px rgba(17, 191, 208, 0.14);
}

.wallet-button {
  justify-self: end;
  min-height: 42px;
  border: 1px solid rgba(7, 121, 228, 0.22);
  background: #ffffff;
  color: #0758bd;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  font-weight: 900;
}

.wallet-icon {
  width: 18px;
  height: 15px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  position: relative;
  display: inline-block;
}

.wallet-icon::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffffff;
  position: absolute;
  right: 3px;
  top: 5px;
}

#app {
  max-width: 1500px;
  margin: 0 auto;
  padding: 34px 32px 52px;
}

.home-page,
.page-shell {
  display: grid;
  gap: 18px;
}

.page-shell {
  max-width: 1320px;
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(560px, 1.15fr);
  gap: 22px;
  align-items: stretch;
  min-height: 570px;
  border: 1px solid rgba(199, 222, 231, 0.96);
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 251, 251, 0.92)),
    #ffffff;
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 14px 8px;
}

.pill,
.featured-label,
.card-kicker,
.panel-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  border-radius: 999px;
  background: rgba(7, 121, 228, 0.08);
  border: 1px solid rgba(17, 191, 208, 0.22);
  color: #076b8d;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.panel-eyebrow,
.card-kicker,
.featured-label {
  border: 0;
  background: transparent;
  padding: 0;
  min-height: auto;
}

.hero-copy h1,
.page-head h1 {
  font-family: var(--display);
  letter-spacing: 0;
  line-height: 1;
}

.hero-copy h1 {
  font-size: clamp(42px, 4.7vw, 68px);
  max-width: 720px;
  margin: 20px 0 18px;
}

.hero-copy p,
.page-head p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.56;
}

.hero-copy p {
  max-width: 650px;
  margin: 0 0 22px;
}

.hero-actions,
.bid-controls,
.field-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.primary,
.secondary,
.ghost {
  min-height: 46px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  font-weight: 900;
}

.primary {
  border: 1px solid #0877d8;
  background: linear-gradient(135deg, #0779e4, #10b9ce 54%, #08b978);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(7, 121, 228, 0.2);
}

.primary:hover,
.primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(7, 121, 228, 0.26);
}

.secondary {
  border: 1px solid #c7dce8;
  background: #ffffff;
  color: #0c415e;
}

.ghost {
  border: 1px solid transparent;
  background: #eef7f8;
  color: #0c6176;
}

.secondary:hover,
.secondary:focus-visible,
.ghost:hover,
.ghost:focus-visible,
.wallet-button:hover,
.wallet-button:focus-visible {
  border-color: rgba(17, 191, 208, 0.58);
  box-shadow: 0 0 0 3px rgba(17, 191, 208, 0.12);
}

.small-button {
  min-height: 36px;
  padding: 0 13px;
  font-size: 13px;
}

.button-row,
.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.text-link {
  color: #0779e4;
  font-weight: 900;
  font-size: 14px;
}

.full {
  width: 100%;
}

.featured-card,
.panel,
.feature-card,
.mini-card,
.detail-card {
  background: var(--panel);
  border: 1px solid rgba(199, 222, 231, 0.96);
  border-radius: 8px;
  box-shadow: 0 14px 38px rgba(7, 34, 58, 0.07);
}

.featured-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(280px, 1fr);
  gap: 20px;
  padding: 14px;
}

.featured-art-wrap {
  position: relative;
  min-height: 100%;
}

.featured-art {
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
  border-radius: 7px;
  display: block;
}

.art-badge,
.status {
  position: absolute;
  left: 12px;
  top: 12px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(7, 34, 58, 0.78);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.featured-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 12px 10px 12px 0;
}

.featured-info h2,
.detail-card h1 {
  margin: 14px 0 10px;
  font-family: var(--display);
  font-size: 30px;
  line-height: 1.12;
}

.featured-info p,
.mini-card p,
.ai-box p,
.step p,
.settlement-note,
.detail-card p {
  color: var(--muted);
}

.featured-info p,
.detail-card p {
  line-height: 1.58;
}

.ca-slot {
  display: none;
}

.ca-slot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(100%, 620px);
  min-height: 42px;
  border: 1px dashed #a7d9ca;
  background: #effbf6;
  color: #08745c;
  border-radius: 8px;
  padding: 7px 8px 7px 12px;
  margin: 14px 0 18px;
}

.ca-slot span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.ca-slot code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #172033;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.ca-slot button {
  border: 1px solid #cfe5dc;
  background: #ffffff;
  color: #08745c;
  border-radius: 7px;
  min-height: 29px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.ca-slot.compact {
  width: 100%;
  max-width: 380px;
  min-height: 34px;
  margin: 8px 0 10px;
  padding: 5px 6px 5px 9px;
  gap: 7px;
}

.ca-slot.compact span,
.ca-slot.compact code,
.ca-slot.compact button {
  font-size: 11px;
}

.metrics-grid,
.detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.detail-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric,
.detail-metrics .metric {
  border: 1px solid #dce9ef;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fcfd);
  padding: 14px;
  min-width: 0;
}

.metric small,
.mini-stats small {
  display: block;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 800;
}

.metric strong,
.mini-stats strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.metric em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.bid-controls {
  justify-content: space-between;
  margin-top: 6px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfd8e6;
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(17, 191, 208, 0.14);
}

label {
  display: grid;
  gap: 7px;
  color: #394456;
  font-size: 13px;
  font-weight: 800;
}

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

.feature-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.feature-card h3,
.mini-card h3,
.ai-box h3,
.step h3 {
  margin: 0 0 5px;
}

.feature-card p,
.step p {
  margin: 0;
  line-height: 1.38;
  font-size: 13px;
}

.soft-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(7, 121, 228, 0.12), rgba(8, 185, 120, 0.12));
  color: #076b8d;
  font-size: 13px;
  font-weight: 900;
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(620px, 1.2fr) minmax(460px, 0.86fr);
  gap: 16px;
}

.bottom-grid {
  display: grid;
  grid-template-columns: minmax(680px, 1fr) minmax(420px, 0.58fr);
  gap: 16px;
}

.stats-panel {
  padding: 16px 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.panel {
  padding: 18px;
}

.panel h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: 0;
}

.panel-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.panel-title-row .ca-slot {
  margin: 0;
}

.compact-title {
  align-items: center;
}

.create-grid {
  display: grid;
  grid-template-columns: 170px minmax(260px, 1fr) minmax(290px, 0.92fr);
  gap: 16px;
}

.upload-box {
  min-height: 236px;
  border: 1.5px dashed #b9d9df;
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  text-align: center;
  color: var(--muted);
  background: linear-gradient(180deg, #fbfefe, #f3faf9);
}

.upload-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(7, 121, 228, 0.12), rgba(17, 191, 208, 0.16));
  color: #0758bd;
  font-size: 13px;
  font-weight: 900;
}

.upload-box label {
  width: 100%;
  padding: 0 12px;
  text-align: left;
}

.compact-fields {
  display: grid;
  gap: 12px;
}

.field-row {
  align-items: end;
}

.field-row label {
  flex: 1;
  min-width: 0;
}

.ai-box {
  border: 1px solid #dce9ef;
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
}

.ai-box ul {
  padding: 0;
  margin: 14px 0;
  list-style: none;
  color: #354052;
  line-height: 1.72;
}

.ai-box li {
  position: relative;
  padding-left: 18px;
}

.ai-box li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--green));
  position: absolute;
  left: 0;
  top: 0.7em;
}

.suggested-price {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  align-items: center;
  border-top: 1px solid #e4e9f2;
  padding-top: 12px;
}

.suggested-price span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.suggested-price strong {
  font-size: 20px;
}

.suggested-price button {
  grid-row: 1 / 3;
  grid-column: 2;
  min-height: 38px;
  border: 1px solid #0877d8;
  background: linear-gradient(135deg, #0779e4, #10b9ce);
  color: #ffffff;
  border-radius: 7px;
  padding: 0 14px;
  font-weight: 900;
}

.activity-table {
  display: grid;
  margin-top: 12px;
  border: 1px solid #dce9ef;
  border-radius: 8px;
  overflow: hidden;
}

.activity-row {
  display: grid;
  grid-template-columns: 76px 1.4fr 1fr 0.85fr 1fr;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  border-bottom: 1px solid #edf0f5;
  padding: 0 12px;
  color: #4a5364;
  background: #ffffff;
  font-size: 13px;
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-row.head {
  min-height: 38px;
  color: var(--muted);
  background: #f2fafb;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.highest {
  color: var(--green);
  background: #e8fbf4;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 900;
}

.avatar {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan), var(--green));
}

.settlement-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
}

.settlement-note span {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e9f9fb;
  color: #0779e4;
  font-weight: 900;
}

.settlement-note a {
  margin-left: auto;
  min-height: 34px;
  border: 1px solid #cfd8e6;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 900;
}

.mini-grid,
.market-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.mini-card {
  display: grid;
  grid-template-rows: 210px 1fr;
  overflow: hidden;
  box-shadow: none;
}

.thumb-wrap {
  position: relative;
  min-width: 0;
  background: #e9eef7;
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.status {
  left: 10px;
  top: 10px;
}

.status.live {
  background: rgba(8, 185, 120, 0.9);
}

.status.settling {
  background: rgba(184, 121, 19, 0.9);
}

.status.ended {
  background: rgba(71, 84, 103, 0.88);
}

.mini-content {
  min-width: 0;
  padding: 14px;
}

.mini-content h3 {
  min-height: 42px;
  font-size: 17px;
  line-height: 1.22;
}

.mini-content p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.35;
}

.mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mini-stats strong {
  font-size: 13px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  text-align: center;
}

.step {
  min-width: 0;
}

.step-icon {
  width: 54px;
  height: 54px;
  margin: 10px auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(7, 121, 228, 0.1), rgba(8, 185, 120, 0.12));
  border: 1px solid #c9e5e7;
  color: #076b8d;
  font-weight: 900;
}

.step h3 {
  font-size: 15px;
}

.page-head {
  margin-bottom: 8px;
}

.page-head h1 {
  font-size: clamp(40px, 5vw, 56px);
  margin: 14px 0 8px;
}

.page-head .ca-slot {
  margin-top: 16px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 160px 160px 120px 100px;
  gap: 12px;
  margin-bottom: 2px;
}

.detail-page {
  display: grid;
  grid-template-columns: minmax(320px, 0.86fr) minmax(480px, 1fr);
  gap: 22px;
  align-items: start;
}

.detail-media {
  display: grid;
  gap: 12px;
}

.detail-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.trait-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trait-list span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #dbe3ef;
  background: #ffffff;
  padding: 0 10px;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.detail-card {
  padding: 24px;
}

.bid-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  gap: 12px;
  align-items: end;
  margin-top: 10px;
}

.detail-actions {
  margin-top: 12px;
}

.bid-history {
  margin-top: 22px;
  border-top: 1px solid #e4e9f2;
  padding-top: 18px;
}

.bid-history h2 {
  margin: 0 0 12px;
  font-family: var(--display);
}

.history-row {
  display: grid;
  grid-template-columns: 1fr auto 1.2fr;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid #eef2f7;
  color: #475467;
  font-size: 13px;
}

.history-row strong {
  color: var(--ink);
}

.history-row time {
  text-align: right;
  color: var(--subtle);
}

.notice {
  max-width: 1320px;
  margin: 14px auto 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff7df;
  border: 1px solid #efcf80;
  color: #6d5211;
  font-weight: 700;
}

.notice.success {
  background: #eaf9f1;
  border-color: #bdebd4;
  color: #12693d;
}

.hidden {
  display: none;
}

.empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--muted);
  text-align: center;
}

.empty-state.small {
  min-height: 86px;
  border: 0;
  box-shadow: none;
}

.ca-slot {
  display: none !important;
}

@media (max-width: 1240px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .global-ca {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    width: 100%;
    max-width: none;
    min-height: 42px;
    margin-top: 2px;
    padding: 5px 6px 5px 10px;
    gap: 8px;
    border-radius: 8px;
    border-color: rgba(245, 158, 11, 0.28);
    background: rgba(15, 23, 42, 0.62);
  }

  .global-ca .ca-label {
    font-size: 12px;
  }

  .global-ca code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }

  .global-ca button {
    min-height: 30px;
    padding: 0 9px;
    font-size: 12px;
  }

  .hero-grid,
  .workbench-grid,
  .bottom-grid,
  .detail-page {
    grid-template-columns: 1fr;
  }

  .featured-card {
    grid-template-columns: minmax(260px, 0.75fr) minmax(320px, 1fr);
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 14px 16px;
  }

  .main-nav {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .main-nav a {
    white-space: nowrap;
  }

  #app {
    padding: 22px 16px 36px;
  }

  .hero-grid {
    min-height: 0;
    padding: 16px;
  }

  .featured-card,
  .create-grid,
  .feature-grid,
  .mini-grid,
  .market-grid,
  .steps,
  .toolbar,
  .detail-metrics,
  .bid-form,
  .hero-stats,
  .stats-grid,
  .button-row,
  .detail-actions {
    grid-template-columns: 1fr;
  }

  .featured-art {
    min-height: auto;
    aspect-ratio: 16 / 10;
  }

  .featured-info {
    padding: 0;
  }

  .panel-title-row,
  .bid-controls,
  .field-row {
    display: grid;
  }

  .panel-title-row .ca-slot {
    max-width: none;
  }

  .ca-slot {
    grid-template-columns: 1fr auto;
  }

  .ca-slot span {
    grid-column: 1 / -1;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .activity-table {
    overflow-x: auto;
  }

  .activity-row {
    min-width: 720px;
  }

  .mini-card {
    grid-template-rows: 220px 1fr;
  }

  .history-row {
    grid-template-columns: 1fr auto;
  }

  .history-row time {
    grid-column: 1 / -1;
    text-align: left;
    padding-bottom: 8px;
  }
}

/* Mobile refinement for AuctionAI layout */
@media (max-width: 720px) {
  body {
    display: block;
    min-width: 320px;
    overflow-x: hidden;
  }

  .site-header {
    position: relative;
    top: 0;
    width: 100%;
    min-height: 0;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    gap: 14px;
  }

  .brand {
    font-size: 24px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .main-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

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

  .main-nav a {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 14px;
    font-size: 14px;
  }

  .assistant-card,
  .account-card {
    display: none;
  }

  .workspace-shell {
    padding: 14px 12px 28px;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 14px;
  }

  .top-search {
    grid-template-columns: 20px minmax(0, 1fr);
    min-height: auto;
    padding: 8px 10px;
  }

  .top-search button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .top-actions {
    display: grid;
    grid-template-columns: minmax(96px, 1fr) 46px minmax(150px, 1.35fr);
    gap: 8px;
    width: 100%;
    align-items: center;
  }

  .global-ca {
    display: none;
  }

  .wallet-button {
    grid-column: auto;
    width: 100%;
    min-width: 0;
    padding: 0 10px;
    font-size: 14px;
  }

  .chain-button,
  .x-link {
    width: 100%;
    min-height: 46px;
  }

  .chain-button {
    padding: 0 10px;
  }

  .home-page,
  .page-shell {
    gap: 12px;
  }

  .featured-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
    min-height: 0;
  }

  .featured-art {
    width: 100%;
    min-height: 0;
    aspect-ratio: 1 / 1;
  }

  .featured-info h2,
  .detail-card h1,
  .page-head h1 {
    font-size: 32px;
    line-height: 1.08;
  }

  .featured-info p,
  .detail-card p,
  .page-head p {
    font-size: 16px;
  }

  .auction-matrix,
  .metrics-grid,
  .detail-metrics,
  .stats-grid,
  .feature-grid,
  .workbench-grid,
  .bottom-grid,
  .live-board .mini-grid,
  .mini-grid,
  .market-grid,
  .create-grid,
  .toolbar,
  .bid-form,
  .detail-actions,
  .button-row,
  .steps {
    grid-template-columns: 1fr;
  }

  .home-bid-panel {
    padding: 16px;
  }

  .bid-amount-preview {
    min-height: 70px;
  }

  .bid-amount-preview strong {
    font-size: 34px;
  }

  .feature-card {
    min-height: 92px;
  }

  .panel {
    padding: 16px;
  }

  .panel h2 {
    font-size: 24px;
  }

  .mini-card {
    grid-template-rows: 210px 1fr;
  }

  .activity-table {
    overflow-x: auto;
  }

  .activity-row {
    min-width: 680px;
  }

  .detail-page {
    grid-template-columns: 1fr;
  }

  .detail-art {
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 420px) {
  .top-actions {
    grid-template-columns: 1fr 46px;
  }

  .wallet-button {
    grid-column: 1 / -1;
  }
}

/* Larger Base dashboard scale */
:root {
  --ui-scale: 1.1;
}

body {
  font-size: 17px;
}

.site-header {
  width: 310px;
  padding: 32px 24px;
}

body {
  grid-template-columns: 310px minmax(0, 1fr);
}

.brand {
  font-size: 31px;
}

.brand-mark {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.main-nav a {
  min-height: 62px;
  font-size: 16px;
}

.sidebar-card {
  padding: 20px;
}

.assistant-card span,
.account-card strong {
  font-size: 17px;
}

.assistant-card p,
.account-card small,
.account-card em {
  font-size: 15px;
}

.account-card b {
  font-size: 30px;
}

.workspace-shell {
  padding: 30px 34px 48px;
}

.topbar {
  grid-template-columns: minmax(440px, 680px) 1fr;
}

.top-search {
  min-height: 58px;
}

.top-search input {
  min-height: 52px;
  font-size: 16px;
}

.top-search button,
.chain-button,
.wallet-button,
.global-ca button {
  min-height: 44px;
  font-size: 15px;
}

.global-ca {
  min-height: 46px;
  font-size: 14px;
}

.global-ca code {
  font-size: 13px;
}

.featured-card {
  grid-template-columns: 1fr 1.2fr 390px;
  min-height: 470px;
  padding: 30px;
}

.featured-art {
  min-height: 405px;
}

.featured-info h2 {
  font-size: clamp(40px, 3.8vw, 56px);
}

.featured-info p,
.detail-card p,
.hero-copy p,
.page-head p {
  font-size: 19px;
}

.pill,
.featured-label,
.card-kicker,
.panel-eyebrow {
  min-height: 30px;
  font-size: 14px;
}

.home-bid-panel {
  padding: 28px;
}

.bid-amount-preview {
  min-height: 88px;
}

.bid-amount-preview strong {
  font-size: 42px;
}

.metric {
  padding: 18px;
}

.metric small,
.mini-stats small {
  font-size: 14px;
}

.metric strong,
.mini-stats strong {
  font-size: 22px;
}

.panel {
  padding: 24px;
}

.panel h2 {
  font-size: 30px;
}

.feature-card {
  min-height: 116px;
  padding: 20px;
}

.feature-card h3,
.mini-card h3,
.ai-box h3,
.step h3 {
  font-size: 18px;
}

.feature-card p,
.step p,
.mini-card p {
  font-size: 15px;
}

.soft-icon,
.upload-icon {
  width: 58px;
  height: 58px;
}

.mini-card {
  grid-template-rows: 245px 1fr;
}

.mini-content {
  padding: 18px;
}

.activity-row {
  min-height: 52px;
  font-size: 15px;
}

input,
select,
textarea {
  min-height: 50px;
  font-size: 16px;
}

.primary,
.secondary,
.ghost {
  min-height: 54px;
  font-size: 16px;
}

.toolbar {
  grid-template-columns: minmax(300px, 1fr) 180px 180px 140px 120px;
}

.detail-card h1,
.page-head h1 {
  font-size: clamp(48px, 5vw, 68px);
}

@media (max-width: 1280px) {
  body {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .site-header {
    width: 280px;
  }

  .featured-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  body {
    font-size: 16px;
  }

  .site-header {
    width: 100%;
  }

  .workspace-shell {
    padding: 18px 14px 34px;
  }

  .featured-info h2,
  .detail-card h1,
  .page-head h1 {
    font-size: 38px;
  }
}

/* AuctionAI reference layout */
body {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: 100vh;
  overflow-x: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  padding: 28px 22px;
  border-width: 0 1px 0 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(6, 10, 32, 0.98), rgba(3, 8, 24, 0.96));
}

.brand {
  min-height: 52px;
}

.brand strong span {
  color: #a855f7;
}

.main-nav {
  width: 100%;
  display: grid;
  gap: 8px;
  justify-content: stretch;
}

.main-nav a {
  min-height: 56px;
  justify-content: flex-start;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 18px;
}

.main-nav a.active,
.main-nav a:hover {
  border-color: rgba(168, 85, 247, 0.44);
  background: linear-gradient(135deg, rgba(126, 34, 206, 0.34), rgba(37, 99, 235, 0.08));
}

.sidebar-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  padding: 16px;
}

.assistant-card {
  margin-top: auto;
}

.assistant-card span,
.account-card strong {
  display: block;
  color: #ffffff;
  font-weight: 800;
}

.assistant-card p,
.account-card small,
.account-card em {
  display: block;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.5;
}

.assistant-card a {
  min-height: 42px;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff;
  font-weight: 800;
}

.account-card b {
  display: block;
  margin-top: 14px;
  color: #ffffff;
  font-size: 24px;
}

.workspace-shell {
  min-width: 0;
  padding: 26px 28px 40px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(360px, 580px) 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 22px;
}

.top-search {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.64);
  padding: 0 10px 0 16px;
}

.top-search span {
  width: 16px;
  height: 16px;
  border: 2px solid #64748b;
  border-radius: 50%;
  position: relative;
}

.top-search span::after {
  content: "";
  width: 7px;
  height: 2px;
  background: #64748b;
  position: absolute;
  right: -5px;
  bottom: -3px;
  transform: rotate(45deg);
}

.top-search input {
  min-height: 42px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.top-search button,
.chain-button,
.x-link {
  min-height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
}

.x-link {
  width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #020617;
  color: #ffffff;
  overflow: hidden;
}

.x-link .x-mark {
  width: 24px;
  height: 24px;
  position: relative;
  display: block;
}

.x-link .x-mark::before,
.x-link .x-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: #ffffff;
  transform-origin: center;
}

.x-link .x-mark::before {
  transform: rotate(41deg);
}

.x-link .x-mark::after {
  transform: rotate(-41deg);
}

.x-link:hover,
.x-link:focus-visible {
  background: #000000;
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.top-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}

#app {
  max-width: none;
  padding: 0;
}

.home-page,
.page-shell {
  max-width: none;
}

.hero-grid {
  display: block;
  min-height: auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.featured-card {
  grid-template-columns: 0.95fr 1.15fr 360px;
  gap: 28px;
  padding: 26px;
  min-height: 420px;
}

.featured-art {
  min-height: 360px;
  aspect-ratio: 1.18 / 1;
}

.featured-info {
  justify-content: center;
}

.featured-info h2 {
  font-size: clamp(32px, 3.2vw, 44px);
}

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

.home-bid-panel {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(2, 6, 23, 0.64));
  padding: 24px;
}

.balance-row,
.minimum-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #cbd5e1;
}

.bid-amount-preview {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.52);
  padding: 0 18px;
}

.bid-amount-preview strong {
  font-size: 34px;
  color: #ffffff;
}

.minimum-row strong {
  color: #22c55e;
}

.feature-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.feature-card {
  min-height: 98px;
  grid-template-columns: 52px 1fr;
}

.workbench-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.7fr);
}

.live-board .mini-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bottom-grid {
  grid-template-columns: minmax(0, 1fr) 0.75fr;
}

.bottom-grid > .panel:first-child .create-grid {
  grid-template-columns: 220px minmax(320px, 1fr) minmax(320px, 0.9fr);
}

.global-ca {
  max-width: 290px;
}

@media (max-width: 1280px) {
  body {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .featured-card,
  .workbench-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .live-board .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  body {
    display: block;
  }

  .site-header {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    border-right: 0;
  }

  .workspace-shell {
    padding: 18px 14px 32px;
  }

  .topbar,
  .top-actions,
  .featured-card,
  .feature-grid,
  .live-board .mini-grid,
  .bottom-grid > .panel:first-child .create-grid {
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-self: stretch;
    display: grid;
  }

  .global-ca {
    max-width: none;
  }
}

/* UIPro visual system overrides */
:root {
  --ink: #f8fafc;
  --muted: #b7c3d4;
  --subtle: #8090a6;
  --line: rgba(255, 255, 255, 0.14);
  --soft: rgba(15, 23, 42, 0.72);
  --panel: rgba(15, 23, 42, 0.72);
  --blue: #38bdf8;
  --blue-dark: #0284c7;
  --cyan: #22d3ee;
  --green: #22c55e;
  --gold: #f59e0b;
  --violet: #8b5cf6;
  --display: "Fira Code", "SFMono-Regular", Consolas, monospace;
  --text: "Fira Sans", "Segoe UI Variable Text", Inter, ui-sans-serif, system-ui, sans-serif;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  color-scheme: dark;
}

body {
  background:
    radial-gradient(circle at 18% 8%, rgba(56, 189, 248, 0.22), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(245, 158, 11, 0.16), transparent 24%),
    radial-gradient(circle at 74% 88%, rgba(34, 197, 94, 0.14), transparent 30%),
    linear-gradient(135deg, #020617 0%, #0f172a 46%, #111827 100%);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 78%);
}

.site-header {
  top: 14px;
  width: min(calc(100% - 28px), 1500px);
  margin: 0 auto;
  min-height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.brand {
  color: #ffffff;
}

.brand-mark {
  border-color: rgba(56, 189, 248, 0.28);
  background: rgba(255, 255, 255, 0.92);
}

.main-nav a {
  color: #cbd5e1;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.main-nav a.active,
.main-nav a:hover {
  background: rgba(56, 189, 248, 0.12);
  color: #ffffff;
}

.global-ca {
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(15, 23, 42, 0.76);
  color: #fbbf24;
}

.global-ca code {
  color: #e2e8f0;
}

.global-ca button,
.wallet-button,
.secondary,
.ghost,
.primary {
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.global-ca button,
.wallet-button,
.secondary {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
}

.wallet-button {
  color: #f8fafc;
}

#app {
  padding-top: 48px;
}

.hero-grid {
  min-height: 640px;
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.58)),
    radial-gradient(circle at 74% 24%, rgba(56, 189, 248, 0.16), transparent 30%);
  backdrop-filter: blur(18px);
}

.hero-copy h1,
.page-head h1 {
  color: #ffffff;
  text-wrap: balance;
}

.hero-copy p,
.page-head p,
.featured-info p,
.detail-card p,
.mini-card p,
.ai-box p,
.step p,
.settlement-note {
  color: #b7c3d4;
}

.pill,
.featured-label,
.card-kicker,
.panel-eyebrow {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.08);
}

.hero-search {
  width: min(100%, 680px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin: 24px 0 18px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.5);
  backdrop-filter: blur(14px);
}

.hero-search label {
  color: #94a3b8;
}

input,
select,
textarea {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.64);
  color: #f8fafc;
}

input::placeholder {
  color: #64748b;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: none;
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.primary {
  border-color: rgba(245, 158, 11, 0.52);
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #111827;
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.22);
}

.ghost {
  background: rgba(56, 189, 248, 0.1);
  color: #bae6fd;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-chip {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.68);
  color: #f8fafc;
  padding: 16px;
  text-align: left;
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.category-chip span {
  font-family: var(--display);
  font-weight: 700;
}

.category-chip small {
  color: #94a3b8;
  font-weight: 700;
}

.category-chip:hover,
.category-chip:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.46);
  background: rgba(30, 41, 59, 0.78);
}

.featured-card,
.panel,
.feature-card,
.mini-card,
.detail-card {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.featured-art,
.detail-art,
.thumb-wrap img {
  filter: saturate(1.08) contrast(1.04);
}

.art-badge,
.status {
  background: rgba(2, 6, 23, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.metric,
.detail-metrics .metric,
.ai-box,
.upload-box,
.activity-row,
.activity-table {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(2, 6, 23, 0.44);
}

.metric strong,
.mini-stats strong,
.feature-card h3,
.mini-card h3,
.ai-box h3,
.step h3,
.panel h2,
.featured-info h2,
.detail-card h1 {
  color: #f8fafc;
}

.metric small,
.mini-stats small {
  color: #94a3b8;
}

.soft-icon,
.upload-icon,
.step-icon {
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: rgba(56, 189, 248, 0.1);
  color: #7dd3fc;
}

.activity-row.head {
  background: rgba(15, 23, 42, 0.9);
  color: #94a3b8;
}

.activity-row {
  color: #cbd5e1;
}

.activity-row:hover {
  background: rgba(30, 41, 59, 0.72);
}

.mini-card,
.activity-row,
.text-link {
  cursor: pointer;
}

.mini-card {
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.mini-card:hover,
.mini-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.44);
}

.toolbar {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(16px);
}

.notice {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.34);
  color: #fde68a;
}

.notice.success {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.32);
  color: #bbf7d0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 860px) {
  .site-header {
    width: calc(100% - 20px);
    top: 10px;
  }

  .hero-search,
  .category-strip,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: 0;
  }
}

/* Tight mobile header controls */
@media (max-width: 860px) {
  .workspace-shell {
    padding-top: 14px;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }

  .top-search {
    min-height: 46px;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    gap: 8px;
    border-radius: 8px;
    padding: 0 7px 0 12px;
  }

  .top-search input {
    min-height: 40px;
    font-size: 14px;
  }

  .top-search button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }

  .top-actions {
    width: 100%;
    justify-self: stretch;
    display: grid;
    grid-template-columns: minmax(86px, 0.8fr) 44px minmax(154px, 1.35fr);
    align-items: center;
    gap: 8px;
  }

  .chain-button,
  .x-link,
  .wallet-button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border-radius: 8px;
  }

  .chain-button {
    padding: 0 10px;
    font-size: 14px;
  }

  .x-link {
    width: 44px;
    justify-self: center;
  }

  .wallet-button {
    justify-self: stretch;
    padding: 0 10px;
    gap: 7px;
    font-size: 14px;
    white-space: nowrap;
  }

  .wallet-icon {
    flex: 0 0 auto;
  }

  .global-ca {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    width: 100%;
    max-width: none;
    min-height: 42px;
    margin-top: 2px;
    padding: 5px 6px 5px 10px;
    gap: 8px;
    align-items: center;
    border-radius: 8px;
    white-space: nowrap;
  }

  #app {
    padding-top: 18px;
  }
}

@media (max-width: 380px) {
  .top-actions {
    grid-template-columns: minmax(72px, 0.7fr) 42px minmax(132px, 1.3fr);
    gap: 6px;
  }

  .chain-button,
  .x-link,
  .wallet-button {
    min-height: 42px;
  }

  .wallet-button {
    font-size: 13px;
  }

  .global-ca {
    min-height: 40px;
    padding-left: 9px;
    gap: 6px;
  }

  .global-ca code {
    font-size: 10px;
  }

  .global-ca button {
    min-height: 28px;
    padding: 0 7px;
    font-size: 11px;
  }
}

/* Final CA layout polish */
.topbar {
  grid-template-columns: minmax(360px, 520px) minmax(0, 1fr);
}

.top-actions {
  min-width: 0;
}

.top-actions .global-ca {
  max-width: none;
  min-width: 470px;
  flex: 0 0 auto;
}

.top-actions .global-ca code {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-self: stretch;
    display: grid;
    grid-template-columns: minmax(120px, 0.7fr) 44px minmax(180px, 1fr);
    gap: 10px;
  }

  .top-actions .global-ca {
    grid-column: 1 / -1;
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 860px) {
  .topbar {
    gap: 12px;
  }

  .top-actions {
    grid-template-columns: minmax(92px, 1fr) 44px minmax(144px, 1fr);
    gap: 8px;
  }

  .top-actions .wallet-button {
    grid-column: auto;
    min-height: 44px;
    font-size: 13px;
    padding: 0 8px;
  }

  .top-actions .global-ca {
    min-height: 48px;
    margin-top: 4px;
    padding: 6px 7px 6px 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    border-color: rgba(245, 158, 11, 0.42);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.84), rgba(10, 22, 38, 0.72));
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.08);
  }

  .top-actions .global-ca .ca-label {
    min-width: 24px;
    color: #fbbf24;
    font-size: 12px;
    letter-spacing: 0;
  }

  .top-actions .global-ca code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #f8fafc;
    font-size: 12px;
    font-weight: 800;
  }

  .top-actions .global-ca button {
    min-height: 34px;
    padding: 0 10px;
    border-radius: 7px;
    font-size: 12px;
  }
}

@media (max-width: 390px) {
  .top-actions {
    grid-template-columns: minmax(74px, 0.9fr) 42px minmax(124px, 1.1fr);
    gap: 7px;
  }

  .top-actions .global-ca {
    padding-left: 9px;
    gap: 6px;
  }

  .top-actions .global-ca code {
    font-size: 10.5px;
  }

  .top-actions .global-ca button {
    min-height: 30px;
    padding: 0 8px;
    font-size: 11px;
  }
}
