/* Favicon & App Icon Pack Maker (/tools/app-icon-favicon-maker/), 2026-11-29.
   Uses tokens from ft-shell-20261106.css and components from ft-tool-20261106.css.
   Reserves preview deck, canvas stages, stats, table, and code snippet heights from first paint so CLS stays 0.000. */

.ft-tool .ft-fields {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
}

.ft-tool .ft-field,
.ft-tool fieldset,
.ft-tool .ft-panel,
.ft-tool .ft-stack,
.ft-tool .ft-inputgroup {
  min-width: 0;
  max-width: 100%;
}

.ft-tool .ft-select {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ft-tool input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]),
.ft-tool select,
.ft-tool textarea,
.ft-tool .ft-input,
.ft-tool .ft-select {
  font-size: max(16px, 1rem);
  min-height: 44px;
}

.ft-tool .ft-btn {
  min-width: 44px;
  min-height: 44px;
  height: auto;
  padding-block: 0.48rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Dropzone compact height so first screen fits cleanly */
.ft-tool .ft-drop__label {
  min-height: 7.25rem;
  padding: var(--ft-space-4) var(--ft-space-3);
}

.fvm-filebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ft-space-2) var(--ft-space-3);
  margin-top: calc(-1 * var(--ft-space-2));
}

.fvm-fileinfo {
  flex: 1 1 13rem;
  min-width: 0;
  min-height: 2.5rem;
  margin: 0;
  color: var(--ft-ink-2);
  font-size: var(--ft-text-sm);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.fvm-fileinfo strong {
  color: var(--ft-ink);
  font-weight: 650;
}

/* Quick presets */
.fvm-presets {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ft-space-2);
}

.fvm-presets__label {
  margin: 0;
  color: var(--ft-ink);
  font-size: var(--ft-text-sm);
  font-weight: 600;
}

.fvm-presets__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ft-space-2);
}

.fvm-preset {
  justify-content: flex-start;
  text-align: left;
  font-size: var(--ft-text-sm);
}

.fvm-preset[aria-pressed="true"] {
  border-color: var(--ft-accent);
  background: var(--ft-accent-soft);
  color: var(--ft-ink);
}

/* Control groups */
.fvm-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ft-space-3);
  min-width: 0;
  margin: 0;
  padding: var(--ft-space-4) 0 0;
  border: 0;
  border-top: 1px solid var(--ft-line);
}

.fvm-group[disabled] {
  opacity: 0.55;
}

.fvm-group__legend {
  float: left;
  width: 100%;
  margin: 0 0 var(--ft-space-1);
  padding: 0;
  color: var(--ft-ink);
  font-size: var(--ft-text-md);
  font-weight: 650;
}

.fvm-group__legend + * {
  clear: both;
}

/* Swatch + Hex input pair (>=44px accessible targets) */
.fvm-colorpair {
  display: flex;
  align-items: center;
  gap: var(--ft-space-2);
  min-width: 0;
}

.fvm-swatch {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 3px;
  border: 1px solid var(--ft-line-strong);
  border-radius: var(--ft-radius);
  background: var(--ft-surface);
  cursor: pointer;
  box-sizing: border-box;
}

.fvm-swatch::-webkit-color-swatch-wrapper {
  padding: 0;
}

.fvm-swatch::-webkit-color-swatch {
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 3px;
}

.fvm-swatch::-moz-color-swatch {
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 3px;
}

.fvm-swatch:focus-visible {
  outline: 3px solid var(--ft-focus);
  outline-offset: 1px;
}

.fvm-hex {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--ft-font-mono);
}

.fvm-check {
  display: flex;
  align-items: center;
  gap: var(--ft-space-2);
  min-width: 44px;
  min-height: 44px;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  background: var(--ft-surface);
  color: var(--ft-ink);
  line-height: 1.35;
  box-sizing: border-box;
  cursor: pointer;
}

.fvm-check input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
}

.fvm-check span {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Live Multi-Context Preview Deck */
.fvm-deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.75rem), 1fr));
  gap: var(--ft-space-3);
  min-width: 0;
}

.fvm-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--ft-space-2);
  min-width: 0;
  min-height: 9.75rem;
  padding: var(--ft-space-3);
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  background: var(--ft-surface-2);
  box-sizing: border-box;
}

