:root {
  color-scheme: dark;
  --mint-bg: #000;
  --mint-panel: #0d1721;
  --mint-green: #7ed957;
  --mint-bright: #19b35c;
  --mint-forest: #295b53;
  --mint-white: #fff;
  --mint-muted: #a8afb8;
  --mint-line: rgba(255,255,255,.12);
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--mint-bg);
  color: var(--mint-white);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.demo-page { min-height: 100vh; margin: 0; background: var(--mint-bg); color: var(--mint-white); -webkit-font-smoothing: antialiased; }
.demo-shell.mintlab-shell { width: min(100% - 40px, 896px); margin: 0 auto; padding: 46px 0 30px; }
.mintlab-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin: 0 0 30px; }
.mintlab-intro { max-width: 760px; }
.mintlab-intro .kicker { margin: 0 0 8px; color: var(--mint-green); font: 11px "Space Grotesk", sans-serif; letter-spacing: .06em; }
.mintlab-intro h1 { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -.025em; }
.technical-link,.mintlab-footer a,.back-link { color: var(--mint-green); font-size: 12px; text-decoration: none; white-space: nowrap; }
.technical-link:hover,.mintlab-footer a:hover,.back-link:hover { color: var(--mint-bright); text-decoration: underline; text-underline-offset: 3px; }

