/* /alignment-chart-maker/ page styles. Built from /assets/polyatic.css tokens only (no new fonts or theme colours).
   The cell tints are the chart's own content (the saved picture's colours), set per cell by align.js as --tint. */
.nojs{margin:1.25rem 0 0;padding:0.875rem 1rem;border:1px solid var(--line);border-left:0.25rem solid var(--accent);border-radius:0.625rem;background:var(--surface);color:var(--ink);font-size:0.9375rem;line-height:1.5}
.ac-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.ac-head .sub{margin-bottom:0.75rem}
@media(max-width:520px){.ac-head h1{font-size:1.625rem;margin-bottom:0.25rem}.ac-head .sub{font-size:0.9375rem;margin-bottom:0.5rem}}

/* phone: the chart first, then add / axes / save; desktop: the chart wide on the left, the panel on the right */
.ac-duo{display:grid;gap:1rem;align-items:start}
@media(min-width:920px){.ac-duo{grid-template-columns:minmax(0,1fr) minmax(18rem,22rem);gap:1.5rem}}
.ac-chartcard,.ac-side{min-width:0}
.ac-chartcard{display:grid;gap:0.625rem;align-content:start}
.ac-side{display:grid;gap:1rem;align-content:start}
@media(max-width:520px){.ac-chartcard,.ac-side{padding:0.75rem}}

.ac-top{display:flex;flex-wrap:wrap;gap:0.5rem;align-items:center}
.ac-top input{flex:1 1 12rem;min-width:0;font-weight:600}
.ac-sizes{margin:0;flex:none}
.ac-sizes button{padding-left:0.625rem;padding-right:0.625rem;font-family:var(--mono);font-size:0.8125rem}

/* the grid: square cells, the chart's own light tints with dark ink in both themes (it previews the saved PNG) */
.ac-grid{--n:3;display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));gap:2px;padding:2px;background:var(--ink);border-radius:0.5rem;max-width:44rem;width:100%;margin:0 auto}
@media(min-width:920px){.ac-grid{max-width:min(44rem,calc(100vh - 12rem))}}
.ac-cell{container-type:inline-size;position:relative;aspect-ratio:1;display:flex;flex-direction:column;min-width:0;background:var(--tint,#eef0ea);color:#111312;border-radius:0.25rem;overflow:hidden;cursor:default}
.ac-cell:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}
.ac-ctitle{flex:none;padding:0.25em 0.3em;font-weight:700;font-size:max(0.5625rem,9cqi);line-height:1.15;text-align:center;overflow-wrap:anywhere;background:rgba(17,19,18,.08)}
.ac-cbody{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:3px}
.ac-pics{flex:1 1 0;min-height:0;max-width:100%;display:flex;justify-content:center;gap:2px}
.ac-names{flex:none;display:flex;flex-wrap:wrap;justify-content:center;max-width:100%}
.ac-grid.is-target .ac-cell{cursor:pointer;box-shadow:inset 0 0 0 2px rgba(17,19,18,.25)}
.ac-cell.is-over{box-shadow:inset 0 0 0 3px var(--accent)}

/* tiles: names and pictures, in the tray and in the cells */
.ac-tile{flex:none;margin:0;padding:0.25rem 0.5rem;border:1px solid var(--line-2);border-radius:0.375rem;background:var(--surface);color:var(--ink);font:inherit;font-size:0.875rem;line-height:1.25;max-width:100%;overflow-wrap:anywhere;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.ac-tile.is-pic{padding:0;width:3.5rem;height:3.5rem;overflow:hidden}
.ac-tile img{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}
.ac-tile.is-sel{outline:3px solid var(--accent);outline-offset:1px}
.ac-tile:focus-visible{outline:3px solid var(--accent);outline-offset:1px}
.ac-cell .ac-tile{touch-action:auto;border:0;background:transparent;color:#111312;padding:0 0.15em;font-weight:600;font-size:max(0.5625rem,10cqi)}
.ac-cell .ac-tile.is-pic{width:auto;height:100%;flex:0 1 auto;min-width:0;aspect-ratio:1;border-radius:0.125rem}
.ac-cell .ac-tile.is-sel{outline-color:#111312}
.ac-ghost{position:fixed;z-index:20;pointer-events:none;opacity:.85;transform:translate(-50%,-50%)}

.ac-tray{display:flex;flex-wrap:wrap;gap:0.375rem;min-height:3.25rem;padding:0.375rem;border:1px dashed var(--line-2);border-radius:0.5rem;background:var(--surface-2)}
.ac-tray:empty::before{content:"Empty: everything is on the chart";align-self:center;padding:0 0.25rem;font-size:0.8125rem;color:var(--muted)}
.ac-tray.is-over{background:var(--accent-soft)}

.ac-side textarea{width:100%;min-height:5.5rem;font-family:var(--sans);font-size:0.9375rem}
.ac-addrow{display:flex;gap:0.5rem;margin-top:0.5rem}
.ac-addrow .btn{flex:1 1 0;display:inline-flex;align-items:center;justify-content:center}
.ac-addrow select{flex:0 0 6.5rem}
.ac-filebtn{cursor:pointer}
#picfile:focus-visible+.ac-filebtn{outline:2px solid var(--accent);outline-offset:2px}
.ac-help{margin:0.375rem 0 0;font-size:0.8125rem;line-height:1.5;color:var(--muted)}
.ac-help:empty{display:none}
.ac-help code{font-family:var(--mono);font-size:0.75rem}
.ac-chartcard .ac-help{margin:0}
.ac-selrow{display:flex;flex-wrap:wrap;gap:0.375rem}
.ac-selrow[hidden]{display:none}

.ac-starters{display:flex;flex-wrap:wrap;gap:0.375rem;margin-bottom:0.5rem}
.ac-axlabel{margin:0.5rem 0 0.25rem;font-size:0.8125rem;color:var(--muted)}
.ac-axis{display:grid;grid-template-columns:repeat(auto-fill,minmax(5.5rem,1fr));gap:0.375rem}
.ac-axis input{width:100%;min-width:0}
.ac-save .chip{margin-top:0.625rem}
@media(prefers-reduced-motion:reduce){.ac-ghost{transition:none}}
