/* Vision board maker */
.vb-swatches .swatch i { position: relative; overflow: hidden; }
.vb-swatches .swatch i::after { content: ""; position: absolute; inset: 55% 18% 18% 18%; border-radius: 3px; background: var(--tile, transparent); }

.vb-words { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.vb-words button { font: 500 0.88rem/1 var(--sans); color: var(--ink-soft); background: var(--paper); border: 1px solid rgba(28, 24, 20, 0.16); border-radius: 999px; padding: 0.5rem 0.85rem; cursor: pointer; transition: background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease); }
.vb-words button:hover { border-color: var(--clay); }
.vb-words button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.vb-tiles { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 0.55rem; counter-reset: tile; }
.vb-tile { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto auto; align-items: center; gap: 0.55rem; padding: 0.35rem; border-radius: 14px; transition: background-color 400ms var(--ease); }
.vb-tile.flash { animation: vb-flash 1.1s var(--ease); }
@keyframes vb-flash { 0% { background: rgba(176, 89, 51, 0.16); } 100% { background: transparent; } }
.vb-thumb { width: 2.6rem; height: 2.6rem; border-radius: 10px; background: var(--paper-deep); display: grid; place-items: center; overflow: hidden; font-size: 0.8rem; color: var(--muted); }
.vb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vb-tile .t-input { padding: 0.6rem 0.75rem; font-size: 0.95rem; }
.vb-photo { cursor: pointer; white-space: nowrap; }
.vb-photo:focus-within { outline: 2px solid var(--clay); outline-offset: 2px; }
.vb-clear { width: 2rem; height: 2rem; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.vb-clear:hover { background: rgba(28, 24, 20, 0.06); color: var(--ink); }
.vb-add { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-top: 1rem; }
.vb-add .btn { cursor: pointer; }
.vb-add .btn:focus-within { outline: 2px solid var(--clay); outline-offset: 2px; }

.vb-check { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--ink-soft); margin-top: 1rem; cursor: pointer; }
.vb-check input { width: 1.05rem; height: 1.05rem; accent-color: var(--clay); }

[data-vision] .preview-stage { min-height: 26rem; transition: box-shadow 200ms var(--ease); }
[data-vision] .preview-stage.drop { box-shadow: inset 0 0 0 2px var(--clay); }
[data-vision] .preview-stage canvas { cursor: pointer; }
[data-vision].is-phone .preview-stage canvas { border-radius: 28px; box-shadow: 0 0 0 7px #1c1814, 0 0 0 8px #3a3029, 0 34px 60px -28px rgba(72, 43, 24, 0.55); }
.vb-clock { display: none; }
[data-vision].is-phone .vb-clock { display: grid; position: absolute; left: 0; right: 0; top: 0; pointer-events: none; }

.vb-print { display: none; }
@media print {
  @page { margin: 8mm; }
  body * { visibility: hidden !important; }
  .vb-print, .vb-print * { visibility: visible !important; }
  .vb-print { display: block !important; position: absolute; inset: 0; }
  .vb-print img { width: 100%; height: auto; max-height: 100vh; object-fit: contain; }
}
@media (max-width: 480px) {
  .vb-tile { grid-template-columns: 2.3rem minmax(0, 1fr) auto; }
  .vb-thumb { width: 2.3rem; height: 2.3rem; }
  .vb-clear { grid-column: 3; grid-row: 1; justify-self: end; }
  .vb-tile.has-photo .vb-clear, .vb-tile .vb-clear { position: relative; }
}
@media (prefers-reduced-motion: reduce) { .vb-tile.flash { animation: none; } }
