.av-editor { display:grid; gap:1rem; min-width:0; }
.av-editor header p, .av-editor .av-hint, .av-preview p { color:var(--muted); font-size:.92rem; margin:.3rem 0; }
.av-editor :is(label, .av-preview) { min-width:0; }
.av-settings, .av-tools, .av-week, .av-footer { display:flex; flex-wrap:wrap; align-items:end; gap:.75rem; }
.av-settings label { flex:1 1 13rem; }
.av-settings-fold { border-block:1px solid var(--rule); padding:.6rem 0; font-size:.875rem; }
.av-settings-fold[open] .av-settings { margin-top:.75rem; }
.av-tools label { flex:0 1 11rem; }
.av-week { justify-content:space-between; align-items:center; }
.av-week label { text-align:center; }
.av-week .av-date-jump { position:relative; display:block; padding:.45rem .5rem; cursor:pointer;
  font:500 clamp(1rem,3vw,1.45rem)/1.25 var(--serif); }
.av-date-jump input[type="date"] { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.av-date-jump:focus-within { outline:2px solid var(--plum); outline-offset:2px; border-radius:var(--radius-control); }
.av-date-jump input::-webkit-calendar-picker-indicator { position:absolute; inset:0; width:100%; height:100%; cursor:pointer; }
.av-week :is(input,select), .av-settings input, .av-tools select { display:block; width:100%; }
.av-choices { display:flex; align-self:end; padding:3px; border:1px solid var(--rule); border-radius:var(--radius-control); }
.av-choices button, .av-days button, .av-week button { min-height:42px; color:inherit; background:transparent; border:0; cursor:pointer; font:inherit; }
.av-choices button { border-radius:calc(var(--radius-control) - 3px); padding:.45rem 1rem; font-weight:650; }
.av-choices [aria-pressed="true"][data-av-kind="free"] { color:white; background:#315942; }
.av-choices [aria-pressed="true"][data-av-kind="busy"] { color:white; background:#6a4552; }
.av-week button { border:1px solid var(--rule); border-radius:50%; width:42px; line-height:1; font-size:1.6rem; }
.av-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); padding-left:5.25rem; }
.av-days button { display:grid; justify-items:center; gap:1px; width:100%; font-size:.8rem; border-bottom:2px solid var(--rule); }
.av-days button strong { font-size:1rem; }
.av-days [aria-pressed="true"] { color:var(--plum); border-color:currentColor; }
.av-days [aria-pressed="true"] strong { color:#fff; background:var(--plum); border-radius:50%; }
.av-days strong { width:1.8rem; line-height:1.8rem; }
.av-days { margin-bottom:-1rem; }
.av-scroll { max-height:22rem; overflow-y:auto; border:1px solid var(--rule); border-radius:var(--radius-control); scrollbar-width:thin; background:var(--paper,#fffaf3); }
.av-grid { display:grid; grid-template-columns:5.25rem repeat(7,minmax(0,1fr)); }
.av-time, .av-cell { min-height:31px; height:31px; border:0; border-top:1px solid var(--rule); }
.av-time { display:flex; align-items:flex-start; justify-content:flex-end; padding:2px .55rem 0 .1rem; white-space:nowrap; font:500 .75rem/1.4 var(--font); color:var(--muted); }
.av-cell { min-width:0; cursor:crosshair; padding:0; background:transparent; border-left:1px solid var(--rule); border-radius:0; user-select:none; -webkit-user-select:none; }
.av-cell { position:relative; }
.av-cell[data-state="free"] { box-shadow:inset 3px 0 #628566; }
.av-cell[data-state="busy"], .av-key-busy { background:#c6a9b2; }
.av-cell[data-shared="full"], .av-key-free { background:#a9c6aa; }
.av-cell[data-unchecked="true"] { background-image:radial-gradient(#9a8c80 1px,transparent 1px); background-size:6px 6px; }
.av-cell i { position:absolute; left:0; right:0; pointer-events:none; }
.av-cell .av-part-shared { background:#a9c6aa; }
.av-cell[data-conflict="full"], .av-part-busy, .av-key-calendar {
  background:repeating-linear-gradient(135deg,#dfced1 0 5px,#8b6774 5px 7px); }
.av-legend { display:flex; flex-wrap:wrap; gap:.4rem 1rem; }
.av-legend span:not([hidden]) { display:inline-flex; align-items:center; gap:.35rem; font-size:.82rem; }
.av-legend i { display:inline-block; height:.85rem; width:.85rem; border:1px solid #786c61; border-radius:2px; }
.av-cell[data-anchor="true"], .av-cell.av-drag { background:#b7a2b5; outline:2px solid var(--plum); outline-offset:-2px; }
.av-cell:focus-visible, .av-editor button:focus-visible { outline:3px solid var(--plum); outline-offset:-3px; }
.av-row, .av-row > span:last-child { display:flex; flex-wrap:wrap; align-items:center; gap:.6rem; }
.av-row { padding:.65rem 0; border-bottom:1px solid var(--rule); justify-content:space-between; }
.av-row button { color:var(--plum); background:transparent; border:0; padding:.4rem; text-decoration:underline; cursor:pointer; }
.av-row small { display:block; color:var(--muted); }
.av-editor details summary { cursor:pointer; font-weight:650; }
.av-preview { padding:1rem; background:var(--paper,#fffaf3); border:1px solid var(--rule); border-radius:var(--radius-control); }
.av-preview h3 { font-size:1rem; margin:0 0 .4rem; }
.av-preview ul { margin:.4rem 0 0; padding-inline-start:1.3rem; }
.av-blocks:empty, [data-av-legacy]:empty { display:none; }
.av-footer { align-items:center; }
.av-footer [role="status"] { margin:0; }
@media (max-width:600px) {
  .av-days { padding-left:0; }
  .av-grid { grid-template-columns:5.25rem minmax(0,1fr); }
  .av-cell[data-active="false"] { display:none; }
  .av-time, .av-cell { min-height:40px; height:40px; }
  .av-scroll { max-height:18rem; }
  .av-tools { gap:.5rem; }
  .av-tools label { flex:1 1 8rem; }
  .av-tools .av-choices button { padding:.45rem .65rem; }
  .av-tools .button { margin-left:auto; padding-inline:.6rem; }
  .av-tools label { flex:1 1 6rem; }
}