.fvm-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem var(--ft-space-2);
  min-width: 0;
}

.fvm-card__title {
  margin: 0;
  color: var(--ft-ink);
  font-size: var(--ft-text-xs);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.fvm-card__meta {
  margin: 0;
  color: var(--ft-ink-2);
  font-size: var(--ft-text-xs);
  overflow-wrap: anywhere;
}

/* Card 1: Browser Tab Light & Dark strips */
.fvm-tabs-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.45rem;
  min-width: 0;
}

.fvm-browser-strip {
  display: flex;
  align-items: center;
  padding: 0.35rem 0.45rem 0;
  border-radius: var(--ft-radius);
  border: 1px solid rgba(15, 23, 42, 0.14);
  min-width: 0;
  overflow: hidden;
}

.fvm-browser-strip--light {
  background: #dde3ea;
}

.fvm-browser-strip--dark {
  background: #0b1120;
  border-color: rgba(255, 255, 255, 0.14);
}

.fvm-browser-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  max-width: 100%;
  min-width: 0;
  height: 1.9rem;
  padding: 0 0.6rem;
  border-radius: 6px 6px 0 0;
  font-size: var(--ft-text-xs);
  font-weight: 600;
}

.fvm-browser-strip--light .fvm-browser-tab {
  background: #ffffff;
  color: #1e293b;
  box-shadow: 0 -1px 2px rgba(15, 23, 42, 0.06);
}

.fvm-browser-strip--dark .fvm-browser-tab {
  background: #1e293b;
  color: #f1f5f9;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.35);
}

.fvm-cv-tab {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  display: block;
}

.fvm-browser-tab__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fvm-browser-tab__tag {
  margin-left: auto;
  padding-left: 0.35rem;
  font-size: 0.7rem;
  opacity: 0.68;
  white-space: nowrap;
}

.fvm-ico-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.15rem;
}

.fvm-ico-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--ft-text-xs);
  color: var(--ft-ink-2);
}

.fvm-ico-chip canvas {
  display: block;
  flex: none;
}

#fvm-cv-ico16 { width: 16px; height: 16px; }
#fvm-cv-ico32 { width: 20px; height: 20px; }
#fvm-cv-ico48 { width: 24px; height: 24px; }

/* Card 2: Google Search 28px circular result row */
.fvm-serp {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem;
  padding: 0.65rem 0.7rem;
  border-radius: var(--ft-radius);
  background: #ffffff;
  color: #1f2937;
  border: 1px solid rgba(15, 23, 42, 0.12);
  min-width: 0;
}

:root[data-theme="dark"] .fvm-serp {
  background: #1f242d;
  color: #e5e7eb;
  border-color: rgba(255, 255, 255, 0.12);
}

