.ff-machine-section {
  border-radius: 45% 45% 40% 40% / 30px 30px 25px 25px;
}
.ff-page .ff-machine-invitation { margin-top: 10px; color: #503b25; font-size: clamp(.92rem, 1.35vw, 1.08rem); }
.ff-page .ff-machine-no-script { margin-top: 15px; text-align: center; }
.ff-machine-deck {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(9px, 1.15vw, 18px);
}
.ff-page .ff-machine-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  min-height: 171px;
  font: inherit;
  color: inherit;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  padding: clamp(13px, 1.5vw, 23px);
  overflow: hidden;
  border: 1px solid #ad783547;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffaf0, #edddbf);
  box-shadow: 0 4px 14px #45290d1c;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.ff-machine-card img {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: 43%;
  height: 100%;
  object-fit: cover;
  mask-image: linear-gradient(90deg, transparent, #000 59%);
}
.ff-page .ff-machine-card:hover { border-color: #9d661c; box-shadow: 0 7px 22px #70491133; }
.ff-page .ff-machine-card:is(:active, [aria-expanded="true"]) {
  color: #fbf4e7;
  border-color: #a26b25;
  background: radial-gradient(ellipse at bottom right, #593918, #131920 66%);
  box-shadow: 0 7px 22px #63411649, inset 0 0 0 1px #dfa54d35;
}
.ff-machine-card[aria-expanded="true"] img { opacity: .65; }
.ff-machine-card .ff-machine-icon { width: 25px; height: 25px; color: #84520b; }
.ff-machine-icon svg { display: block; width: 100%; height: 100%; }
.ff-machine-card:is(:active, [aria-expanded="true"]) .ff-machine-icon { color: #ffd36a; }
.ff-machine-card .ff-machine-title {
  display: block;
  max-width: 79%;
  font: 700 clamp(1.25rem, 2.1vw, 2.05rem)/.94 var(--serif);
  letter-spacing: -.022em;
}
.ff-machine-card .ff-machine-description { display: block; max-width: 66%; font-size: .86rem; line-height: 1.35; }
.ff-machine-card::after {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: auto;
  border: 1px solid #a26b25;
  border-radius: 50%;
  background: #18130b;
  color: #ffdf9d;
  content: '›';
  font-size: 1.1rem;
}
.ff-machine-card[aria-expanded="true"]::after { background: #efc36a; color: #211608; }
html.ff-machine-modal-open { overflow: hidden; padding-inline-end: var(--ff-machine-scrollbar, 0px); }
.ff-machine {
  position: fixed;
  width: min(85vw, 1100px);
  max-width: none;
  max-height: 90vh;
  max-height: 90dvh;
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  color: #f8f6f2;
  font: inherit;
  color-scheme: dark;
  border: 1px solid #ad7835;
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 100% 5%, #233141 0%, transparent 58%),
    radial-gradient(ellipse at 96% 100%, #392617 0%, transparent 60%),
    #0b1017;
  box-shadow: 0 13px 34px #58401936, inset 0 0 0 1px #c893402b;
}
.ff-machine[open] { animation: ff-machine-enter 510ms cubic-bezier(.22,.67,.3,1) both; }
.ff-machine::backdrop { background: #03070cce; backdrop-filter: blur(3px); }
@keyframes ff-machine-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.ff-machine-dialog-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: clamp(14px, 2vw, 26px) clamp(17px, 3.2vw, 38px);
  border-bottom: 1px solid #b283423f;
  background: linear-gradient(110deg, #0d1520, #1a2837);
}
.ff-page .ff-machine-dialog-header h2 { font-size: clamp(1.8rem, 3.8vw, 3.2rem); font-style: normal; }
.ff-page #ff-machine-dialog-description { margin-top: 4px; color: #d5dce5; font-size: .89rem; }
.ff-machine-close, .ff-machine-explore {
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid #bc914d;
  border-radius: 6px;
  background: #131d28;
  color: #fff5de;
  font: 650 .9rem/1.25 var(--sans);
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}
.ff-machine-close { flex: none; min-width: 44px; font-size: 1.5rem; }
.ff-machine-close:hover, .ff-machine-explore:hover { background: #283344; }
.ff-demo-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: clamp(14px, 2vw, 29px);
  align-content: start;
  padding: clamp(17px, 3.2vw, 38px);
}
.ff-demo-panel[hidden] { display: none; }
.ff-demo-header { grid-column: 1 / -1; }
.ff-demo-header > [data-demo-instructions] { margin-top: 8px; color: #cad2dc; max-width: 71ch; font-size: .95rem; }
.ff-demo-audio[hidden] { display: none; }
.ff-demo-audio { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 11px; }
.ff-demo-audio button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid #bc914d;
  border-radius: 6px;
  color: #fff5de;
  background: #131d28;
  font: 650 .87rem/1.25 var(--sans);
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}
.ff-demo-audio button svg { flex: none; color: #ffd585; }
.ff-machine[open] .ff-demo-audio button:not([data-audio-playing]) {
  animation: ff-audio-pulse 2.8s ease-in-out infinite;
}
@keyframes ff-audio-pulse {
  0%, 100% { border-color: #bc914d; box-shadow: 0 0 4px #e7af5030; }
  50% { border-color: #e7b760; box-shadow: 0 0 11px #e7af5054; }
}
.ff-demo-audio button:hover { background: #283344; }
.ff-demo-audio button:focus-visible { outline: 2px solid #ffda89; outline-offset: 4px; }
.ff-demo-audio-status { color: #d6ccbb; font-size: .8rem; }
.ff-page .ff-demo-kicker, .ff-page .ff-demo-result-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
  margin-bottom: 6px;
  color: #ffcf78;
  font: 700 .73rem/1.4 var(--sans);
  letter-spacing: .11em;
  text-transform: uppercase;
}
.ff-demo-kicker span {
  padding: 2px 7px;
  border: 1px solid #ba90395c;
  border-radius: 20px;
  color: #dec49b;
  letter-spacing: .05em;
  font-size: .65rem;
}
.ff-page .ff-demo-header h3 { font-size: clamp(1.7rem, 3.1vw, 2.75rem); }
.ff-demo-controls { display: grid; align-content: start; gap: 12px; }
.ff-demo-field { display: grid; gap: 4px; color: #f8f6f2; font-size: .88rem; font-weight: 600; }
.ff-demo-field select {
  width: 100%;
  min-height: 45px;
  padding: 7px 10px;
  color: #f8f6f2;
  color-scheme: dark;
  background: #111d2a;
  border: 1px solid #738397;
  border-radius: 6px;
  font: 400 .96rem/1.3 var(--sans);
}
.ff-demo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 3px; }
.ff-demo-actions button {
  min-height: 44px;
  border: 1px solid #bc914d;
  border-radius: 6px;
  padding: 7px 13px;
  background: #fcce77;
  color: #241605;
  font: 700 .87rem/1.3 var(--sans);
  cursor: pointer;
}
.ff-demo-actions button:not([data-demo-action="reset"]):hover { background: #ffe3a6; }
.ff-demo-actions [data-demo-action="reset"] { background: transparent; color: #f6e5c5; }
.ff-demo-actions button[aria-disabled="true"] { opacity: .63; cursor: wait; }
.ff-demo-extras { display: grid; gap: 3px; margin: 0; padding: 0; border: 0; color: #e8e5df; font-size: .88rem; }
.ff-demo-extras legend { color: #fff4df; font-weight: 600; }
.ff-demo-extras label { display: flex; align-items: center; gap: 7px; min-height: 31px; cursor: pointer; }
.ff-demo-extras input { width: 18px; height: 18px; margin: 0; accent-color: #f1bc61; }
.ff-demo-output {
  padding: clamp(13px, 2.2vw, 31px);
  min-width: 0;
  border: 1px solid #a281514f;
  border-radius: 10px;
  background: #090f17b8;
}
.ff-demo-output h4 { margin: 0 0 8px; color: #fff3dc; font: 600 clamp(1.6rem, 2.8vw, 2.6rem)/1 var(--serif); }
.ff-demo-output dl { margin: 8px 0 10px; }
.ff-demo-output dl div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 8px; min-height: 38px; padding: 6px 0; border-bottom: 1px solid #c89d5442; }
.ff-demo-output dt { color: #d4b57e; }
.ff-demo-output dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.ff-page .ff-demo-note { color: #c9d1dc; font-size: .86rem; line-height: 1.45; }
.ff-demo-output .ff-demo-note { min-block-size: 3em; }
.ff-demo-sample { height: 30px; margin-block: 12px; border: 1px solid #ae845a; border-radius: 4px; background: linear-gradient(100deg, #473222, #8e6044, #503629); }
.ff-demo-sample[data-finish="oak"] { background: linear-gradient(100deg, #b0936d, #e5c892, #bda178); }
.ff-demo-sample[data-finish="black"] { background: linear-gradient(100deg, #151617, #535353, #202124); }
.ff-demo-path { display: grid; gap: 0; margin: 0; padding-left: 20px; list-style: none; }
.ff-demo-path li { position: relative; padding: 4px 0 7px 12px; border-left: 1px solid #ae915d77; }
.ff-demo-path li::before { content: ''; position: absolute; top: 11px; left: -4px; width: 7px; height: 7px; border-radius: 50%; background: #a6834d; }
.ff-demo-path li.is-complete::before { background: #ffcf78; box-shadow: 0 0 8px #e0a84881; }
.ff-demo-path strong, .ff-demo-path span { display: block; font-size: .86rem; }
.ff-demo-path span { color: #c9d1dc; }
.ff-demo-local-note { min-block-size: 2.9em; }
.ff-demo-workflow { margin-bottom: 8px; }
.ff-demo-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ff-machine-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 22px;
  padding: clamp(16px, 2.3vw, 27px) clamp(17px, 3.2vw, 38px);
  border-top: 1px solid #a06c2a65;
  background: #101721;
}
.ff-machine-dialog-footer > div:first-child { flex: 1 1 min(100%, 370px); }
.ff-page .ff-machine-dialog-footer h3 { font-size: clamp(1.4rem, 2.1vw, 2rem); }
.ff-machine-dialog-footer p { margin-top: 4px; color: #cbd4e0; font-size: .84rem; }
.ff-machine-dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }

@media (max-width: 1000px) {
  .ff-machine-deck { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 715px) {
  .ff-machine { width: calc(100vw - 20px); max-height: 94vh; max-height: 94dvh; border-radius: 12px; }
  .ff-demo-panel { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; }
  .ff-page .ff-machine-card { min-height: 154px; }
}
@media (max-width: 480px) {
  .ff-machine-card .ff-machine-description { max-width: 80%; font-size: .78rem; }
  .ff-machine-card img { width: 40%; mask-image: linear-gradient(90deg, transparent, #000 72%); }
  .ff-machine-card .ff-machine-title { max-width: 95%; }
  .ff-machine-card::after { width: 24px; height: 24px; }
  .ff-demo-header > [data-demo-instructions] { font-size: .87rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ff-machine[open], .ff-machine-card { animation: none; transition: none; }
  .ff-machine[open] .ff-demo-audio button:not([data-audio-playing]) { animation: none; }
}
