/* sleeve.css — Sleeve gallery page */

:root {
  --hi-panel: #f7f7f4;
  --hi-ink: #1d1d1f;
  --hi-muted: #686868;
  --hi-line: #171717;
  --hi-accent: #c9a800;
}

body.sleeve-page {
  display: block;
  min-height: 100vh;
  padding: 0;
  background: #f2f2f2;
  color: var(--hi-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "Noto Sans JP", sans-serif;
}

.sleeve-topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 3px solid #050505;
  background: #080808;
  color: #f7f7f7;
}
.sleeve-topbar a { color: #f7f7f7; text-decoration: none; font-weight: 900; font-size: 14px; }
.sleeve-topbar h1 { margin: 0; font-size: 16px; font-weight: 900; letter-spacing: 0.04em; }
.hi-count { font-size: 12px; font-weight: 700; color: #5a5a5a; }
.hi-toolbar { display: flex; gap: 12px; align-items: center; }
.hi-select {
  padding: 4px 8px;
  border: 2px solid #050505;
  background: #fff;
  color: #111;
  font-size: 12px; font-weight: 800; font-family: inherit;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.hi-shell {
  display: flex;
  gap: 0;
  min-height: calc(100vh - 56px);
}

/* ── Sidebar ── */
.sleeve-sidebar {
  width: 200px;
  flex-shrink: 0;
  padding: 16px;
  border-right: 3px solid #050505;
  background: #fff;
  overflow-y: auto;
}
.sleeve-sidebar-title {
  margin: 0 0 10px 0;
  font-size: 13px; font-weight: 900;
}
.sleeve-cat-list { display: flex; flex-direction: column; gap: 1px; }
.sleeve-cat-btn {
  display: block;
  width: 100%;
  padding: 5px 8px;
  border: 2px solid transparent;
  background: transparent;
  color: #111;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.sleeve-cat-btn:hover { background: #eee; }
.sleeve-cat-btn.active { background: #a8c900; border-color: #050505; }
.sleeve-cat-count { color: #5a5a5a; font-weight: 600; font-size: 11px; margin-left: 4px; }

/* ── Main ── */
.sleeve-main {
  flex: 1;
  min-width: 0;
  padding: 20px;
  position: relative;
}
.sleeve-main-toolbar {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 800;
  color: #5a5a5a;
}
.sleeve-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.sleeve-card {
  border: 2px solid #050505;
  background: #fff;
  cursor: pointer;
  transition: box-shadow 0.1s;
}
.sleeve-card:hover { box-shadow: 3px 3px 0 #050505; }
.sleeve-card.no-texture { opacity: 0.4; cursor: default; }
.sleeve-card-art {
  position: relative;
  aspect-ratio: 764/1024;
  background: #eee;
  overflow: hidden;
}
.sleeve-card-art img,
.sleeve-card-art canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.sleeve-card-art img {
  object-fit: fill;
}
.sleeve-foil-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sleeve-card-name {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 6px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sleeve-card-prem {
  font-size: 9px; font-weight: 900;
  padding: 2px 6px; text-align: center;
  background: #ffd700; color: #111;
}

/* ── Preview ── */
.sleeve-preview {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.sleeve-preview.hidden { display: none; }
.sleeve-preview-close {
  position: absolute;
  top: 16px; right: 24px;
  width: 40px; height: 40px;
  border: 2px solid #fff;
  background: #111;
  color: #fff;
  font-size: 20px; font-weight: 900;
  cursor: pointer;
  z-index: 2;
}
.sleeve-preview-art {
  position: relative;
  width: min(90vw, 59.6875vh);
  aspect-ratio: 764/1024;
  border: 3px solid #fff;
  box-sizing: border-box;
}
.sleeve-preview-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.sleeve-preview-art canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.sleeve-preview-info {
  margin-top: 12px;
  padding: 8px 16px;
  background: #111;
  color: #fff;
  font-size: 13px; font-weight: 800;
  border: 2px solid #fff;
}

.hidden { display: none !important; }
