/* ============================================================
   Astra Origins — Astrophotography (header destination) · styles
   Shared shell lives in cosmos.css. Loaded globally in master so
   right-pane swaps stay styled.
   ============================================================ */

.t-tn.is-on { background: oklch(from var(--accent) l c h / 0.18); color: var(--accent); }

/* ── Banner ───────────────────────────────────────────── */
.ap-banner {
  position: relative; overflow: hidden; color: white;
  border-radius: 14px; padding: 24px 24px; margin-bottom: 16px;
  background:
    radial-gradient(ellipse at 80% 15%, oklch(0.5 0.2 290 / 0.6), transparent 55%),
    radial-gradient(ellipse at 10% 90%, oklch(0.45 0.18 250 / 0.7), transparent 55%),
    linear-gradient(135deg, oklch(0.15 0.05 280), oklch(0.07 0.03 250));
}
.ap-banner-stars {
  position: absolute; inset: 0; opacity: 0.5;
  background-image:
    radial-gradient(1px 1px at 15% 30%, white 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 34% 66%, white 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 26%, white 50%, transparent 51%),
    radial-gradient(2px 2px at 72% 52%, white 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 32%, white 50%, transparent 51%);
}
.ap-banner-body { position: relative; z-index: 1; }
.ap-banner-eye { font-size: 9px; letter-spacing: 0.2em; font-weight: 800; opacity: 0.7; }
.ap-banner-title { font-size: 24px; font-weight: 800; letter-spacing: -0.015em; margin: 8px 0 6px; }
.ap-banner-sub { font-size: 13px; line-height: 1.55; opacity: 0.85; margin: 0; max-width: 64ch; }

/* ── Toolbar ──────────────────────────────────────────── */
.ap-toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.ap-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 11px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.ap-tab .ct { color: var(--ink-3); font-size: 10px; }
.ap-tab:hover { border-color: var(--accent-line); color: var(--accent); }
.ap-tab.is-on { background: oklch(0.22 0.08 70); color: white; border-color: oklch(0.22 0.08 70); }
.ap-tab.is-on .ct { color: oklch(0.85 0.06 70); }

.ap-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ap-search { display: flex; align-items: center; gap: 7px; flex: 1 1 200px; min-width: 170px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; }
.ap-search .bi { font-size: 13px; color: var(--ink-3); }
.ap-search input { flex: 1; border: none; background: transparent; outline: none; font-size: 12px; color: var(--ink); font-family: inherit; }

.ap-dd { position: relative; }
.ap-sort-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-2); cursor: pointer; }
.ap-sort-btn:hover { border-color: var(--accent-line); color: var(--accent); }
.ap-dd-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 160px; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: 0 14px 32px oklch(0 0 0 / 0.12); }
.ap-dd-menu[hidden] { display: none; }
.ap-dd-item { display: block; width: 100%; text-align: left; padding: 8px 10px; border: none; background: transparent; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--ink); cursor: pointer; }
.ap-dd-item:hover { background: var(--surface-2); }
.ap-dd-item.is-on { background: oklch(from var(--accent) l c h / 0.12); color: var(--accent); }

.ap-view-toggle { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.ap-view-btn { width: 32px; height: 30px; border-radius: 6px; display: grid; place-items: center; background: transparent; border: none; color: var(--ink-2); font-size: 13px; cursor: pointer; }
.ap-view-btn:hover { background: var(--surface); color: var(--ink); }
.ap-view-btn.is-on { background: var(--ink); color: white; }

.ap-upload-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: white; border: none; border-radius: 999px; padding: 9px 15px; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; cursor: pointer; }
.ap-upload-btn:hover { background: oklch(from var(--accent) calc(l - 0.05) c h); }

/* ── Gallery (fixed-column masonry — columns built by JS) ──
   Stable column containers so loading more / restoring on Back never
   reshuffles existing tiles. --*/