.catalogue-panel { padding: 12px 0 35px; }
.terminal-label { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; color: #d1d5db; }
.terminal { color: var(--mint-green); font: 20px "DM Mono", monospace; }
.terminal-label h2 { margin: 0; font-size: 14px; font-weight: 500; }
.catalogue-caption { margin: 0 0 0 auto; color: var(--mint-muted); font: 10px "DM Mono", monospace; letter-spacing: .03em; }

.search-row { display: flex; align-items: stretch; gap: 8px; padding: 0 0 0 15px; border: 2px solid var(--mint-green); border-radius: 7px; background: rgba(13,23,33,.5); transition: border-color .18s, box-shadow .18s; }
.search-row:focus-within { border-color: var(--mint-bright); box-shadow: 0 0 0 3px rgba(126,217,87,.12); }
.search-row input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 14px 0; background: transparent; color: var(--mint-white); font: 15px "DM Mono", monospace; }
.search-row input::placeholder { color: #89929c; }
.search-button { width: 54px; flex: 0 0 54px; border: 0; border-radius: 0 4px 4px 0; background: transparent; color: var(--mint-green); cursor: pointer; }
.search-button svg { display: block; width: 20px; height: 20px; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.8; }
.position-filter { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 9px; color: var(--mint-muted); font-size: 11px; }
.position-filter select { border: 1px solid rgba(126,217,87,.25); border-radius: 4px; padding: 6px 8px; background: #091018; color: #d8dee4; font: 11px "Space Grotesk", sans-serif; }
.search-button:hover { background: rgba(126,217,87,.1); color: var(--mint-bright); }
.search-button:disabled { cursor: wait; opacity: .55; }
.search-row :focus-visible,.memo-entry :focus-visible { outline: 2px solid var(--mint-green); outline-offset: 2px; }

.results-heading { min-height: 30px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 9px 0 0; }
#state { margin: 0; color: var(--mint-muted); font: 11px "DM Mono", monospace; }
.results-heading .catalogue-caption { text-align: right; }
.found { margin: 0 0 3px; color: var(--mint-muted); font: 10px "DM Mono", monospace; }
.desktop { display: block; width: 100%; overflow-x: auto; }
.desktop table { width: 100%; border-collapse: collapse; text-align: left; font: 13px "DM Mono", monospace; }
.desktop th { padding: 9px 8px; color: #9ca3af; font-weight: 500; }
.desktop td { padding: 9px 8px; border-top: 1px solid var(--mint-line); }
.desktop-row { white-space: nowrap; }
.desktop-row:hover { background: rgba(255,255,255,.035); }
.addr { color: #e8ebee; font: 13px/1.55 "DM Mono", monospace; overflow-wrap: anywhere; }
.match { color: var(--mint-green); background: transparent; font-weight: 700; padding: 0 1px; }
.status { color: #63d994; font: 11px "DM Mono", monospace; white-space: nowrap; }
.meta { color: var(--mint-muted); font: 10px "DM Mono", monospace; overflow-wrap: anywhere; }
.choose { min-height: 34px; border: 0; border-radius: 999px; padding: 0 13px; background: linear-gradient(100deg,var(--mint-green),var(--mint-bright)); color: #07110a; font: 600 12px "Space Grotesk", sans-serif; cursor: pointer; }
.choose:hover { filter: brightness(1.08); }
.cards { display: none; }

.memo-panel { margin: 10px 0 30px; }
.memo-progress { display: flex; align-items: center; gap: 13px; margin-bottom: 28px; color: #8d969f; font-size: 12px; }
.memo-progress a,.memo-progress .current-step { display: inline-flex; align-items: center; gap: 8px; color: var(--mint-green); text-decoration: none; white-space: nowrap; }
.memo-progress a:hover { color: var(--mint-bright); }
.memo-progress .progress-number { display: inline-grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: #79d754; color: #07110a; font: 13px "DM Mono", monospace; }
.memo-progress i { height: 2px; flex: 1; background: var(--mint-forest); }
.memo-layout { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(240px,.85fr); gap: 26px; align-items: start; }
.memo-main { min-width: 0; border: 1px solid rgba(126,217,87,.38); border-radius: 7px; padding: 23px; background: rgba(13,23,33,.28); }
.memo-title-row { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.memo-title-row .kicker { margin: 0 0 8px; font-size: 10px; }
.memo-title-row h2 { margin: 0; color: var(--mint-green); font-size: 23px; line-height: 1.2; }
.back-link { padding-top: 5px; }
.selected-address { margin: 0 0 19px; border: 1px solid rgba(126,217,87,.2); border-radius: 5px; padding: 12px; background: rgba(126,217,87,.06); color: var(--mint-green); font: 12px/1.6 "DM Mono", monospace; overflow-wrap: anywhere; }
.memo-form>label { display: block; margin: 0 0 8px; color: #c5c9ce; font-size: 12px; }
.memo-form input { width: 100%; min-height: 46px; border: 1px solid rgba(126,217,87,.35); border-radius: 5px; padding: 12px; background: rgba(0,0,0,.45); color: var(--mint-white); font: 14px "Space Grotesk", sans-serif; }
.memo-form input::placeholder { color: #89929c; }
.memo-form button { width: 100%; min-height: 48px; margin-top: 16px; border: 0; border-radius: 6px; padding: 0 17px; background: linear-gradient(100deg,var(--mint-green),var(--mint-bright)); color: #07110a; font: 600 14px "Space Grotesk", sans-serif; cursor: pointer; }
.memo-form button:disabled { cursor: not-allowed; opacity: .55; }
.memo-limit { margin: 7px 0 0; color: #89929c; font-size: 10px; }
.operation { min-height: 0; margin-top: 13px; color: #bdc5cd; font: 11px/1.7 "DM Mono", monospace; overflow-wrap: anywhere; }
.operation:not(:empty) { min-height: 42px; border-top: 1px solid var(--mint-line); padding-top: 10px; }
.operation a { color: var(--mint-green); overflow-wrap: anywhere; }
.memo-summary { padding: 12px 0; }
.memo-summary h3 { margin: 0 0 20px; color: var(--mint-green); font-size: 16px; font-weight: 600; }
.memo-summary dl { margin: 0; }
.memo-summary dl>div { display: grid; grid-template-columns: 42px 1fr; gap: 8px; padding: 13px 0; border-top: 1px solid var(--mint-line); }
.memo-summary dt { color: var(--mint-green); font: 11px "DM Mono", monospace; }
.memo-summary dd { margin: 0; color: #d0d5da; font-size: 12px; line-height: 1.5; }
.memo-summary>p { margin: 17px 0 0; color: var(--mint-muted); font-size: 11px; line-height: 1.6; }
.readiness-row { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; }
.readiness-indicator { width: 7px; height: 7px; flex: 0 0 7px; margin-top: 4px; border-radius: 50%; background: #9aa4ae; }
.notice { margin: 0; color: var(--mint-muted); font: 11px/1.55 "Space Grotesk", sans-serif; }
.mintlab-footer { display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid var(--mint-line); padding-top: 14px; color: #89929c; font: 10px "DM Mono", monospace; }
.mintlab-footer a { font-size: 10px; }
body.demo-page a:focus-visible, body.demo-page button:focus-visible { outline: 2px solid var(--mint-green); outline-offset: 3px; }

@media (max-width: 640px) {
  .demo-shell.mintlab-shell { width: calc(100% - 32px); padding-top: 30px; }
  .mintlab-heading { display: block; margin-bottom: 22px; }
  .mintlab-intro h1 { font-size: 23px; }
  .technical-link { display: inline-block; margin-top: 14px; }
  .catalogue-panel { padding-top: 6px; padding-bottom: 28px; }
  .terminal-label { flex-wrap: wrap; }
  .terminal-label .catalogue-caption { margin-left: auto; }
  .search-row { padding-left: 11px; }
  .search-row input { padding: 13px 0; font-size: 13px; }
  .search-button { width: 45px; flex-basis: 45px; }
  .results-heading { align-items: start; }
  .results-heading .catalogue-caption { max-width: 125px; line-height: 1.4; }
  .desktop { display: none; }
  .cards { display: block; }
  .mobile-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 10px; align-items: center; border-top: 1px solid var(--mint-line); padding: 12px 4px; }
  .mobile-card .top { display: contents; }
  .mobile-card .addr { grid-column: 1/-1; font-size: 11px; }
  .mobile-card .status { grid-column: 1; grid-row: 2; }
  .mobile-card .meta { grid-column: 1; grid-row: 3; }
  .mobile-card .choose { grid-column: 2; grid-row: 2/4; min-height: 33px; padding: 0 10px; font-size: 10px; }
  .memo-panel { margin-top: 0; padding-top: 18px; }
  .memo-progress { gap: 8px; margin-bottom: 20px; font-size: 10px; }
  .memo-progress .progress-number { width: 30px; height: 30px; }
  .memo-layout { grid-template-columns: 1fr; gap: 15px; }
  .memo-main { padding: 16px; }
  .memo-title-row h2 { font-size: 21px; }
  .back-link { font-size: 10px; }
  .memo-form input { min-height: 44px; }
  .memo-form button { min-height: 46px; }
  .memo-summary { padding: 2px 4px; }
  .memo-summary h3 { margin-bottom: 8px; }
  .mintlab-footer { flex-direction: column; gap: 9px; }
}

@media (max-width: 360px) {
  .demo-shell.mintlab-shell { width: calc(100% - 24px); }
  .mintlab-intro h1 { font-size: 23px; }
  .terminal-label .catalogue-caption { width: 100%; margin: 0 0 0 30px; }
}
