  .opac-list{
    display:flex;
    flex-direction:column;
    gap:10px;
    margin-top:12px;
  }

  .opac-row{
    border:1px solid #ddd;
    border-radius:12px;
    background:#fff;
    padding:10px;
    display:flex;
    gap:12px;
    align-items:stretch;
  }

  .opac-thumb{
    width:86px;
    height:86px;
    border-radius:10px;
    flex: 0 0 86px;
    overflow:hidden;
    background:#fafafa;
    border:1px solid #e0e0e0;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#888;
    font-size:12px;
  }
  .opac-thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
  }
  .opac-thumb.noimg{
    border-style:dashed;
    border-color:#bbb;
  }

  .opac-main{
    flex:1;
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:4px;
  }

  .opac-title{
    margin:0;
    font-size:16px;
    font-weight:700;
    line-height:1.25;
  }
  .opac-title a{ text-decoration:none; }
  .opac-title a:hover{ text-decoration:underline; }

  .opac-meta{
    margin:0;
    font-size:13px;
    color:#555;
    line-height:1.25;
  }
  .opac-meta .dot{ color:#999; margin:0 6px; }

  .opac-avail{
    margin-top:2px;
    font-size:13px;
    line-height:1.25;
  }
  .opac-avail strong{
    font-weight:700;
  }
  .opac-avail .sub{
    display:block;
    color:#666;
    margin-top:2px;
    font-size:12px;
  }

  .opac-side{
    flex: 0 0 170px;
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    justify-content:space-between;
    gap:8px;
  }

  .opac-side .note{
    font-size:12px;
    color:#666;
    text-align:right;
  }

  .btn{
    padding:8px 12px;
    border:1px solid #999;
    border-radius:10px;
    background:#f3f3f3;
    cursor:pointer;
    font-size:13px;
    white-space:nowrap;
  }
  .btn:hover{ background:#eee; }
  .btn-danger{
    border-color:#b44;
    background:#fff0f0;
  }
  .btn-danger:hover{ background:#ffe6e6; }

  /* Mobile: stack button below content */
  @media (max-width: 760px){
    .opac-row{ flex-direction:row; }
    .opac-side{
      flex: 0 0 auto;
      align-items:flex-start;
      justify-content:flex-start;
      width:auto;
    }
    .opac-side .note{ text-align:left; }
  }

  .badges{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
    margin-top:8px;
  }
  .badge{
    display:inline-block;
    padding:2px 8px;
    border:1px solid #aaa;
    border-radius:999px;
    font-size:12px;
    color:#333;
    background:#fafafa;
    white-space:nowrap;
  }
  .badge-strong{ border-color:#666; font-weight:700; }
  .card-actions{
    margin-top:10px;
    display:flex;
    gap:8px;
    align-items:center;
  }
  .btn{
    padding:6px 10px;
    border:1px solid #999;
    border-radius:10px;
    background:#f3f3f3;
    cursor:pointer;
    font-size:13px;
  }
  .btn-danger{
    border-color:#b44;
    background:#fff0f0;
  }
  .smallline{
    margin-top:6px;
    font-size:12px;
    color:#555;
  }

.flash-modal{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  max-width: min(480px, calc(100vw - 40px));
  width: 100%;
  display: flex;
  justify-content: center;
  pointer-events: none; /* allow clicks to pass through except card */
}

.flash-stack{
  display: grid;
  gap: 12px;
  width: 100%;
}

.flash{
  border: 1px solid #999;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(0,0,0,.18);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  pointer-events: auto; /* re-enable interaction for the card itself */
  animation: flashFadeIn .2s ease-out;
}

.flash-ok{
  border-color: #4a8;
}

.flash-err{
  border-color: #b44;
}

.flash-msg{
  flex: 1;
  font-size: 15px;
  color: #222;
  line-height: 1.35;
}

.flash-x{
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
  color: #444;
}

.flash-hide{
  opacity: 0;
  transform: translate(-50%, -48%);
  transition: opacity .25s ease, transform .25s ease;
}

@keyframes flashFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.opac-subtitle{ margin-top:2px; color:#333; font-size:14px; }
.opac-cat{ margin-top:4px; color:#666; font-size:13px; }