.fvm-serp__top {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.fvm-serp__badge {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f3f4;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-sizing: border-box;
}

:root[data-theme="dark"] .fvm-serp__badge {
  background: #303642;
  border-color: rgba(255, 255, 255, 0.14);
}

.fvm-serp__badge canvas {
  width: 20px;
  height: 20px;
  display: block;
}

.fvm-serp__sitewrap {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.fvm-serp__site {
  font-size: var(--ft-text-xs);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fvm-serp__url {
  font-size: 0.75rem;
  opacity: 0.75;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fvm-serp__title {
  margin: 0;
  font-size: var(--ft-text-sm);
  font-weight: 600;
  color: #1a0dab;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:root[data-theme="dark"] .fvm-serp__title {
  color: #8ab4f8;
}

/* Card 3: iOS 180px Home Screen preview */
.fvm-ios-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 6.4rem;
  padding: 0.5rem;
  border-radius: var(--ft-radius);
  background: linear-gradient(145deg, #243b55 0%, #141e30 100%);
  color: #f8fafc;
}

.fvm-cv-ios {
  width: 68px;
  height: 68px;
  border-radius: 22.5%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
  display: block;
}

.fvm-ios-caption {
  max-width: 100%;
  font-size: 0.75rem;
  font-weight: 500;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Card 4: Android Maskable 512px with 80% safe-zone overlay */
.fvm-safe-btn {
  padding-inline: 0.55rem;
  font-size: var(--ft-text-xs);
}

.fvm-safe-btn[aria-pressed="true"] {
  border-color: var(--ft-accent);
  background: var(--ft-accent-soft);
  color: var(--ft-ink);
}

.fvm-mask-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 6.4rem;
  padding: 0.45rem;
  border-radius: var(--ft-radius);
  background: color-mix(in srgb, var(--ft-surface) 84%, var(--ft-ink) 6%);
  border: 1px solid var(--ft-line);
}

.fvm-mask-box {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
  flex: none;
}

.fvm-cv-maskable {
  width: 84px;
  height: 84px;
  display: block;
}

.fvm-safe-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.fvm-safe-overlay.is-hidden {
  display: none;
}

.fvm-safe-danger {
  fill: rgba(15, 23, 42, 0.46);
  fill-rule: evenodd;
}

.fvm-safe-ring {
  fill: none;
  stroke: #fbbf24;
  stroke-width: 10;
  stroke-dasharray: 22 16;
}

/* Live .ico Directory & Pack Check Card */
.fvm-checkcard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ft-space-3);
  padding: var(--ft-space-3);
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  background: var(--ft-surface);
  min-width: 0;
}

.fvm-checkcard__head {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.fvm-checkcard__title {
  margin: 0;
  color: var(--ft-ink);
  font-size: var(--ft-text-md);
  font-weight: 650;
}

.fvm-summary-pill {
  margin: 0;
  padding: 0.42rem 0.65rem;
  border-radius: var(--ft-radius);
  background: var(--ft-accent-soft);
  border: 1px solid color-mix(in srgb, var(--ft-accent) 38%, var(--ft-line));
  color: var(--ft-ink);
  font-size: var(--ft-text-xs);
  font-weight: 600;
  font-family: var(--ft-font-mono);
  overflow-wrap: anywhere;
}

.fvm-stats {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
}

/* Pack Files Table */
.fvm-files-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ft-space-2);
  min-width: 0;
}

.fvm-files-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem var(--ft-space-2);
}

.fvm-files-title {
  margin: 0;
  font-size: var(--ft-text-sm);
  font-weight: 650;
  color: var(--ft-ink);
}

.fvm-table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  background: var(--ft-surface);
}

.fvm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--ft-text-xs);
}

.fvm-table th,
.fvm-table td {
  padding: 0.45rem 0.6rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--ft-line);
  overflow-wrap: anywhere;
}

.fvm-table th {
  font-weight: 650;
  color: var(--ft-ink);
  background: color-mix(in srgb, var(--ft-surface) 88%, var(--ft-ink) 4%);
  white-space: nowrap;
}

.fvm-table tbody tr:last-child td {
  border-bottom: 0;
}

.fvm-fname {
  font-family: var(--ft-font-mono);
  font-weight: 600;
  color: var(--ft-ink);
  white-space: nowrap;
}

.fvm-fsize {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ft-accent);
  white-space: nowrap;
}

/* Copyable HTML & Manifest Snippets */
.fvm-codecard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ft-space-2);
  padding: var(--ft-space-3);
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  background: var(--ft-surface);
  min-width: 0;
}

.fvm-codecard__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ft-space-2);
}

.fvm-codecard__title {
  margin: 0;
  font-size: var(--ft-text-sm);
  font-weight: 650;
  color: var(--ft-ink);
}

.fvm-pre {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  background: var(--ft-surface-2);
  color: var(--ft-ink);
  font-family: var(--ft-font-mono);
  font-size: var(--ft-text-xs);
  line-height: 1.5;
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
}

.fvm-details {
  border: 1px solid var(--ft-line);
  border-radius: var(--ft-radius);
  background: var(--ft-surface);
  min-width: 0;
}

.fvm-details > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  color: var(--ft-ink);
  font-size: var(--ft-text-sm);
  font-weight: 650;
  cursor: pointer;
  box-sizing: border-box;
}

.fvm-details > summary:focus-visible {
  outline: 3px solid var(--ft-focus);
  outline-offset: -2px;
}

.fvm-details__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ft-space-2);
  padding: 0 var(--ft-space-3) var(--ft-space-3);
  min-width: 0;
}

.fvm-after-example {
  margin-top: var(--ft-space-3);
}

@media (max-width: 520px) {
  .fvm-card,
  .fvm-checkcard,
  .fvm-codecard {
    padding: var(--ft-space-2);
  }
  .fvm-table th,
  .fvm-table td {
    padding: 0.38rem 0.45rem;
  }
}
