/* =====================================================================
   letters-and-stickers.css: the kind of place under each picture, letter groups with tints and
   the scrolling letter bubble, and the icons view with stickers.
   ===================================================================== */

/* ---- v28: kind of place under the picture ---- */
.pc-where {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}
.pc-kind {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  color: var(--kc);
  font-weight: 600;
}
.pc-kind svg {
  flex: none;
}
.pc-kind span {
  color: var(--slate);
}
.pc-kind::after {
  content: '·';
  margin: 0 5px;
  color: var(--faint);
  font-weight: 400;
}
.pc-where {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- v28: letter groups — a tint and a margin letter instead of heading rows ---- */
.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  margin: 0;
  padding: 0;
}
.lz {
  position: relative;
  margin: 0 0 3px;
  padding: 5px 5px 5px 26px;
  border-radius: 12px;
  background: var(--lt);
  scroll-margin-top: calc(var(--th, 90px) + 4px);
}
.lz.hide {
  display: none;
}
.lz-l {
  position: absolute;
  left: 0;
  top: 9px;
  width: 26px;
  text-align: center;
  font-size: 13px;
  font-weight: 750;
  color: var(--ld);
  line-height: 1;
}
.lz .list {
  margin: 0;
}
.lz .list.flow {
  padding: 0;
}
.fsec.lz {
  margin-top: 0;
}
.letters button.cur {
  background: var(--slate);
  color: #fff;
}
.lzbub {
  position: absolute;
  z-index: 70;
  min-width: 74px;
  height: 74px;
  padding: 0 16px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--lt);
  color: var(--ld);
  border: 1.5px solid color-mix(in srgb, var(--ld) 40%, transparent);
  font-size: 38px;
  font-weight: 750;
  box-shadow: 0 14px 34px -10px rgba(47, 67, 81, 0.35);
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms,
    transform 220ms var(--ease);
}
.lzbub.long {
  font-size: 20px;
  height: 56px;
  border-radius: 16px;
}
.lzbub.on {
  opacity: 0.96;
  transform: translate(-50%, -50%) scale(1);
}
.letters {
  touch-action: none;
  user-select: none;
}

/* ---- v28: icons view — stickers with names under ---- */
.vseg button {
  width: 34px;
  display: grid;
  place-items: center;
  padding: 0;
}
.vseg svg {
  width: 16px;
  height: 16px;
}
.list.flow.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 12px 8px;
  padding: 4px 0 6px;
}
.row.stile {
  position: relative;
  display: block;
  border: 0;
  background: none;
  box-shadow: none;
  min-height: 0;
}
.row.stile.hide {
  display: none;
}
.stile .r-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 4px 2px;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.stk {
  position: relative;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  transform: rotate(var(--tilt));
  transition: transform 200ms var(--ease);
}
.stk.photo,
.stk.kind {
  border-radius: 16px;
  background: #fff;
  border: 4px solid #fff;
  outline: 1.6px solid #4a3a33;
  outline-offset: 0;
  box-shadow: 0 5px 12px -4px rgba(74, 58, 51, 0.35);
  overflow: hidden;
  box-sizing: border-box;
}
.stk.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 11px;
  display: block;
}
.stk.kind {
  background: var(--lt, #f6f3ee);
  color: #4a3a33;
}
.stk.kind svg {
  width: 38px;
  height: 38px;
}
.stk.cut img {
  max-width: 100%;
  max-height: 100%;
  filter: url(#stkEdge) drop-shadow(0 4px 5px rgba(74, 58, 51, 0.3));
}
.stile .r-main:hover .stk {
  transform: rotate(0deg) scale(1.06);
}
.st-name {
  font-size: 12.5px;
  line-height: 1.25;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}
.stile .r-check {
  position: absolute;
  top: 0;
  right: 4px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}
.stile .r-check .box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(74, 58, 51, 0.3);
}
.stile.on .stk {
  outline: 3px solid var(--accent);
}
.stile.on .st-name {
  font-weight: 650;
}
.stile.on .r-check .box {
  background: var(--accent);
  border-color: var(--accent);
}
@container (min-width:900px) {
  .list.flow.tiles {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  }
  .stk {
    width: 84px;
    height: 84px;
  }
}

.lzdrag,
.lzdrag * {
  user-select: none !important;
  -webkit-user-select: none !important;
}

.letters {
  top: calc(var(--th, 96px) + 8px);
}

/* a cut-out always fits inside its sticker box, however tall the building is */
.stk.cut img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

/* ---- drawn stickers and chain stickers ----
   Drawings get their white edge from the #stkEdge filter, like the cut-outs.
   Chain stickers are round badges with a white edge and the brown outline. */
.stk.drawn,
.stk.chain {
  background: none;
  border: 0;
  outline: 0;
  box-shadow: none;
  overflow: visible;
}
.stk.drawn svg,
.pc-img.stkd svg.drawn,
.pp-sticker svg.drawn {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: url(#stkEdge) drop-shadow(0 3px 4px rgba(74, 58, 51, 0.28));
}
.chain-badge {
  display: grid;
  place-items: center;
  width: 86%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 4px solid #fff;
  outline: 1.6px solid #4a3a33;
  box-shadow: 0 4px 8px -2px rgba(74, 58, 51, 0.35);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-align: center;
  padding: 6px;
  hyphens: manual;
  box-sizing: border-box;
}
.chain-badge.long {
  font-size: 11.5px;
}

/* on the board and Highlights cards: the sticker sits on the card's own pale ground */
.pc-img.stkd {
  background: #faf6f0;
  padding: 8px;
}
.pc-img.stkd > svg.drawn {
  width: auto;
  height: 54px;
}
.pc-img.stkd > img {
  height: 56px;
  width: auto;
  filter: url(#stkEdge) drop-shadow(0 3px 4px rgba(74, 58, 51, 0.28));
}
.pc-img.stkd .chain-badge {
  width: 52px;
  font-size: 11px;
  border-width: 3px;
}
.pc-img.stkd .chain-badge.long {
  font-size: 8.5px;
}

/* on a place's page with no photo: one big sticker */
.pp-sticker {
  width: 150px;
  height: 150px;
  margin: 6px auto 8px;
  transform: rotate(-2deg);
}
.pp-sticker.cut img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: url(#stkEdge) drop-shadow(0 4px 6px rgba(74, 58, 51, 0.3));
}
.pp-sticker .chain-badge {
  width: 140px;
  font-size: 26px;
}
.pp-sticker .chain-badge.long {
  font-size: 19px;
}
.pp-nophoto {
  text-align: center;
}
