/* EagleTagz demo: the Store's buyer path, My Library and Contracts (changes #13 and #3, October 2026).
 * Script: store.js. The button colours come from buttons.css: gold for the one main action in view,
 * gray, plain, and red text. Text uses the six sizes (34, 22, 17, 16, 13, 12). */

/* ---------- shared ---------- */
.etz-hidden { display: none !important; }
html.etz-noscroll, html.etz-noscroll body { overflow: hidden; }
button.etz-b, a.etz-b { transform: none !important; } /* the pages' buttons grew on hover */

/* buttons this file adds */
.etz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
}
.etz-btn.etz-b-compact { padding: 0 12px; }
.etz-btn.etz-b-icon { width: 44px; padding: 0; }
.etz-btn.etz-b-icon.etz-b-compact { width: 32px; }
@media (pointer: coarse) { .etz-btn.etz-b-icon.etz-b-compact { width: 44px; } }
.etz-btn[aria-busy='true'] { opacity: 0.6; pointer-events: none; }
.etz-linkbtn, .etz-edit-cart, .etz-done-map a {
  color: #e5e7eb;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.etz-linkbtn {
  min-height: 32px;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}
@media (pointer: coarse) { .etz-linkbtn { min-height: 44px; } }
.etz-linkbtn:hover, .etz-edit-cart:hover, .etz-done-map a:hover { color: #fff; }
.etz-linkbtn:focus-visible, .etz-edit-cart:focus-visible, .etz-done-map a:focus-visible, .etz-steps a:focus-visible {
  outline: 2px solid #f1c50e;
  outline-offset: 2px;
  border-radius: 4px;
}

/* messages at the top of the page (the same look as on the creator pages), above any dialog */
.etz-toast-stack {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(calc(100vw - 32px), 480px);
  pointer-events: none;
}
.etz-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left-width: 4px;
  background: #1f2937;
  color: #f9fafb;
  font-size: 16px;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.etz-toast > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.etz-toast.success { border-left-color: #22c55e; }
.etz-toast.error { border-left-color: #ef4444; }
.etz-toast.info { border-left-color: #3b82f6; }
.etz-toast-action {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #f1c50e;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
@media (pointer: coarse) { .etz-toast-action { min-height: 44px; } }
.etz-toast-action:focus-visible { outline: 2px solid #f1c50e; outline-offset: 2px; }

/* status labels */
.etz-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #d1d5db;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.etz-chip-ok { background: rgba(34, 197, 94, 0.14); color: #4ade80; }
.etz-chip-ok::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.etz-chip-wait { background: rgba(241, 197, 14, 0.14); color: #f1c50e; }
.etz-chip-off { background: rgba(255, 123, 115, 0.14); color: #ff7b73; }

/* ---------- dialogs: license details and the player (a sheet from the bottom on phones) ---------- */
.etz-modal-back {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
}
.etz-modal {
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: #1a2430;
  color: #f9fafb;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
@supports (height: 100dvh) { .etz-modal { max-height: calc(100dvh - 32px); } }
.etz-modal-wide { max-width: 880px; }
.etz-modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.etz-modal-head h2 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.etz-modal-x {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #d1d5db;
  font-size: 17px;
  cursor: pointer;
}
.etz-modal-x:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.etz-modal-x:focus-visible { outline: 2px solid #f1c50e; outline-offset: -2px; }
.etz-modal-body { padding: 16px 20px; overflow-y: auto; }
.etz-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.etz-modal-foot[hidden] { display: none; }
@media (max-width: 767px) {
  .etz-modal-back { align-items: flex-end; padding: 0; }
  .etz-modal {
    max-width: none;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .etz-modal-foot { flex-direction: column-reverse; }
  .etz-modal-foot .etz-btn { width: 100%; }
}

/* facts in License details */
.etz-facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; margin: 0; }
.etz-facts > div { display: contents; }
.etz-facts dt { padding-top: 2px; color: #9ca3af; font-size: 13px; }
.etz-facts dd { margin: 0; color: #f9fafb; font-size: 16px; overflow-wrap: anywhere; }
.etz-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px !important; }
@media (max-width: 479px) {
  .etz-facts { grid-template-columns: 1fr; gap: 2px; }
  .etz-facts dd { margin-bottom: 10px; }
}

/* the player */
.etz-player .etz-modal-body { padding: 0; }
.etz-player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 220px); /* a short window: the picture shrinks, the buttons stay in view */
  display: grid;
  place-items: center;
  background: #000;
}
.etz-player-stage video { display: block; width: 100%; height: 100%; background: #000; }
.etz-player-note {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 440px;
  margin: 0;
  padding: 24px;
  color: #d1d5db;
  font-size: 16px;
  line-height: 1.45;
}
.etz-player-note i { flex: none; color: #9ca3af; }
.etz-player-meta { margin: 0; padding: 12px 20px; color: #9ca3af; font-size: 13px; }
.etz-player-meta:empty { display: none; }

/* the "..." menu */
.etz-menu {
  position: fixed;
  z-index: 9000;
  min-width: 220px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: #1a2430;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.etz-menu-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #f9fafb;
  font: inherit;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
}
@media (pointer: coarse) { .etz-menu-item { min-height: 44px; } }
.etz-menu-item i { width: 18px; text-align: center; color: #9ca3af; }
.etz-menu-item:hover, .etz-menu-item:focus-visible { background: rgba(255, 255, 255, 0.08); outline: none; }
.etz-menu-danger, .etz-menu-danger i { color: #ff7b73; }
.etz-menu-item + .etz-menu-danger { margin-top: 7px; }
.etz-menu-item + .etz-menu-danger::before {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  top: -4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ---------- Browse ---------- */
#products-grid button[onclick^="deleteProduct"] { display: none !important; } /* the owner removes items on Price & Copyright */
#products-grid .product-card { border-color: rgba(255, 255, 255, 0.08); }
#products-grid .text-blue-400 { color: #9ca3af !important; }

/* ---------- a product's page: dark like the rest of the Store ---------- */
body:has(#product-detail) { background: #111827 !important; }
#product-detail { color: #e5e7eb; }
#product-detail .bg-white { background: #1f2937 !important; border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: none !important; }
#product-detail .text-gray-900 { color: #f9fafb !important; }
#product-detail .text-gray-700, #product-detail .text-gray-600 { color: #d1d5db !important; }
#product-detail .text-gray-500 { color: #9ca3af !important; }
#product-detail .border-gray-200 { border-color: rgba(255, 255, 255, 0.1) !important; }
#product-detail .text-purple-600 { color: #9ca3af !important; }
#product-detail .bg-purple-100 { background: rgba(255, 255, 255, 0.08) !important; color: #e5e7eb !important; }
#product-detail button[onclick^="purchaseProduct"] { min-height: 52px !important; border-radius: 12px !important; }
/* its AI Micro-Tags, from the item's tagging */
.etz-tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
  font-size: 13px;
}
.etz-tag-note { margin: 10px 0 0; color: #9ca3af; font-size: 13px; }

/* ---------- rows: the cart, checkout and the confirmation ---------- */
.etz-rows { display: flex; flex-direction: column; gap: 12px; }
.etz-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: #1f2937;
}
.checkout-card .etz-row, .etz-done .etz-row { background: rgba(255, 255, 255, 0.03); }
.etz-row-thumb {
  flex: none;
  width: 96px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background: #111827;
}
.etz-row-noart { display: grid; place-items: center; color: #6b7280; font-size: 22px; }
.etz-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.etz-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; width: 100%; }
.etz-row-title { min-width: 0; margin: 0; color: #f9fafb; font-size: 17px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.etz-row-meta { margin: 0; color: #9ca3af; font-size: 13px; }
.etz-row-price { flex: none; margin: 0; color: #f9fafb; font-size: 17px; font-weight: 700; line-height: 1.3; }
.etz-row-action { margin-top: 8px; }
@media (max-width: 479px) {
  .etz-row { gap: 12px; padding: 12px; }
  .etz-row-thumb { width: 80px; height: 45px; }
  .etz-row-head { flex-direction: column; gap: 2px; } /* the price under the name, so the name has the width */
  .etz-row-price { font-size: 16px; }
}

/* ---------- checkout (its step bar is in topbar.css, shared with the creator path) ---------- */
.etz-review-card { position: relative; }
.etz-edit-cart {
  position: absolute;
  top: 24px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  font-size: 16px;
}
.etz-locnote {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: -4px 0 16px;
  color: #d1d5db;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}
.etz-locnote i { margin-top: 2px; color: #f1c50e; }
.checkout-card .bg-gradient-to-r.from-blue-900 { background: rgba(255, 255, 255, 0.05) !important; border: 1px solid rgba(255, 255, 255, 0.08); }
.checkout-card .fa-wallet.text-blue-400 { color: #9ca3af !important; }
.checkout-card { border-color: rgba(255, 255, 255, 0.08) !important; }
/* on phones and iPads: the order, then the total with Complete Purchase, then the wallet */
@media (max-width: 1023px) {
  .lg\:col-span-2:has(#order-items) { display: contents; }
  .checkout-card:has(#order-items) { order: 1; margin-bottom: 0 !important; }
  .lg\:col-span-1:has(#complete-purchase-btn) { order: 2; }
  .checkout-card:has(#wallet-address) { order: 3; }
}
@media (max-width: 767px) {
  .checkout-card { padding: 20px !important; }
  .etz-edit-cart { top: 12px; right: 12px; }
}

/* placing the order */
.etz-progress { max-width: 400px; outline: none; }
.etz-progress-steps { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 0; padding: 0; list-style: none; }
.etz-progress-steps li {
  display: grid;
  grid-template-columns: 20px 1fr;
  column-gap: 12px;
  align-items: center;
  color: #9ca3af;
  font-size: 16px;
}
.etz-progress-steps li > i { color: #4b5563; font-size: 16px; text-align: center; }
.etz-progress-steps li[data-state='now'], .etz-progress-steps li[data-state='done'] { color: #f9fafb; }
.etz-progress-steps li[data-state='now'] > i { color: #f1c50e; }
.etz-progress-steps li[data-state='done'] > i { color: #4ade80; }
.etz-progress-steps li[data-state='fail'] > i { color: #ff7b73; }
.etz-progress-detail { grid-column: 2; color: #9ca3af; font-size: 13px; }
.etz-progress-detail:empty { display: none; }
.etz-progress-error { margin-top: 16px; }
.etz-progress-error[hidden] { display: none; }
.etz-dialog .etz-progress-what { margin: 0 0 4px; color: #f9fafb; font-size: 16px; }
.etz-dialog .etz-progress-why { margin: 0; color: #9ca3af; font-size: 13px; }
.etz-progress .etz-dialog-actions { margin-top: 20px; }
.etz-progress .etz-dialog-actions[hidden] { display: none; }

/* Order confirmed */
.etz-done { max-width: 720px; margin: 0 auto; outline: none; }
.etz-done-head { margin-bottom: 24px; text-align: center; }
.etz-done-check {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
  font-size: 22px;
}
.etz-done h1 { margin: 0 0 8px; color: #f9fafb; font-size: 34px; font-weight: 700; line-height: 1.15; }
.etz-done-head p { margin: 0; color: #d1d5db; font-size: 17px; }
.etz-done-card {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #1f2937;
}
.etz-done-facts { display: flex; flex-wrap: wrap; gap: 16px 32px; margin: 0 0 20px; }
.etz-done-facts dt { color: #9ca3af; font-size: 13px; }
.etz-done-facts dd { margin: 2px 0 0; color: #f9fafb; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.etz-done-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.etz-done-actions .etz-btn { flex: 1 1 200px; }
.etz-done-map { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; color: #9ca3af; font-size: 13px; }
@media (max-width: 767px) {
  .etz-done h1 { font-size: 22px; }
  .etz-done-card { padding: 16px; }
}

/* ---------- My Library ---------- */
.etz-seg {
  display: inline-flex;
  gap: 2px;
  max-width: 100%;
  margin: 0 0 24px;
  padding: 3px;
  overflow-x: auto;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}
.etz-seg[hidden] { display: none; }
.etz-seg button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #d1d5db;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
@media (pointer: coarse) { .etz-seg button { min-height: 44px; } }
.etz-seg button[aria-checked='true'] { background: #f9fafb; color: #111827; }
.etz-seg button:focus-visible { outline: 2px solid #f1c50e; outline-offset: 2px; }
.etz-seg-count { font-size: 13px; opacity: 0.7; }

#purchases-grid.etz-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.etz-lib-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: #1f2937;
}
.etz-lib-art {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #0b1117;
  cursor: pointer;
}
.etz-lib-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s ease; }
.etz-lib-art:hover img { transform: scale(1.03); }
.etz-lib-art:focus-visible { outline: 2px solid #f1c50e; outline-offset: -2px; }
.etz-lib-art:disabled { cursor: default; }
.etz-lib-art:disabled img { filter: grayscale(1) brightness(0.6); }
.etz-lib-noart { display: grid; place-items: center; width: 100%; height: 100%; color: #4b5563; font-size: 34px; }
.etz-lib-kind {
  position: absolute;
  left: 8px;
  top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #f9fafb;
  font-size: 12px;
  font-weight: 600;
}
.etz-lib-playicon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 17px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.etz-lib-art:hover .etz-lib-playicon, .etz-lib-art:focus-visible .etz-lib-playicon { opacity: 1; }
@media (hover: none) { .etz-lib-playicon { opacity: 1; } }
.etz-lib-art:disabled .etz-lib-playicon { display: none; }
.etz-lib-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; min-width: 0; }
.etz-lib-title {
  margin: 0;
  overflow: hidden;
  color: #f9fafb;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.etz-lib-meta { margin: 0; color: #9ca3af; font-size: 13px; }
.etz-lib-body .etz-chip { align-self: flex-start; }
.etz-lib-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; }
.etz-lib-actions [data-more] { margin-left: auto; }
/* phones: one row per item, the picture on the left */
@media (max-width: 599px) {
  #purchases-grid.etz-lib-grid { grid-template-columns: 1fr; gap: 12px; }
  .etz-lib-card { flex-direction: row; }
  .etz-lib-art { width: 120px; flex: none; aspect-ratio: auto; }
  .etz-lib-art img, .etz-lib-art .etz-lib-noart { position: absolute; inset: 0; }
  .etz-lib-kind { display: none; }
  .etz-lib-playicon { width: 40px; height: 40px; margin: -20px 0 0 -20px; font-size: 16px; }
  .etz-lib-body { padding: 12px; gap: 4px; }
  .etz-lib-title { font-size: 16px; }
  .etz-lib-actions { gap: 6px; padding-top: 6px; }
}

/* ---------- Contracts ---------- */
#contracts-list.etz-con-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
#contracts-list.etz-con-list > * + * { margin-top: 0 !important; }
.etz-con-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: #1f2937;
  scroll-margin-top: 120px;
}
.etz-con-picked { border-color: #f1c50e; }
.etz-con-top { display: flex; align-items: flex-start; gap: 12px; }
.etz-con-art {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 10px;
  background: #111827;
  color: #6b7280;
  font-size: 22px;
}
.etz-con-art img { width: 100%; height: 100%; object-fit: cover; }
.etz-con-main { flex: 1; min-width: 0; }
.etz-con-title {
  margin: 0 0 4px;
  overflow: hidden;
  color: #f9fafb;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.etz-con-line { margin: 0; color: #9ca3af; font-size: 13px; }
.etz-con-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.etz-con-facts dt { color: #9ca3af; font-size: 12px; font-weight: 600; }
.etz-con-facts dd { margin: 2px 0 0; color: #e5e7eb; font-size: 16px; }
.etz-rights { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.etz-rights li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #d1d5db;
  font-size: 13px;
}
.etz-rights i { color: #9ca3af; font-size: 12px; }
.etz-con-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.etz-con-id {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #6b7280;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.etz-con-actions { flex: none; display: flex; gap: 8px; }
@media (max-width: 599px) { #contracts-list.etz-con-list { grid-template-columns: 1fr; } }

/* the four totals: small tiles, two to a row on phones */
.stat-card.rounded-2xl { padding: 16px !important; text-align: left !important; }
.stat-card.rounded-2xl > i { display: block; margin-bottom: 8px !important; color: #9ca3af !important; font-size: 17px !important; }
.stat-card.rounded-2xl > p:first-of-type { font-size: 22px !important; line-height: 1.2; }
@media (max-width: 767px) {
  .grid:has(#total-contracts) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  .stat-card.rounded-2xl { padding: 12px 16px !important; }
  .stat-card.rounded-2xl > i { display: none; }
  body:has(#contracts-list) .flex.items-center.justify-between.mb-8 { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ---------- sign-in (change #22, part 1; the form itself is in account.css) ---------- */
/* checkout: "Who's buying?" above the order, then "Buying as ..." */
.etz-buyer { padding: 24px; margin-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.etz-buyer-title { margin: 0; font-size: 22px; line-height: 28px; font-weight: 700; color: #f9fafb; }
.etz-buyer-why { margin: 0 0 4px; font-size: 16px; line-height: 22px; color: #d1d5db; }
.etz-buyer-form { max-width: 420px; }
.etz-buyer-note { margin: 8px 0 0; font-size: 13px; line-height: 18px; color: #9ca3af; }
.etz-buyer-note[hidden] { display: none; }
.etz-buyer.etz-buyer-in { flex-direction: row; align-items: center; gap: 12px; padding: 16px 24px; }
.etz-buyer-check { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 16px; background: #13301f; color: #4ade80; font-size: 15px; }
.etz-buyer-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.etz-buyer-small { font-size: 13px; color: #9ca3af; }
.etz-buyer-email { font-size: 16px; font-weight: 600; color: #f9fafb; overflow-wrap: anywhere; }
.etz-buyer .etz-buyer-change { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-size: 16px; text-decoration: none; }
.etz-buyer .etz-buyer-change:hover { text-decoration: underline; }
.etz-buyhint { display: flex; align-items: flex-start; gap: 8px; margin: -4px 0 12px; color: #d1d5db; font-size: 13px; line-height: 1.45; text-align: left; }
.etz-buyhint i { margin-top: 2px; color: #f1c50e; }
.etz-buyhint:empty { display: none; }
#complete-purchase-btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; transform: none !important; }
@media (max-width: 1023px) {
  .etz-buyer { order: 0; margin-bottom: 0 !important; } /* first on phones: who's buying, the order, then the total */
}
@media (max-width: 639px) {
  .etz-buyer { padding: 16px; }
  .etz-buyer.etz-buyer-in { padding: 12px 16px; }
}

/* My Library and Contracts, signed out */
.etz-signin-card {
  grid-column: 1 / -1;
  max-width: 480px;
  margin: 32px auto;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  background: #121a22;
  border: 1px solid #233040;
  border-radius: 16px;
}
.etz-signin-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 32px; background: #2a2410; color: #f1c50e; font-size: 26px; }
.etz-signin-card h2 { margin: 4px 0 0; font-size: 22px; line-height: 28px; font-weight: 700; color: #f9fafb; }
.etz-signin-card p { margin: 0 0 8px; font-size: 16px; line-height: 22px; color: #d1d5db; }

/* the order confirmation, when a purchase couldn't be added to the buyer's library */
.etz-done-warn { color: #fcd34d; }
.etz-done-warn i { color: #f59e0b; }

/* who made an item (change #22, part 2): "by <creator name>" under its title, on Browse and on its page */
.etz-by { margin: -4px 0 8px; color: #9ca3af; font-size: 13px; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etz-by-lg { margin: -8px 0 16px; font-size: 16px; line-height: 22px; white-space: normal; }

/* Market #3 (21 Oct): search, Video / Audio, Free / Paid and sort above the items (store.js, browseTools) */
.etz-mkt-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 12px; }
.etz-mkt-search { position: relative; flex: 1 1 280px; min-width: 0; margin: 0; }
.etz-mkt-search > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: 14px; pointer-events: none; }
.etz-mkt-search input {
  width: 100%; height: 44px; margin: 0; padding: 0 14px 0 40px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16); background: #121a22; color: #f9fafb; font-size: 16px; line-height: 20px;
}
.etz-mkt-search input::placeholder { color: #9ca3af; }
.etz-mkt-search input:focus-visible { outline: 2px solid #f1c50e; outline-offset: 1px; }
.etz-mkt-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: #121a22; border: 1px solid rgba(255, 255, 255, 0.12); }
.etz-mkt-seg button {
  min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent;
  color: #d1d5db; font-size: 14px; line-height: 18px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.etz-mkt-seg button:hover { color: #f9fafb; background: rgba(255, 255, 255, 0.06); }
.etz-mkt-seg button[aria-pressed='true'] { background: #374151; color: #f9fafb; }
.etz-mkt-seg button:focus-visible { outline: 2px solid #f1c50e; outline-offset: 1px; }
.etz-mkt-sort { margin: 0; }
.etz-mkt-sort select {
  height: 44px; margin: 0; padding: 0 36px 0 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.16);
  background-color: #121a22; color: #f9fafb; font-size: 16px; cursor: pointer;
}
.etz-mkt-sort select:focus-visible { outline: 2px solid #f1c50e; outline-offset: 1px; }
.etz-mkt-count { margin: 0 0 16px; color: #9ca3af; font-size: 13px; line-height: 18px; min-height: 18px; }
.etz-mkt-none { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 16px; text-align: center; color: #d1d5db; font-size: 16px; }
.etz-mkt-none[hidden] { display: none; }
.etz-mkt-none p { margin: 0; }
@media (pointer: coarse) { .etz-mkt-seg button { min-height: 44px; } }
@media (max-width: 767px) {
  /* phones: the search, then both choices on one row where they fit ("Any" for "Any price"), then the sort */
  .etz-mkt-tools { gap: 8px; }
  .etz-mkt-search { flex-basis: 100%; }
  .etz-mkt-seg { flex: 1 1 auto; }
  .etz-mkt-seg button { flex: 1 1 auto; padding: 0 8px; }
  .etz-mkt-wide { display: none; }
  .etz-mkt-sort { flex: 1 1 100%; }
  .etz-mkt-sort select { width: 100%; }
}

/* Market #1 (21 Oct): on phones, Purchase Now just above the tab bar while the page's own button is out of sight (store.js, buyBar) */
.etz-buybar { display: none; }
@media (max-width: 767px) {
  .etz-buybar:not([hidden]) {
    position: fixed; left: 0; right: 0; bottom: calc(57px + env(safe-area-inset-bottom)); z-index: 44; /* on the tab bar: 56 px and its 1 px line */
    display: flex; align-items: center; gap: 16px; padding: 8px 16px;
    background: rgba(18, 26, 34, 0.98); border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
  .etz-buybar-price { flex: none; max-width: 40%; color: #f9fafb; font-size: 17px; line-height: 22px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .etz-buybar .etz-buybar-btn {
    flex: 1 1 auto; min-height: 48px !important; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    margin: 0; font-size: 16px;
  }
  body.etz-buybar-on { padding-bottom: calc(57px + 65px + env(safe-area-inset-bottom)) !important; }
}
