/* Sprite Maker: only the layout. Colors, type and every piece come from the FileFortress kit (ff-kit/), so the
   tool follows the visitor's site theme. */
[hidden] { display: none !important; }
.app { padding: 14px 16px 24px; }
.app-top { display: flex; align-items: center; gap: 12px; padding: 4px 4px 16px; }
.app-logo { width: 28px; height: 28px; color: var(--ff-brand); flex: none; }
.app-top p { margin: 2px 0 0; }
.app-top { padding-bottom: 12px; }
/* three columns over the whole width: setup | the sheet | look. Narrower: setup and look stacked on the left; phones:
   one column, the sheet first. */
.app-grid { display: grid; gap: 14px; align-items: start; grid-template-columns: minmax(240px, 290px) minmax(0, 1fr) minmax(240px, 290px);
  grid-template-areas: "setup main look"; }
.app-setup { grid-area: setup; } .app-main { grid-area: main; } .app-look { grid-area: look; }
@media (max-width: 1180px) { .app-grid { grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); grid-template-areas: "setup main" "look main"; } }
@media (max-width: 760px) { .app-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "setup" "look"; } }
.app-col-title { margin: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.app-col-title:not(:first-child) { margin-top: 6px; }
.app-hint-tight { margin-top: -8px; }
/* the font drop as one compact row: icon, then name and hint */
.app-drop { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; text-align: left; min-height: 0; }
.app-drop > .ff-icon { position: static; flex: none; }
.app-drop-text { display: grid; gap: 2px; min-width: 0; }
.app-drop-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* a number with its own up/down buttons inside the field: [ 5 | ^v ] */
.app-step { position: relative; display: block; }
.app-step .ff-input { width: 100%; padding-right: 40px; -moz-appearance: textfield; appearance: textfield; }
.app-step .ff-input::-webkit-inner-spin-button, .app-step .ff-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.app-step-btns { position: absolute; top: 1px; right: 1px; bottom: 1px; width: 32px; display: grid; grid-template-rows: 1fr 1fr;
  border-left: 1px solid var(--ff-line); border-radius: 0 var(--ff-radius) var(--ff-radius) 0; overflow: hidden; }
.app-step-btns button { position: relative; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.app-step-btns button + button { border-top: 1px solid var(--ff-line); }
.app-step-btns button:hover { background: rgba(255, 255, 255, .07); }
.app-step-btns button:active { background: rgba(255, 255, 255, .12); }
.app-step-btns .ff-icon { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; transform: translate(-50%, -50%); color: currentColor; opacity: .75; }
.app-step-btns .app-up { transform: translate(-50%, -50%) rotate(180deg); }
.app-uses { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
/* inside the middle card: the sheet, and a side column beside it (editor, downloads, number test). When the card is
   too narrow for both, the side column goes below the sheet. */
.app-main { container-type: inline-size; display: grid; gap: 16px; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(230px, 280px); }
@container (max-width: 620px) { .app-main > .app-sheet-col, .app-main > .app-side-col { grid-column: 1 / -1; } }
@supports not (container-type: inline-size) { .app-main { grid-template-columns: minmax(0, 1fr); } }
.app-side-col .app-downloads { flex-direction: column; align-items: stretch; }
.app-side-col .app-downloads .ff-btn { justify-content: flex-start; }
.app-side-col .app-try-row .ff-input { max-width: none; flex: 1 1 auto; }
.app-side-col .app-try { min-height: 72px; }
.app-two { grid-template-columns: 1fr 1fr; }
.app-three { grid-template-columns: 1.15fr 1fr 1fr; gap: 8px; }
.app-tokens { width: 100%; font-family: var(--ff-mono); font-size: 13px; margin-top: 8px; }
/* our color picker (js/color.js): a swatch button with the hex, and a panel under it */
.app-cp { position: relative; }
.app-cp-swatch { display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 10px 0 5px; cursor: pointer; text-align: left;
  font: 600 12px/1 var(--ff-mono); color: inherit; }
.app-cp-swatch i { flex: none; width: 26px; height: 26px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 0 0 1px rgba(0, 0, 0, .25); }
.app-cp-swatch span { overflow: hidden; text-overflow: ellipsis; }
.app-cp.is-open .app-cp-swatch { border-color: var(--ff-brand); }
.app-cp-panel { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: 244px; padding: 10px; border-radius: 12px;
  background: var(--ff-card-bg, #1d1520); border: 1px solid var(--ff-line-strong); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7); }
.app-cp.to-left .app-cp-panel { left: auto; right: 0; }
.app-cp-sv { position: relative; height: 150px; border-radius: 9px; cursor: crosshair; touch-action: none;
  background-image: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent); }
.app-cp-hue { position: relative; height: 14px; margin-top: 10px; border-radius: 99px; cursor: pointer; touch-action: none;
  background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.app-cp-sv b, .app-cp-hue b { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .5); pointer-events: none; }
.app-cp-hue b { top: 50%; }
.app-cp-row { display: flex; gap: 6px; margin-top: 10px; }
.app-cp-hex { flex: 1; min-width: 0; height: 32px; font: 600 13px/1 var(--ff-mono); text-transform: lowercase; }
.app-cp-presets { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 10px; }
.app-cp-presets button { aspect-ratio: 1; border-radius: 7px; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.app-cp-presets button:hover { transform: scale(1.1); }
.app-view-bar { flex-wrap: wrap; gap: 14px; }
/* the sheet over a checkerboard, so transparent and white both show */
.app-stage { position: relative; width: 100%; max-width: min(100%, calc(100vh - 250px)); margin: 0 auto; border-radius: var(--ff-radius); border: 1px solid var(--ff-line); overflow: hidden;
  background-color: #1b1720;
  background-image: linear-gradient(45deg, #26212c 25%, transparent 25%), linear-gradient(-45deg, #26212c 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #26212c 75%), linear-gradient(-45deg, transparent 75%, #26212c 75%);
  background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.app-sheet { display: block; width: 100%; height: auto; }
/* the cells over the sheet: buttons you click, drag and drop images on */
.app-cells { position: absolute; inset: 0; display: grid; }
.app-cells > button { position: relative; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; outline: 1px dashed rgba(255, 255, 255, .22); outline-offset: -1px; }
.app-cells > button:hover { background: rgba(255, 255, 255, .06); }
.app-cells > button.is-empty:hover::before { content: '+'; position: absolute; inset: 0; display: grid; place-items: center; font: 300 28px/1 sans-serif; color: rgba(255, 255, 255, .4); }
.app-cells > button[draggable="true"] { cursor: grab; }
.app-cells > button.is-sel { outline: 2px solid var(--ff-brand); outline-offset: -2px; background: rgba(255, 255, 255, .05); }
.app-cells > button.is-over { outline: 2px dashed var(--ff-brand); outline-offset: -2px; background: rgba(255, 255, 255, .1); }
.app-cells.no-grid > button:not(.is-sel):not(.is-over) { outline: none; }
.app-cells > button::after { content: attr(data-n); position: absolute; left: 4px; top: 3px; font: 600 10px/1 var(--ff-mono); color: rgba(255, 255, 255, .55);
  background: rgba(0, 0, 0, .45); padding: 2px 4px; border-radius: 4px; }
.app-cells.no-numbers > button::after { display: none; }
.app-sheet-hint { text-align: center; margin: 0; }
.app-editor-row { gap: 8px; flex-wrap: wrap; }
.app-editor-row .ff-input { flex: 1 1 140px; min-width: 0; }
.app-try-row { gap: 10px; }
.app-try-row .ff-input { max-width: 220px; }
.app-try { min-height: 96px; display: grid; place-items: center; padding: 12px; border-radius: var(--ff-radius); border: 1px solid var(--ff-line); background: #1b1720; overflow: hidden; }
.app-try canvas { max-width: 100%; height: auto; }
.app-downloads { flex-wrap: wrap; gap: 8px; }
.app-foot { margin-top: 10px; text-align: center; }