.ap-gallery { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.ap-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ap-gallery.is-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ap-gallery.is-grid .ap-img img, .ap-gallery.is-grid .ap-img-fallback { aspect-ratio: 4 / 3; object-fit: cover; height: auto; }

.ap-tile { position: relative; border-radius: 10px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s; }
.ap-tile:hover, .ap-tile:focus-within { transform: translateY(-2px); border-color: var(--accent-line); box-shadow: 0 14px 28px oklch(0 0 0 / 0.18); }
.ap-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ap-img { position: relative; display: block; min-height: 140px; background: var(--surface-2); overflow: hidden; }
.ap-img::before { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(100deg, transparent 25%, oklch(1 0 0 / 0.07) 45%, transparent 65%); background-size: 200% 100%; animation: ap-shimmer 1.3s ease-in-out infinite; }
.ap-img.is-loaded::before, .ap-img.is-error::before { display: none; }
.ap-img.is-error { background: oklch(0.2 0.03 260); min-height: 160px; }
.ap-img.is-error img { display: none; }
.ap-img img { position: relative; z-index: 1; display: block; width: 100%; height: auto; }
@keyframes ap-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.ap-img-fallback { width: 100%; aspect-ratio: 1; position: relative; }
.ap-img-stars { position: absolute; inset: 0; opacity: 0.85; background-image: radial-gradient(1px 1px at 20% 30%, white 50%, transparent 51%), radial-gradient(1.5px 1.5px at 55% 60%, white 50%, transparent 51%), radial-gradient(1px 1px at 80% 35%, white 50%, transparent 51%); }
.ap-img-cat { position: absolute; top: 8px; left: 10px; z-index: 2; font-size: 8px; color: white; background: oklch(0 0 0 / 0.55); padding: 3px 7px; border-radius: 3px; backdrop-filter: blur(4px); letter-spacing: 0.14em; font-weight: 800; }
.ap-img-play { position: absolute; inset: 0; display: grid; place-items: center; color: white; font-size: 38px; text-shadow: 0 2px 12px oklch(0 0 0 / 0.5); pointer-events: none; }

.ap-tile-overlay { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 10px 14px; color: white; background: linear-gradient(180deg, transparent 0%, oklch(0 0 0 / 0.65) 45%, oklch(0 0 0 / 0.92) 100%); }
.ap-tile-title { font-size: 13px; font-weight: 800; letter-spacing: -0.005em; line-height: 1.25; }
.ap-tile-scope { font-size: 9px; color: oklch(0.85 0.005 240); margin-top: 3px; letter-spacing: 0.06em; max-height: 0; overflow: hidden; transition: max-height 0.2s ease; }
.ap-tile-foot { display: flex; align-items: center; gap: 6px; font-size: 10px; max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.2s ease, opacity 0.2s ease, margin-top 0.2s ease; }
.ap-tile:hover .ap-tile-scope, .ap-tile:focus-within .ap-tile-scope { max-height: 32px; }
.ap-tile:hover .ap-tile-foot, .ap-tile:focus-within .ap-tile-foot { max-height: 32px; opacity: 1; margin-top: 8px; }
.ap-author-pip { position: relative; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 8px; font-weight: 800; color: white; flex-shrink: 0; overflow: hidden; }
.ap-author-pip.lg { width: 40px; height: 40px; font-size: 13px; }
.ap-author-pip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ap-author-name { font-weight: 700; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-stat { margin-left: auto; color: oklch(0.85 0.005 240); white-space: nowrap; }

/* ── Empty / loader / skeleton ────────────────────────── */
.ap-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 16px; color: var(--ink-3); font-size: 11px; letter-spacing: 0.1em; }
.ap-empty .bi { font-size: 30px; opacity: 0.5; }
.ap-loader { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 22px; color: var(--ink-3); font-size: 10px; letter-spacing: 0.12em; }
.ap-loader[hidden] { display: none; }
.ap-loader-spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: ap-rot 0.7s linear infinite; }
.ap-loader-spinner.sm { width: 12px; height: 12px; display: inline-block; vertical-align: middle; }
@keyframes ap-rot { to { transform: rotate(360deg); } }
.ap-sentinel { height: 1px; }
.ap-sk { border-radius: 10px; background: var(--surface-2); animation: ap-pulse 1.4s ease-in-out infinite; }
.ap-gallery.is-grid .ap-sk { height: 200px !important; }
@keyframes ap-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ── Detail ───────────────────────────────────────────── */
.ap-back { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; color: var(--ink-2); cursor: pointer; margin-bottom: 14px; }
.ap-back:hover { border-color: var(--accent-line); color: var(--accent); }
.ap-dt-head { margin-bottom: 14px; }
.ap-dt-cat { font-size: 9px; letter-spacing: 0.16em; font-weight: 800; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.ap-dt-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 0; }
.ap-stage { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: oklch(0.08 0.02 260); margin-bottom: 14px; min-height: 240px; }
.ap-stage::before { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(100deg, transparent 25%, oklch(1 0 0 / 0.06) 45%, transparent 65%); background-size: 200% 100%; animation: ap-shimmer 1.3s ease-in-out infinite; }
.ap-stage.is-loaded::before, .ap-stage.is-error::before { display: none; }
/* Once the media has loaded, drop the dark backdrop + min-height so the frame
   sits flush on the surface (no black letterboxing). */
