/* Recipe Board gallery — paper sticker wall */

.tb-page {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
  background: #fff;
  box-sizing: border-box;
}

.tb-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.85rem;
}

.tb-title {
  margin: 0;
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 650;
  color: #1c1917;
}

.tb-sub {
  margin: 0.35rem 0 0;
  color: #78716c;
  font-size: 0.92rem;
  max-width: 36rem;
}

.tb-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tb-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 1rem;
}

.tb-search {
  flex: 1 1 14rem;
  min-width: 0;
  max-width: 28rem;
  border: 1px solid #d6d3d1;
  border-radius: 0.55rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
  background: #fff;
  color: #1c1917;
}

.tb-search:focus {
  outline: 2px solid rgba(180, 83, 9, 0.35);
  outline-offset: 1px;
  border-color: #b45309;
}

.tb-search-meta {
  margin: 0;
  font-size: 0.8rem;
  color: #78716c;
}

.tb-empty {
  padding: 2rem 1.25rem;
  text-align: center;
  border: 1px dashed #d6d3d1;
  border-radius: 0.85rem;
  background: #fafaf9;
  color: #57534e;
}

.tb-empty p {
  margin: 0 0 0.85rem;
}

.tb-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
  gap: 1.15rem 1rem;
  align-items: start;
  padding: 0.5rem 0 1.5rem;
  border-radius: 0;
  background: #fff;
  min-height: 18rem;
}

