/* Album maker (admin): full-screen editor of 12×36 in sheets */
.ab { position: fixed; inset: 0; z-index: 60; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; }
.ab-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 16px; padding: 12px var(--pad); background: #0e0d0cf2; border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.ab-top b { font: 400 22px/1.2 var(--serif); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-back { color: var(--muted); font-size: 14px; letter-spacing: .04em; white-space: nowrap; }
.ab-back:hover { color: var(--gold); }
.ab-status { color: var(--muted); font-size: 13px; white-space: nowrap; }
.ab-status.bad { color: #e2847b; }
.ab-body { padding: 28px var(--pad) 120px; max-width: 1700px; margin: 0 auto; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; }
.ab-body > .a-loading-list, .ab-body > .ab-empty { grid-column: 1 / -1; }
.ab-lib { position: sticky; top: 90px; display: flex; flex-direction: column; max-height: calc(100vh - 110px); border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.ab-lib.over { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold) inset; }
.ab-lib-head { padding: 16px 16px 10px; border-bottom: 1px solid var(--line); }
.ab-lib-head > b { display: block; font: 400 22px var(--serif); }
.ab-lib-head > span { color: var(--muted); font-size: 13px; }
.ab-lib-tabs { display: flex; gap: 6px; margin: 12px 0 10px; }
.ab-lib-tabs button { font-size: 12px; letter-spacing: .04em; padding: 6px 10px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); }
.ab-lib-tabs button.on { border-color: var(--gold); color: var(--gold); }
.ab-fill { width: 100%; margin-bottom: 4px; padding-left: 10px; padding-right: 10px; letter-spacing: .12em; white-space: nowrap; }
.ab-lib-head .ab-hint { font-size: 13px; }
.ab-lib-head .ab-hint b { color: var(--gold); font-weight: 400; }
.ab-lib-list { overflow-y: auto; padding: 4px 12px 16px; overscroll-behavior: contain; }
.ab-lib-list h4 { font: 300 20px var(--serif); margin: 14px 4px 8px; }
.ab-lib-list h4 small { font: 400 12px var(--sans); color: var(--muted); margin-left: 4px; }
.ab-lib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.ab-pic { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 3px; background: #222; cursor: grab; user-select: none; -webkit-user-select: none; }
.ab-pic img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ab-pic:hover { outline: 2px solid var(--gold); outline-offset: -2px; }
.ab-pic.used img { opacity: .35; }
.ab-pic span { position: absolute; left: 4px; bottom: 4px; font-size: 10px; letter-spacing: .04em; padding: 2px 6px; border-radius: 10px; background: #000b; color: var(--gold); }
.ab-ghost { position: fixed; left: 0; top: 0; z-index: 100; width: 100px; height: 100px; object-fit: cover; border-radius: 4px; box-shadow: 0 12px 30px #000c; outline: 2px solid var(--gold); pointer-events: none; opacity: .9; }
.ab.dragging, .ab.dragging * { cursor: grabbing !important; }
.ab-sheet.act .ab-head b { color: var(--gold); }
.ab-sheet.over .ab-page { outline: 4px solid var(--gold); outline-offset: 4px; }
.ab-cell.over::after { content: "⇄"; position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; font-size: 28px; color: #fff; background: #0006; box-shadow: inset 0 0 0 4px var(--gold); }
.ab-page.ab-drop { display: grid; place-items: center; background: transparent; border: 2px dashed var(--line); box-shadow: none; }
.ab-drop p { color: var(--muted); font-size: 15px; letter-spacing: .06em; }
.ab-new.act .ab-drop, .ab-new.over .ab-drop { border-color: var(--gold); }
.ab-grip { position: absolute; top: 6px; right: 6px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #000a; color: #fff; font-style: normal; font-size: 16px; cursor: grab; opacity: 0; transition: opacity .15s; }
.ab-cell:hover .ab-grip, .ab-cell.on .ab-grip { opacity: 1; }
@media (hover: none) { .ab-grip { display: none; } }
@media (max-width: 900px) {
  .ab-body { grid-template-columns: 1fr; }
  .ab-lib { position: static; max-height: 46vh; }
}
.ab-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.ab-intro .h2 { margin-top: 10px; font-size: clamp(30px, 4vw, 44px); }
.ab-hint { color: var(--muted); font-size: 14px; margin-top: 8px; }
.ab-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.ab-empty { max-width: 560px; margin: 12vh auto; text-align: center; }
.ab-empty .lead { margin-top: 14px; }
.ab-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 18px; border: 1px solid var(--gold); background: var(--gold-soft); border-radius: 4px; }
.ab-sheet { margin-bottom: 30px; }
.ab-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.ab-head b { font: 400 22px var(--serif); }
.ab-head span { color: var(--muted); font-size: 13px; letter-spacing: .04em; flex: 1; }
.ab-head button, .ab-tools button { font-size: 13px; letter-spacing: .04em; color: var(--text); padding: 8px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); }
.ab-head button:hover, .ab-tools button:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.ab-tools button:disabled { opacity: .35; cursor: default; }
.ab-tools button.danger:hover { border-color: #e2847b; color: #e2847b; }
.ab-page { position: relative; aspect-ratio: 3 / 1; background: #fff; box-shadow: 0 10px 40px #0008; user-select: none; -webkit-user-select: none; }
.ab-cell { position: absolute; overflow: hidden; cursor: pointer; background: #ddd; }
.ab-cell { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.ab-hold { position: absolute; left: 0; bottom: 0; z-index: 3; height: 5px; width: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); animation: ab-hold linear forwards; pointer-events: none; }
@keyframes ab-hold { to { transform: scaleX(1); } }
.ab-cell img { position: absolute; max-width: none; display: block; pointer-events: none; }
@media (hover: hover) { .ab-cell { cursor: grab; } .ab-cell:active { cursor: grabbing; } .ab-cell:hover::before { content: ""; position: absolute; inset: 0; z-index: 1; border: 2px solid #fff8; pointer-events: none; } }
.ab-cell.on { touch-action: none; z-index: 1; }
.ab-cell.on::before { content: ""; position: absolute; inset: 0; z-index: 1; border: 3px solid var(--gold); pointer-events: none; }
.ab-cell.is-hero::after { content: "★"; position: absolute; top: 6px; left: 8px; color: var(--gold); font-size: 18px; text-shadow: 0 1px 4px #000a; }
.ab-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.ab-zoom { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; }
.ab-tools .ab-zoom button { width: 36px; padding: 8px 0; font-size: 16px; line-height: 1; }
.ab-zoom input { width: 160px; accent-color: var(--gold); }
.ab-file { color: var(--muted); font-size: 12px; margin-left: 4px; }
.ab .s-dlg .gx-progress { margin: 16px 0; }
.ab-pick { width: min(1100px, 94vw); max-height: 88vh; padding: 0 22px 22px; overflow-y: auto; }
.ab-pick-head { position: sticky; top: 0; z-index: 1; background: var(--surface); padding: 20px 0 14px; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; }
.ab-pick-head .h2 { font-size: 30px; }
.ab-pick-head .s-note { grid-column: 1; margin: 0; }
.ab-pick-head .btn { grid-row: 1 / 3; grid-column: 2; }
.ab-pick-ev { font: 300 24px var(--serif); margin: 18px 0 10px; }
.ab-pick-ev small { font: 400 12px var(--sans); color: var(--muted); letter-spacing: .1em; margin-left: 6px; }
.ab-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.ab-pick-grid button { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 3px; background: #222; }
.ab-pick-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ab-pick-grid span { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 6px 5px; font-size: 11px; letter-spacing: .04em; color: #fff; background: linear-gradient(transparent, #000b); text-align: left; }
.ab-pick-grid button:hover:not(:disabled) { outline: 3px solid var(--gold); outline-offset: -3px; }
.ab-pick-grid button.cur { outline: 3px solid var(--gold); outline-offset: -3px; opacity: .55; cursor: default; }
/* Shared with the couple (album.html): view & approve / edit, comments, approval */
.ab-share { padding: 10px 16px; font-size: 12px; white-space: nowrap; }
.ab-brand img { display: block; height: 30px; width: auto; }
.ab-body.solo { grid-template-columns: minmax(0, 1fr); max-width: 1400px; }
.ab.view .ab-cell { cursor: default; }
.ab.view .ab-cell:hover::before { display: none; }
.ab-notes { display: grid; gap: 8px; margin-top: 12px; }
.ab-note { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 10px 14px; border-left: 3px solid var(--gold); background: var(--surface); border-radius: 3px; }
.ab-note p { white-space: pre-wrap; font-size: 15px; line-height: 1.45; }
.ab-note small { grid-column: 1; color: var(--muted); font-size: 12px; letter-spacing: .03em; }
.ab-note button { grid-row: 1 / 3; grid-column: 2; font-size: 12px; color: var(--muted); padding: 6px 10px; border: 1px solid var(--line); border-radius: 3px; }
.ab-note button:hover { color: var(--gold); border-color: var(--gold); }
.ab-other { margin-bottom: 30px; }
.ab-ok { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding: 14px 18px; margin-bottom: 18px; border: 1px solid #7fbf8a; background: #7fbf8a1f; border-radius: 4px; }
.ab-ok b { font-weight: 500; color: #9fd8a9; }
.ab-ok span { color: var(--muted); font-size: 14px; }
.ab-ok.old { border-color: var(--line); background: var(--surface); }
.ab-ok.old b { color: var(--text); }
.ab-ask textarea, .ab-ask input, .ab-link input { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px; }
.ab-ask textarea:focus, .ab-ask input:focus { outline: none; border-color: var(--gold); }
.ab-link { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.ab-link b { font: 400 20px var(--serif); }
.ab-link .s-note { margin: 0; }
.ab-link input { font-size: 13px; color: var(--muted); }
@media (max-width: 700px) {
  .ab-top { gap: 10px; }
  .ab-top b { font-size: 18px; }
  .ab.view .ab-scroll { overflow-x: auto; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad) 14px; }
  .ab.view .ab-scroll .ab-page { width: 220%; }
}
.s-dlg.small.ab-sharedlg, .s-dlg.small.ab-ask { height: fit-content; }
.ab-head button.on { border-color: var(--gold); color: var(--gold); }
.ab-presets { margin-top: 12px; }
.ab-preset-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 8px; }
.ab-preset { display: grid; gap: 6px; padding: 8px; background: none; border: 1px solid var(--line); border-radius: 6px; color: inherit; cursor: pointer; text-align: left; font: inherit; font-size: 13px; }
.ab-preset:hover, .ab-preset.on { border-color: var(--gold); }
.ab-preset.on b { color: var(--gold); }
.ab-preset b { font-weight: 500; }
.ab-mini { position: relative; display: block; aspect-ratio: 3 / 1; background: #fff; }
.ab-mini i { position: absolute; background: #ccc center / cover; }
