/* ===================== Tablet / desktop layout =====================
   Same app, same data — it just rearranges on wider screens. Phones are untouched. */

@media (hover: hover) {
  .card, .tile, .yr-row { transition: transform .12s ease, box-shadow .12s ease; }
  .card:hover, .yr-row:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
  .tile:hover .cover { transform: translateY(-3px) scale(1.02); }
  .tile .cover { transition: transform .15s ease; }
  .chip:hover, .btn:hover, .tabbar button:hover { filter: brightness(1.08); }
}

/* tablets: bottom sheet becomes a centered card */
@media (min-width: 600px) {
  #sheet .panel { left: 50%; right: auto; width: min(640px, 94vw); transform: translateX(-50%); animation: upc .22s cubic-bezier(.2,.8,.2,1); }
  #toast { left: 50%; right: auto; width: min(460px, 92vw); transform: translateX(-50%); }
  .list:not(.grid) { max-width: 900px; }
}
@keyframes upc { from { transform: translate(-50%, 40%); opacity: .4; } }

/* desktop: sidebar navigation, wide grid, centered pop-up */
@media (min-width: 900px) {
  :root { --headh: 68px; }
  body { padding-bottom: 0; padding-top: var(--headh); }

  /* the tab bar becomes a header across the top */
  .tabbar {
    top: 0; bottom: auto; left: 0; right: 0; width: auto; height: var(--headh); padding: 0 28px;
    flex-direction: row; align-items: center; justify-content: flex-end; gap: 6px;
    border-top: 0; border-bottom: 1px solid var(--line);
  }
  .tabbar::before {
    content: '🎬 Media Tracker'; position: absolute; left: 28px; top: 50%; transform: translateY(-50%);
    font-weight: 900; font-size: 22px; color: var(--text); letter-spacing: .01em;
  }
  .tabbar button {
    flex: none; width: auto; flex-direction: row; justify-content: center; gap: 8px;
    font-size: 16px; padding: 10px 18px; border-radius: 999px; color: var(--text);
  }
  .tabbar button.active { background: var(--chip); color: var(--accent); }
  .tabbar .ti { font-size: 19px; }
  .top { top: var(--headh); }

  .view { max-width: 1280px; margin: 0 auto; }
  .top { padding: 22px 28px 10px; }
  .top::after { left: 28px; right: 28px; border-radius: 3px; }
  h1 { font-size: 34px; }
  #libQ, #addQ { max-width: 560px; }
  .shot-row { max-width: 560px; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; padding: 22px 28px 40px; }
  .tile-title { font-size: 14px; }
  .list { padding: 14px 28px 40px; }
  #list.list, #addResults.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); max-width: none; align-items: start; }
  #addResults .section-h, #addResults details, #addResults > .btn, #addResults > .banner, #addResults > .empty { grid-column: 1 / -1; }
  #ocrOut .banner { margin: 10px 28px 0; }
  .banner { margin: 14px 28px 0; }

  .pad { padding: 20px 28px 40px; }
  #moreBody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  #moreBody .group { margin: 0; }
  #moreBody > p { grid-column: 1 / -1; }
  #yearsBody { max-width: 860px; }

  #sheet .panel {
    top: 50%; bottom: auto; width: min(620px, 90vw); max-height: 88vh;
    transform: translate(-50%, -50%); border-radius: 20px; padding: 20px 26px 24px;
    animation: pop .18s ease-out; box-shadow: 0 24px 60px rgba(0,0,0,.35);
  }
  .grab { display: none; }
  .d-head .cover { width: 110px; height: 158px; }
  #toast { left: auto; right: 28px; bottom: 24px; transform: none; width: 400px; }
  .kbd-hint { display: inline !important; }
}
@keyframes pop { from { transform: translate(-50%, -47%); opacity: 0; } }

.kbd-hint { display: none; font-size: 12px; color: var(--muted); margin-left: 8px; }
.kbd-hint kbd { font: inherit; background: var(--chip); border-radius: 5px; padding: 1px 6px; }