.ap-stage.is-loaded { background: var(--surface); min-height: 0; }
.ap-stage.is-error { min-height: 160px; }
.ap-stage-media { position: relative; z-index: 1; display: block; width: 100%; height: auto; max-height: 78vh; object-fit: contain; margin: 0 auto; }
.ap-stage-controls { position: absolute; top: 10px; right: 10px; z-index: 3; display: flex; gap: 6px; }
.ap-stage-ctl { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: oklch(0.1 0.02 260 / 0.55); color: white; border: 1px solid oklch(1 0 0 / 0.22); backdrop-filter: blur(6px); cursor: pointer; font-size: 14px; text-decoration: none; }
.ap-stage-ctl:hover { background: oklch(0.1 0.02 260 / 0.82); color: white; }
.ap-stage-fallback { width: 100%; aspect-ratio: 16 / 10; position: relative; }

.ap-dt-byline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ap-by-left { display: flex; align-items: center; gap: 12px; }
.ap-by-name { font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; }
.ap-by-name:hover { color: var(--accent); }
.ap-by-role { font-size: 8px; letter-spacing: 0.14em; color: var(--ink-3); margin-top: 2px; }
.ap-by-stats { display: flex; flex-wrap: wrap; gap: 14px; font-size: 10px; color: var(--ink-3); letter-spacing: 0.06em; }
.ap-by-stats .bi { margin-right: 4px; }