.tb-sticker {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  width: 100%;
  background-color: transparent;
  background-image: url("/pictures/sticker.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease;
}

.tb-sticker:hover {
  transform: translateY(-3px);
}

.tb-sticker.is-mine {
  filter: saturate(1.05);
}

.tb-sticker-face {
  flex: 1;
  min-height: 0;
  border: 0;
  background: transparent;
  color: #292524;
  text-align: left;
  cursor: pointer;
  padding: 24% 20% 18%;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  position: relative;
}

.tb-sticker-title {
  margin: 0;
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: clamp(0.78rem, 2.4vw, 0.95rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tb-sticker-meta {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.25;
  color: #57534e;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tb-sticker-note {
  margin: 0.1rem 0 0;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #44403c;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tb-sticker-cover {
  position: relative;
  margin-top: 0.2rem;
  width: 100%;
  max-width: 5.5rem;
  aspect-ratio: 16 / 10;
  border-radius: 0.35rem;
  overflow: hidden;
  border: 1px solid rgba(68, 64, 60, 0.22);
  background: rgba(255, 251, 235, 0.85);
  flex-shrink: 0;
}

.tb-sticker-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tb-sticker-cover--video-only {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 2.4rem;
  aspect-ratio: 1 / 1;
  background: rgba(28, 25, 23, 0.08);
}

.tb-sticker-proof {
  position: relative;
  display: flex;
  gap: 0.2rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: fit-content;
}

.tb-sticker-proof-thumb {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.28rem;
  overflow: hidden;
  border: 1px solid rgba(68, 64, 60, 0.22);
  background: rgba(255, 251, 235, 0.85);
  flex: 0 0 auto;
}

.tb-sticker-proof-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tb-sticker-proof-thumb--missing {
  background: repeating-linear-gradient(
    -45deg,
    rgba(214, 211, 209, 0.55),
    rgba(214, 211, 209, 0.55) 3px,
    rgba(245, 245, 244, 0.9) 3px,
    rgba(245, 245, 244, 0.9) 6px
  );
}

.tb-sticker-play {
  position: absolute;
  right: 0.2rem;
  bottom: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: rgba(28, 25, 23, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.tb-sticker-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 0.28rem 0 0.28rem 0.42rem;
  border-color: transparent transparent transparent #fff;
}

.tb-sticker-cover--video-only .tb-sticker-play {
  position: static;
}

.tb-sticker-badge {
  position: absolute;
  top: 18%;
  right: 18%;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.12rem 0.35rem;
  border-radius: 999px;
  background: rgba(154, 52, 18, 0.12);
  color: #9a3412;
}

.tb-sticker-actions {
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 11%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.28rem;
  z-index: 2;
}

.tb-chip {
  border: 1px solid rgba(68, 64, 60, 0.28);
  background: rgba(255, 251, 235, 0.92);
  color: #292524;
  font-size: 0.62rem;
  font-weight: 650;
  line-height: 1;
  padding: 0.28rem 0.42rem;
  border-radius: 999px;
  cursor: pointer;
}

.tb-chip:hover:not(:disabled) {
  background: #fffbeb;
}

.tb-chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tb-chip--danger {
  color: #9f1239;
  border-color: rgba(159, 18, 57, 0.35);
}

.tb-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 6000;
  max-width: min(28rem, calc(100vw - 2rem));
  padding: 0.65rem 0.9rem;
  border-radius: 0.55rem;
  font-size: 0.88rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.tb-toast--ok {
  background: #14532d;
  color: #fff;
}

.tb-toast--error {
  background: #7f1d1d;
  color: #fff;
}

.tb-peek-panel {
  width: min(480px, 100vw);
}

.tb-peek-meta {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: #6c757d;
}

.tb-peek-hero {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 0.9rem;
}

.tb-peek-hero-image {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(68, 64, 60, 0.18);
  border-radius: 0.55rem;
  overflow: hidden;
  background: #f5f5f4;
  cursor: zoom-in;
}

.tb-peek-hero-image img {
  display: block;
  width: 100%;
  max-height: 12rem;
  object-fit: cover;
}

.tb-peek-hero-image--loading {
  min-height: 7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  color: #78716c;
  font-size: 0.9rem;
}

.tb-peek-youtube {
  justify-self: start;
}

.tb-peek-note {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: #44403c;
}

.tb-peek-cooked {
  margin: 0 0 0.95rem;
}

.tb-peek-cooked-title {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #78716c;
}

.tb-peek-proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tb-peek-proof-thumb {
  width: 4.5rem;
  height: 4.5rem;
  padding: 0;
  border: 1px solid rgba(68, 64, 60, 0.2);
  border-radius: 0.45rem;
  overflow: hidden;
  background: #f5f5f4;
  cursor: pointer;
}

.tb-peek-proof-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tb-peek-proof-thumb--loading,
.tb-peek-proof-thumb--missing {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  font-size: 0.65rem;
  line-height: 1.2;
  text-align: center;
  color: #78716c;
  padding: 0.35rem;
}

.tb-peek-proof-thumb--missing {
  background: repeating-linear-gradient(
    -45deg,
    #e7e5e4,
    #e7e5e4 4px,
    #f5f5f4 4px,
    #f5f5f4 8px
  );
}

.tb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 7000;
  background: rgba(28, 25, 23, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem 1rem;
  cursor: zoom-out;
}

.tb-lightbox img {
  max-width: min(92vw, 56rem);
  max-height: calc(100vh - 3.5rem);
  object-fit: contain;
  border-radius: 0.35rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  cursor: default;
}

.tb-lightbox-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
}

.tb-step-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.65rem;
}

.tb-step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.55rem;
}

.tb-step-mins {
  font-size: 0.78rem;
  color: #78716c;
}

.tb-pill {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #ffedd5;
  color: #9a3412;
}

.tb-step-ins {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: #57534e;
  white-space: pre-wrap;
}

.tb-substeps {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.tb-substeps li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.3rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.8rem;
}

.tb-substeps li:first-child {
  border-top-color: rgba(0, 0, 0, 0.12);
  margin-top: 0.1rem;
  padding-top: 0.4rem;
}

.tb-sub-ins {
  color: #44403c;
  min-width: 0;
  word-break: break-word;
}

.tb-sub-mins {
  flex: 0 0 auto;
  color: #78716c;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .tb-wall {
    grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
    gap: 0.85rem;
  }
}

.tb-peek-overview {
  margin: 0.5rem 0;
  white-space: pre-wrap;
  font-size: 0.9rem;
  color: #44403c;
}
.tb-peek-ingredients {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: #44403c;
}
