/* IMD6900 Frens mint page: the swap unit's look (style.css) laid out as a page of three units */
.frens-page { min-height: 100vh; background: #000; color: var(--term-ink); font-family: var(--mono); }
.fp-top {
  display: flex; align-items: center; gap: 16px; padding: 14px var(--gutter);
  font-family: var(--pixel); font-size: 11px; letter-spacing: 0.16em; border-bottom: 1px solid #1d2a21;
}
.fp-back { color: var(--term-ink); text-decoration: none; }
.fp-back:hover { color: var(--lit, #3ecf7a); }
.fp-name { color: var(--term-hi); font-size: 14px; }
.fp-supply { margin-left: auto; color: #3ecf7a; }

.fp-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 28px;
  max-width: 980px; margin: 28px auto 60px; padding: 0 12px; align-items: start;
}
.fp-card { width: auto; animation: none; }
.fp-wide { grid-column: 1 / -1; }

#mint-n {
  flex: 1; min-width: 0; font-family: var(--pixel); font-size: 25px; line-height: 1.2; background: transparent; border: 0;
  outline: 0; padding: 2px 0; color: var(--term-hi); caret-color: #3ecf7a; text-shadow: 0 0 8px rgba(228, 245, 231, 0.22);
}
.fp-split { font-size: 11px; color: #6f8474; min-height: 1.3em; }
.fp-split b { color: var(--term-hi); font-weight: 500; }

.fp-curve-strip { display: block; padding: 8px 10px 6px; }
.fp-curve-strip::before { display: none; }
#curve { display: block; width: 100%; height: 92px; image-rendering: pixelated; background: #090909; border-radius: 2px; }
.fp-curve-note { margin-top: 6px; font-size: 11px; }

.fp-list { display: flex; flex-direction: column; gap: 10px; min-height: 80px; }
.fp-empty { color: #4f6355; font-size: 12px; padding: 8px 0; }
.fp-req { border-bottom: 1px dashed #1f2d23; padding-bottom: 10px; }
.fp-req:last-child { border-bottom: 0; }
.fp-req-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--term-hi); }
.fp-req-state { font-family: var(--pixel); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: #e0a92a; }
.fp-req-state.ok { color: #3ecf7a; }
.fp-req-state.bad { color: #e8703a; }
.fp-thumbs { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.fp-thumbs img { width: 42px; height: 42px; image-rendering: pixelated; border: 1px solid #2c3a2f; background: #111; }
.fp-btn {
  font-family: var(--pixel); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer;
  color: #121212; background: linear-gradient(#5be394, #3ecf7a); border: 2px solid #121212; border-radius: 3px;
  padding: 7px 10px; box-shadow: 0 3px 0 #121212;
}
.fp-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #121212; }
.fp-btn:disabled { cursor: default; color: #6d706a; background: #cfd2cb; box-shadow: 0 3px 0 #6d706a; }
.fp-btn.sell { background: linear-gradient(#f0c766, #e0a92a); }

.fp-frens { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 14px 0 12px; }
.fp-fren { background: #090909; border: 2px solid #121212; border-radius: 3px; padding: 6px; color: var(--term-ink); font-size: 11px; }
.fp-fren img { display: block; width: 100%; aspect-ratio: 1; image-rendering: pixelated; background: #111; }
.fp-fren .fp-id { margin: 6px 0; color: var(--term-hi); font-family: var(--pixel); font-size: 10px; letter-spacing: 0.1em; }
.fp-fren .fp-btn { width: 100%; }
.fp-build { min-height: 50px; margin: 0 0 8px; color: #e0a92a; font: 8px var(--pixel); letter-spacing: 0.04em; }
.fp-build.revealed { min-height: 20px; color: #3ecf7a; }
.fp-build.ok { color: #3ecf7a; }
.fp-build.bad { color: #e8703a; }
.fp-build-head { display: flex; justify-content: space-between; gap: 4px; align-items: center; min-height: 20px; }
.fp-build-head a { color: #8fbfa2; text-decoration: none; white-space: nowrap; }
.fp-build-head a:hover { color: #3ecf7a; text-decoration: underline; }
.fp-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; margin-top: 4px; }
.fp-step { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; color: #627366; font: 6px var(--pixel); letter-spacing: 0; }
.fp-step i { display: block; width: 7px; height: 7px; border-radius: 50%; border: 1px solid #526356; background: #1b261e; }
.fp-step.work i { background: #e0a92a; border-color: #e0a92a; box-shadow: 0 0 7px #e0a92a; }
.fp-step.done { color: #86c79e; }
.fp-step.done i { background: #3ecf7a; border-color: #3ecf7a; }
.swap-toggle:has([data-pay="eth"].on)::before { transform: translateX(100%); }
/* three positions once imdUSD pays (its button shows only with FrenImdUsdMinter deployed) */
.swap-toggle:has([data-pay="usd"]:not([hidden])) { grid-template-columns: 1fr 1fr 1fr; }
.swap-toggle:has([data-pay="usd"]:not([hidden]))::before { width: calc((100% - 6px) / 3); }
.swap-toggle:has([data-pay="usd"]:not([hidden])) button { font-size: 10px; letter-spacing: 0.1em; }
.swap-toggle:has([data-pay="usd"].on)::before { transform: translateX(200%); }
.fp-unrevealed {
  position: relative; display: grid; place-items: center; aspect-ratio: 1; background: #0b120d;
  background-image: repeating-linear-gradient(0deg, rgba(62, 207, 122, 0.06) 0 1px, transparent 1px 4px);
}
.fp-unrevealed img { opacity: 0.9; }
.fp-unrevealed i { position: absolute; bottom: 6px; padding: 2px 6px; background: rgba(0, 0, 0, 0.72); font: normal 9px var(--pixel); letter-spacing: 0.16em; text-transform: uppercase; color: #9fb3a5; }
.fp-os {
  display: flex; align-items: center; gap: 7px; margin-left: 14px; padding: 4px 10px 4px 4px; border: 1.5px solid #2081e2; border-radius: 999px;
  color: #cfe3fb; text-decoration: none; font: 400 9px var(--pixel); letter-spacing: 0.16em; white-space: nowrap; transition: background 0.2s, box-shadow 0.2s;
}
.fp-os svg { width: 18px; height: 18px; transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1); }
.fp-os:hover { background: rgba(32, 129, 226, 0.15); box-shadow: 0 0 14px rgba(32, 129, 226, 0.45); }
.fp-os:hover svg { transform: rotate(-14deg) scale(1.1); }

/* ── THE FREN LAB: the page as a lab floor, four bays down a conduit, a station rail on top ── */
.frens-page {
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(62, 207, 122, 0.07), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 56px 56px,
    #050605;
}
.fp-name em { font-style: normal; color: #4f6355; }

.rail {
  position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: linear-gradient(#dcdbd5, #c9c8c1); box-shadow: 0 2px 0 #121212, 0 10px 24px rgba(0, 0, 0, 0.55);
}
.rail::after { /* the hazard stripe along the rail's edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 6px;
  background: repeating-linear-gradient(-45deg, #e0a92a 0 9px, #121212 9px 18px); opacity: 0.85;
}
.rail a {
  position: relative; display: grid; grid-template-columns: auto auto 1fr; grid-template-areas: "lamp no name" "lamp no note";
  align-items: center; gap: 0 9px; padding: 9px 14px 8px; color: #2b2d2a; text-decoration: none; border-right: 1px solid #a9a8a1;
  transition: background 0.2s;
}
.rail a:last-child { border-right: 0; }
.rail a .lamp { grid-area: lamp; }
.rail a b { grid-area: no; font: 18px var(--pixel); color: #8a8984; line-height: 1; }
.rail a span { grid-area: name; font: 10px var(--pixel); letter-spacing: 0.14em; color: #121212; }
.rail a small { grid-area: note; font: 11px var(--mono); color: #5d605a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail a:hover { background: rgba(255, 255, 255, 0.35); }
.rail a.on { background: #0a120c; box-shadow: inset 0 0 0 2px #121212; }
.rail a.on b { color: #3ecf7a; text-shadow: 0 0 8px rgba(62, 207, 122, 0.6); }
.rail a.on span { color: #7dffa6; }
.rail a.on small { color: #8fa293; }
@media (max-width: 720px) {
  .rail { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rail a { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "lamp no" "name name"; gap: 3px 6px; padding: 7px 7px 6px; min-width: 0; }
  .rail a small { display: none; }
  .rail a b { font-size: 15px; }
  .rail a span { font-size: 7px; letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; }
}

.fren-floor { position: relative; max-width: 1120px; margin: 0 auto; padding: 18px 14px 80px; }
.fren-floor::before { /* the conduit the bays hang on */
  content: ""; position: absolute; left: 28px; top: 40px; bottom: 60px; width: 6px; border-radius: 3px;
  background: linear-gradient(90deg, #2c3a2f, #4a5a4e 45%, #1d261f); box-shadow: 0 0 0 1px #0c0f0d;
}
@media (max-width: 720px) { .fren-floor::before { display: none; } }
.zone { position: relative; margin: 34px 0 0 0; padding-left: 42px; scroll-margin-top: 74px; animation: zone-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.zone:nth-of-type(2) { animation-delay: 0.08s; } .zone:nth-of-type(3) { animation-delay: 0.16s; } .zone:nth-of-type(4) { animation-delay: 0.24s; }
@keyframes zone-in { from { opacity: 0; transform: translateY(18px); } }
@media (max-width: 720px) { .zone { padding-left: 0; } }
.zone::before { /* the joint where the bay meets the conduit */
  content: ""; position: absolute; left: -20px; top: 12px; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e9e8e2, #8d8c86); box-shadow: 0 0 0 3px #121212, 0 0 0 5px #2c3a2f;
}
@media (max-width: 720px) { .zone::before { display: none; } }
.zone-plate { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 16px; }
.zone-no {
  font: 10px var(--pixel); letter-spacing: 0.18em; color: #121212; padding: 6px 9px 5px; background: #e0a92a;
  box-shadow: 0 0 0 2px #121212, 3px 3px 0 2px #121212;
}
.zone-plate h2 { margin: 0; font: 400 clamp(20px, 3.4vw, 30px) var(--pixel); letter-spacing: 0.08em; color: #e4f5e7; text-shadow: 0 0 18px rgba(62, 207, 122, 0.25); }
.zone-note { flex: 1; min-width: 180px; font-size: 12px; color: #6f8474; position: relative; padding-left: 16px; }
.zone-note::before { content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 1px; background: #3a4a3e; }
.zone-grid { display: grid; gap: 22px; align-items: start; }
.maker-grid { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); }
.bench-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.25fr); }
@media (max-width: 960px) { .maker-grid, .bench-grid { grid-template-columns: 1fr; } }
.zone > .fp-card { width: auto; }

/* ── the production line ── */
.line-card { display: grid; grid-template-rows: auto auto 1fr; align-self: stretch; }
.line-crt {
  position: relative; margin-top: 12px; height: 272px; overflow: hidden; border-radius: 6px; background: #040805;
  box-shadow: inset 0 0 0 1.5px #090909, inset 0 0 0 3px #3a3a38, inset 0 0 60px rgba(0, 0, 0, 0.9);
}
.line-crt::after { /* scanlines and the tube's curve */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0 1px, transparent 1px 3px), radial-gradient(130% 120% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.6));
}
.line-hud { position: absolute; z-index: 2; top: 10px; left: 12px; right: 12px; display: flex; gap: 14px; align-items: baseline; font: 9px var(--pixel); letter-spacing: 0.14em; color: #4f6355; text-transform: uppercase; }
.line-hud b { font: 600 15px var(--mono); color: #7dffa6; text-shadow: 0 0 8px rgba(125, 255, 166, 0.5); margin-right: 3px; }
.line-hud .ready b { color: #e0a92a; text-shadow: 0 0 8px rgba(224, 169, 42, 0.5); }
.line-hud .line-of { margin-left: auto; }
.line-track {
  position: absolute; left: 0; right: 0; top: 44px; height: 176px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.line-belt { display: flex; gap: 16px; width: max-content; padding: 6px 8px; animation: belt var(--belt, 40s) linear infinite; }
.line-track:hover .line-belt, .line-belt:focus-within { animation-play-state: paused; }
@keyframes belt { to { transform: translateX(-50%); } }
.belt-card {
  all: unset; box-sizing: border-box; cursor: pointer; width: 132px; display: grid; gap: 6px; padding: 6px; border-radius: 4px;
  background: linear-gradient(#e4e3dd, #c9c8c1); box-shadow: 0 0 0 2px #121212, 0 4px 0 2px #121212; transition: transform 0.15s, box-shadow 0.15s;
}
.belt-card:hover, .belt-card:focus-visible { transform: translateY(-6px) rotate(-1.5deg); box-shadow: 0 0 0 2px #121212, 0 10px 0 2px #121212, 0 0 26px rgba(125, 255, 166, 0.35); }
.belt-screen { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: #040805; border-radius: 2px; box-shadow: inset 0 0 0 1.5px #121212; }
.belt-screen img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.belt-card:not(.revealed) .belt-screen img { filter: saturate(0.5) brightness(0.85); }
.belt-card.ready .belt-screen::after { content: "READY"; position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); font: 8px var(--pixel); letter-spacing: 0.16em; color: #061008; background: #7dffa6; padding: 2px 5px 1px; box-shadow: 0 0 10px rgba(125, 255, 166, 0.7); animation: lamp-pulse 1.6s ease-in-out infinite; }
.belt-tag { display: flex; align-items: center; justify-content: space-between; font: 9px var(--pixel); letter-spacing: 0.12em; color: #121212; }
.line-rollers {
  position: absolute; left: 0; right: 0; bottom: 18px; height: 16px;
  background: radial-gradient(circle at 50% 50%, #5d6b60 0 4px, #2a332c 4.5px 6px, transparent 6.5px) 0 0 / 22px 16px, linear-gradient(#141a15, #0b0f0c);
  box-shadow: 0 -2px 0 #2c3a2f, 0 2px 0 #090909; animation: rollers 0.8s linear infinite;
}
@keyframes rollers { to { background-position: -22px 0, 0 0; } }
.line-beam { /* the QC scanner over the line's middle */
  position: absolute; z-index: 1; left: 50%; top: 34px; bottom: 30px; width: 2px; transform: translateX(-50%);
  background: linear-gradient(transparent, #7dffa6 20%, #7dffa6 80%, transparent); box-shadow: 0 0 14px 2px rgba(125, 255, 166, 0.45);
  opacity: 0.55; animation: beam 2.6s ease-in-out infinite; pointer-events: none;
}
@keyframes beam { 50% { opacity: 0.15; } }
.line-foot { display: grid; gap: 12px; padding: 12px 2px 4px; }
.line-foot p { margin: 0; font-size: 12px; line-height: 1.5; color: #2b2d2a; }
.line-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.line-btns .fp-btn { text-decoration: none; }
.line-go { flex: 1; min-width: 220px; }
.swap-go[hidden] { display: none; } /* .swap-go's display: block would show a hidden key, empty */
.line-empty { padding: 70px 20px; font: 10px var(--pixel); letter-spacing: 0.14em; color: #4f6355; }
@media (prefers-reduced-motion: reduce) { .line-belt, .line-rollers, .line-beam, .zone { animation: none !important; } }

/* fits: the bench side by side, nothing wider than the screen, the line filling its tube */
.bench-grid > .fp-wide { grid-column: auto; }
.zone-grid > * { min-width: 0; }
.zone .fp-card { max-width: 100%; box-sizing: border-box; }
.line-card { grid-template-rows: auto 1fr auto; }
.line-crt { height: auto; min-height: 272px; }
.line-track { top: calc(50% - 82px); }
.line-rollers { top: calc(50% + 96px); bottom: auto; }
.line-beam { top: calc(50% - 96px); bottom: auto; height: 192px; }
@media (max-width: 720px) {
  .fp-top { flex-wrap: wrap; gap: 6px 12px; padding: 10px 12px; }
  .fp-name { font-size: 12px; }
  .fp-name em { display: none; }
  .fp-supply { order: 3; flex-basis: 100%; margin-left: 0; font-size: 9px; }
  .fp-os { margin-left: auto; }
  .fren-floor { padding: 12px 10px 60px; }
  .zone-plate h2 { font-size: 19px; }
  .zone .swap { padding: 12px 12px 10px; }
  .line-crt { min-height: 236px; }
  .belt-card { width: 110px; }
}

/* a phone: the floor's readout fits its screen, the bays' notes under their names, the keys a thumb wide */
@media (max-width: 720px) {
  #floor-val { font-size: 16px; white-space: normal; overflow-wrap: anywhere; }
  .zone { scroll-margin-top: 64px; }
  .zone-plate { gap: 6px 10px; }
  .zone-note { flex-basis: 100%; padding-left: 0; font-size: 11px; }
  .zone-note::before { display: none; }
  .line-btns { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .line-go { min-width: 0; }
  .line-btns .fp-btn { padding: 12px 12px; }
  .frens-page .lab-bar { gap: 8px; }
  .frens-page .lab-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
  .frens-page .lab-count { min-width: 0; padding: 5px 7px 4px; }
  .frens-page .lab-filters { margin-left: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; }
  .frens-page .lab-filters::-webkit-scrollbar { display: none; }
  .frens-page .lab-filters button { flex: none; padding: 9px 10px 8px; }
  .frens-page .lab-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .frens-page .lab-foot { font-size: 7px; gap: 4px; }
  .frens-page .ct-links { display: grid; grid-template-columns: 1fr; }
  .frens-page .ct-links .fp-btn { padding: 11px 10px; text-align: center; }
  #mint-n, #mint-for { font-size: 16px; } /* iOS: no zoom on focus */
}

/* minting for another wallet (the one holding the identity.md, kept offline: delegate.xyz) */
.fp-for { margin-bottom: 8px; }
.fp-for[hidden], .fp-for-open[hidden] { display: none; }
.fp-for-open, .fp-for-x { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: 10px; color: #6f8a76; }
.fp-for-open { display: block; margin: 0 0 8px; text-decoration: underline dotted #2f4a37; text-underline-offset: 3px; }
.fp-for-x { margin-left: 8px; font-size: 12px; }
.fp-for-open:hover, .fp-for-x:hover { color: var(--lit, #9be38a); }
.fp-for input { flex: 1; min-width: 0; margin-left: 12px; background: transparent; border: 0; border-bottom: 1px dashed #2a3a2f; color: #e4f5e7;
  font: inherit; font-size: 12px; padding: 3px 0; text-align: right; outline: none; }
.fp-for input::placeholder { color: #4f6355; }
.fp-for input:focus { border-bottom-color: var(--lit, #9be38a); }
.fp-for-help { font-size: 11px; line-height: 1.45; color: var(--term-ink); margin: 2px 0 6px; padding: 6px 8px; border: 1px dashed #2a3a2f; }
.fp-for-help b { color: var(--lit, #9be38a); }
.fp-for-help a { color: inherit; }