/* Action bar */
.ap-actionbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.ap-action { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 13px; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.ap-action:hover { border-color: var(--accent-line); color: var(--accent); }
.ap-action.is-on { background: oklch(from var(--accent) l c h / 0.12); border-color: var(--accent-line); color: var(--accent); }
.ap-action-danger { color: oklch(0.5 0.2 25); }
.ap-action-danger:hover { background: oklch(0.55 0.2 25); border-color: oklch(0.55 0.2 25); color: white; }
.ap-action-sep { width: 1px; height: 22px; background: var(--line); margin: 0 2px; }
/* Feature (compass) toggle — gold when featured */
.ap-action-feature.is-featured { background: color-mix(in oklch, #e9c46a 18%, var(--surface)); border-color: color-mix(in oklch, #e9c46a 55%, var(--line)); color: #a9781f; }
.ap-action-feature.is-featured:hover { background: color-mix(in oklch, #e9c46a 28%, var(--surface)); color: #8a6413; border-color: color-mix(in oklch, #e9c46a 70%, var(--line)); }
.ap-action-feature.is-featured i { color: #e0a92e; }
/* The reusable share widget renders its own trigger button via ap-action class */
.ap-actionbar [data-share] { display: inline-flex; }

/* Two-column body + sidebar */
.ap-dt-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
@media (max-width: 980px) { .ap-dt-grid { grid-template-columns: 1fr; } }
.ap-dt-main { min-width: 0; }
.ap-dt-side { display: flex; flex-direction: column; gap: 12px; }
.ap-side-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.ap-side-h { font-size: 8px; letter-spacing: 0.14em; color: var(--ink-3); font-weight: 700; margin-bottom: 12px; }
.ap-author-card { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.ap-author-name-lg { font-size: 14px; font-weight: 700; color: var(--ink); }
.ap-author-role { font-size: 8px; letter-spacing: 0.12em; color: var(--ink-3); margin-top: 3px; }
.ap-side-btn { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; color: var(--ink-2); text-decoration: none; }
.ap-side-btn:hover { border-color: var(--accent-line); color: var(--accent); }
.ap-dt-side .ap-meta-list { grid-template-columns: 1fr; gap: 8px; margin: 0; }
.ap-dt-side .ap-meta-list li { padding: 8px 10px; }
.ap-related { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ap-related a { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 6px; border-radius: 9px; cursor: pointer; }
.ap-related a:hover { background: var(--surface-2); }
.ap-rel-thumb { width: 56px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-2); flex-shrink: 0; display: block; }
.ap-rel-text { min-width: 0; }
.ap-rel-title { display: block; font-size: 12px; font-weight: 600; color: var(--ink); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ap-rel-meta { display: block; font-size: 8px; letter-spacing: 0.1em; color: var(--ink-3); margin-top: 3px; }

.ap-dt-caption { font-size: 14px; line-height: 1.75; color: var(--ink); overflow-wrap: anywhere; margin-bottom: 8px; }
.ap-dt-caption p { margin: 0 0 12px; }
.ap-dt-caption a { color: var(--accent); }

.ap-sh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 18px 0 12px; }
.ap-sh-h { font-size: 15px; font-weight: 800; letter-spacing: -0.005em; }
.ap-sh-meta { font-size: 9px; color: var(--ink-3); letter-spacing: 0.14em; font-weight: 700; }

.ap-meta-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ap-meta-list li { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.ap-meta-list li .mono { font-size: 8px; letter-spacing: 0.12em; color: var(--ink-3); font-weight: 700; }
.ap-meta-list li span:last-child { font-size: 13px; color: var(--ink); font-weight: 600; word-break: break-word; }
@media (max-width: 768px) { .ap-meta-list { grid-template-columns: 1fr; } }

/* Comments */
/* Composer (avatar + compact textarea + POST REPLY, like the space-hub article) */
.ap-comment-composer { display: flex; gap: 11px; margin-bottom: 16px; }
.ap-comment-composer .ap-author-pip { width: 32px; height: 32px; font-size: 10px; margin-top: 1px; }
.ap-composer-main { flex: 1; min-width: 0; }
.ap-comment-input { width: 100%; resize: vertical; min-height: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 13px; line-height: 1.5; color: var(--ink); font-family: inherit; outline: none; }
.ap-comment-input:focus { border-color: var(--accent); }
.ap-composer-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.ap-comment-signin { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; font-size: 13px; color: var(--ink-2); margin-bottom: 16px; }

.ap-comments { display: flex; flex-direction: column; gap: 10px; }
.ap-comments-loading, .ap-comments-empty { color: var(--ink-3); font-size: 11px; letter-spacing: 0.08em; padding: 14px 0; text-align: center; }

/* Discussion comment — light rounded card; like heart sits at the right */
.ap-comment { display: flex; gap: 11px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.ap-comment > .ap-author-pip { width: 32px; height: 32px; font-size: 10px; margin-top: 1px; }
.ap-comment-main { min-width: 0; flex: 1; }
.ap-c-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.ap-c-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.ap-c-time { font-size: 8px; letter-spacing: 0.12em; color: var(--ink-3); }
.ap-c-body { font-size: 13px; line-height: 1.6; color: var(--ink-2); margin: 0; overflow-wrap: anywhere; }
.ap-c-like { margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; background: transparent; border: none; padding: 0; font-size: 11px; font-weight: 700; color: var(--ink-3); cursor: pointer; }
.ap-c-like:hover { color: var(--accent); }
.ap-c-like.is-on { color: oklch(0.6 0.2 25); }
.ap-c-like .bi { font-size: 13px; }

/* ── Modals ───────────────────────────────────────────── */
.ap-modal { position: fixed; inset: 0; z-index: 1200; display: none; align-items: center; justify-content: center; padding: 20px; }
.ap-modal.is-open { display: flex; }
.ap-modal-backdrop { position: absolute; inset: 0; background: oklch(0.1 0.02 260 / 0.55); backdrop-filter: blur(3px); }
.ap-modal-dialog { position: relative; z-index: 1; width: 100%; max-width: 620px; max-height: 92vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 70px oklch(0 0 0 / 0.3); overflow: hidden; }
.ap-modal-sm { max-width: 420px; }
.ap-modal-loading { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: oklch(from var(--surface) l c h / 0.86); backdrop-filter: blur(2px); color: var(--ink-3); font-size: 10px; letter-spacing: 0.12em; border-radius: 16px; }
.ap-modal-loading[hidden] { display: none; }
.ap-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.ap-modal-title { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; color: var(--ink); margin: 0; }
.ap-modal-x { border: none; background: transparent; font-size: 26px; line-height: 1; color: var(--ink-3); cursor: pointer; padding: 0 4px; }
.ap-modal-x:hover { color: var(--ink); }
.ap-modal-body { padding: 18px 20px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.ap-modal-body::-webkit-scrollbar { width: 10px; }
.ap-modal-body::-webkit-scrollbar-track { background: transparent; margin: 4px 0; }
.ap-modal-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 2px solid var(--surface); }
.ap-modal-body::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }
.ap-modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.ap-btn-primary { display: inline-flex; align-items: center; gap: 7px; background: var(--accent); color: white; border: none; border-radius: 8px; padding: 11px 20px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; cursor: pointer; }
.ap-btn-primary:hover { background: oklch(from var(--accent) calc(l - 0.05) c h); }
.ap-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.ap-btn-ghost { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; cursor: pointer; }
.ap-btn-ghost:hover { border-color: var(--accent-line); color: var(--accent); }
.ap-btn-danger { display: inline-flex; align-items: center; gap: 7px; background: oklch(0.55 0.2 25); color: white; border: none; border-radius: 8px; padding: 11px 20px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; cursor: pointer; }
.ap-btn-danger:hover { background: oklch(0.5 0.2 25); }

.ap-form { display: flex; flex-direction: column; gap: 14px; }
.ap-field { display: flex; flex-direction: column; gap: 6px; }
.ap-field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.ap-label { font-size: 9px; letter-spacing: 0.12em; color: var(--ink-3); font-weight: 700; }
.ap-input { width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font-size: 13px; color: var(--ink); font-family: inherit; outline: none; }
.ap-input:focus { border-color: var(--accent); }
.ap-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

.ap-file { display: block; }
.ap-file-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; background: var(--surface-2); border: 1.5px dashed var(--line); border-radius: 11px; padding: 24px 16px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.ap-file-drop[hidden] { display: none; }
.ap-file-drop:hover, .ap-file-drop.is-drag { border-color: var(--accent); background: oklch(from var(--accent) l c h / 0.07); }
.ap-file-ic { font-size: 28px; color: var(--accent); }
.ap-file-main { font-size: 13px; color: var(--ink-2); }
.ap-file-main b { color: var(--accent); }
.ap-file-hint { font-size: 9px; letter-spacing: 0.1em; color: var(--ink-3); }
.ap-file-prev { position: relative; border-radius: 11px; overflow: hidden; border: 1px solid var(--line); background: oklch(0.06 0.02 260); }
.ap-file-prev[hidden] { display: none; }
.ap-file-prev img, .ap-file-prev video { width: 100%; max-height: 280px; object-fit: contain; display: block; }
.ap-file-clear { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border: none; border-radius: 50%; background: oklch(0.12 0.02 260 / 0.65); color: white; cursor: pointer; display: grid; place-items: center; backdrop-filter: blur(4px); font-size: 13px; }
.ap-file-clear:hover { background: oklch(0.55 0.2 25); }

.ap-form-error { font-size: 11px; color: oklch(0.5 0.2 25); background: oklch(0.97 0.03 25); border: 1px solid oklch(0.85 0.08 25); border-radius: 8px; padding: 9px 12px; line-height: 1.5; }
.ap-form-error[hidden] { display: none; }

.ap-confirm-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin: 4px auto 16px; font-size: 24px; background: oklch(from var(--accent) l c h / 0.12); color: var(--accent); }
.ap-confirm-ic.is-danger { background: oklch(0.95 0.04 25); color: oklch(0.5 0.2 25); }
.ap-confirm-text { text-align: center; font-size: 14px; line-height: 1.6; color: var(--ink); margin: 0; }

.ap-spin { width: 13px; height: 13px; border: 2px solid oklch(1 0 0 / 0.4); border-top-color: white; border-radius: 50%; display: inline-block; animation: ap-rot 0.7s linear infinite; vertical-align: middle; }
.ap-spin[hidden] { display: none; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .ap-banner-title { font-size: 20px; }
  .ap-dt-title { font-size: 21px; }
  .ap-controls { flex-direction: column; align-items: stretch; }
  .ap-search { min-width: 0; }
}
