/* ============================================================================
   home.css — deck picker (index.html)
   ============================================================================ */
.home-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--ui-line);
}
.home-logo {
  height: 22px;
}
.home-head h1 {
  margin-right: auto;
  margin: 0;
  font: 700 1.15rem/1 var(--ui-font);
  letter-spacing: 0.02em;
}
.home-mode {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(18, 194, 176, 0.14);
  color: #5ff0df;
  font-size: 0.75rem;
  font-weight: 600;
}
.home-mode a {
  color: inherit;
}

.home-main {
  padding: 2rem clamp(1rem, 4vw, 3rem) 4rem;
}
.home-empty {
  color: var(--ui-muted);
}
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.home-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: var(--ui-panel);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.home-card:hover {
  border-color: var(--ui-accent);
  transform: translateY(-2px);
}
.home-card__thumb--empty {
  display: grid;
  place-items: center;
  background: var(--ui-raised);
  color: var(--ui-muted);
  text-decoration: none;
}
.home-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.9rem 1rem 1rem;
}
.home-card__title {
  margin: 0;
  font: 600 0.95rem/1.35 var(--ui-font);
}
.home-card__title a {
  color: inherit;
  text-decoration: none;
}
.home-card__meta {
  margin: 0;
  color: var(--ui-muted);
  font-size: 0.78rem;
}
.home-card__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.home-search {
  width: min(280px, 40vw);
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: var(--ui-bg);
  color: var(--ui-text);
  font: 0.85rem var(--ui-font);
}
.home-search:focus { border-color: var(--ui-accent); outline: none; }

.home-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
}
.home-tags[hidden] { display: none; }
.home-chip {
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  background: transparent;
  color: var(--ui-muted);
  font: 600 0.75rem var(--ui-font);
  cursor: pointer;
}
.home-chip:hover { color: var(--ui-text); }
.home-chip[aria-pressed="true"] {
  border-color: var(--ui-accent);
  background: var(--ui-accent);
  color: #fff;
}
.home-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.15rem 0 0;
}
.home-card__tags span {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--ui-raised);
  color: var(--ui-muted);
  font-size: 0.68rem;
  font-weight: 600;
}
.home-card__actions { align-items: center; }

/* card "more" menu */
.home-menu { position: relative; margin-left: auto; }
.home-menu > summary { list-style: none; }
.home-menu > summary::-webkit-details-marker { display: none; }
.home-menu__list {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 5;
  display: flex;
  flex-direction: column;
  min-width: 160px;
  padding: 0.3rem;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: var(--ui-raised);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.8);
}
.home-menu__list button {
  padding: 0.5rem 0.7rem;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ui-text);
  font: 0.8rem var(--ui-font);
  text-align: left;
  cursor: pointer;
}
.home-menu__list button:hover { background: var(--ui-line); }
.home-menu__list .is-danger-text { color: var(--ui-danger); }

/* dialogs */
.home-dialog { width: min(460px, calc(100vw - 2rem)); }
.home-dialog__body { padding: 1rem 1.2rem 0.4rem; }
.home-dialog__note { margin: 0 0 1rem; color: var(--ui-muted); font-size: 0.82rem; line-height: 1.5; }
.home-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem 1.1rem;
}

@media (max-width: 640px) {
  .home-head { flex-wrap: wrap; }
  .home-search { order: 5; width: 100%; }
}
.home-dialog__warn {
  margin: 0 0 0.6rem;
  padding: 0.6rem 0.75rem;
  border-left: 3px solid #f5a623;
  border-radius: 4px;
  background: rgba(245, 166, 35, 0.1);
  color: #f6d29a;
  font-size: 0.8rem;
  line-height: 1.5;
}
.home-dialog code { font-size: 0.75rem; color: var(--ui-text); }
