/* =========================================================
   TENIMPER v45 — COMMENT STICKER PACK (104)
   ========================================================= */

.ti-sticker-tools{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:9px 0 2px;
}

.ti-sticker-trigger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:38px;
  padding:0 12px;
  border:1px solid rgba(183,132,67,.34);
  border-radius:999px;
  background:rgba(183,132,67,.055);
  color:inherit;
  font:inherit;
  cursor:pointer;
  transition:border-color .16s ease,background .16s ease,transform .16s ease;
}

.ti-sticker-trigger:hover,
.ti-sticker-trigger:focus-visible{
  border-color:rgba(201,155,98,.76);
  background:rgba(183,132,67,.11);
  outline:none;
  transform:translateY(-1px);
}

.ti-sticker-trigger>span{
  color:var(--gold,#c99b62);
}

.ti-sticker-trigger>b{
  font-size:12px;
  font-weight:600;
}

.ti-sticker-trigger>small{
  display:inline-grid;
  place-items:center;
  min-width:23px;
  height:20px;
  padding:0 5px;
  border-radius:99px;
  background:rgba(183,132,67,.12);
  color:var(--gold,#c99b62);
  font-size:9px;
}

.ti-sticker-tools__preview{
  width:42px;
  height:42px;
  border:1px solid rgba(183,132,67,.34);
  border-radius:11px;
  background:rgba(255,255,255,.025);
  overflow:hidden;
}

.ti-sticker-tools__preview img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}

.ti-sticker-tools__clear{
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  padding:0;
  border:1px solid rgba(183,132,67,.24);
  border-radius:50%;
  background:transparent;
  color:var(--muted,#9b8978);
  cursor:pointer;
}

.ti-sticker-tools__clear:hover{
  color:var(--gold,#c99b62);
  border-color:rgba(183,132,67,.55);
}

/* Displayed sticker inside an already published comment. */
.ti-comment-sticker{
  display:block;
  width:min(190px,62vw);
  max-width:100%;
  margin:10px 0 5px;
  line-height:0;
}

.ti-comment-sticker img{
  display:block;
  width:100%;
  height:auto;
  max-height:220px;
  object-fit:contain;
  object-position:left center;
}

/* Shared picker */
html.ti-sticker-picker-open,
html.ti-sticker-picker-open body{
  overflow:hidden!important;
}

.ti-sticker-overlay{
  position:fixed;
  inset:0;
  z-index:15000;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(5,4,6,.70);
  backdrop-filter:blur(5px);
}

.ti-sticker-overlay[hidden]{
  display:none!important;
}

.ti-sticker-sheet{
  width:min(760px,100%);
  max-height:min(78vh,760px);
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  overflow:hidden;
  border:1px solid rgba(201,155,98,.34);
  border-radius:18px;
  background:#171217;
  color:#eadbc8;
  box-shadow:0 32px 90px rgba(0,0,0,.52);
}

.ti-sticker-sheet__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:16px 18px;
  border-bottom:1px solid rgba(201,155,98,.18);
  background:rgba(255,255,255,.018);
}

.ti-sticker-sheet__header small{
  display:block;
  margin-bottom:3px;
  color:#aa8d72;
  font-size:9px;
  letter-spacing:.18em;
  text-transform:uppercase;
}

.ti-sticker-sheet__header strong{
  display:block;
  font:500 23px/1.05 Georgia,serif;
}

.ti-sticker-sheet__header strong span{
  color:#c99b62;
  font-size:.7em;
}

.ti-sticker-sheet__header-actions{
  display:flex;
  align-items:center;
  gap:8px;
}

.ti-sticker-clear{
  min-height:34px;
  padding:0 11px;
  border:1px solid rgba(201,155,98,.24);
  border-radius:99px;
  background:transparent;
  color:#bca78f;
  cursor:pointer;
  font-size:11px;
}

.ti-sticker-clear:hover{
  border-color:rgba(201,155,98,.52);
  color:#dbc29b;
}

.ti-sticker-close{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  padding:0 0 3px;
  border:1px solid rgba(201,155,98,.24);
  border-radius:50%;
  background:transparent;
  color:#d8c4ad;
  cursor:pointer;
  font:300 25px/1 system-ui,sans-serif;
}

.ti-sticker-close:hover{
  border-color:rgba(201,155,98,.58);
  color:#fff1da;
}

.ti-sticker-sheet__scroll{
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  padding:16px;
  scrollbar-width:thin;
  scrollbar-color:rgba(201,155,98,.38) transparent;
}

.ti-sticker-recent,
.ti-sticker-all{
  margin:0;
}

.ti-sticker-all{
  margin-top:4px;
}

.ti-sticker-recent{
  margin-bottom:18px;
  padding-bottom:16px;
  border-bottom:1px solid rgba(201,155,98,.14);
}

.ti-sticker-recent>p,
.ti-sticker-all>p{
  margin:0 0 10px;
  color:#aa8d72;
  font-size:10px;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.ti-sticker-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:8px;
}

.ti-sticker-recent__grid{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding-bottom:2px;
}

.ti-sticker-choice{
  position:relative;
  aspect-ratio:1;
  min-width:0;
  padding:5px;
  border:1px solid rgba(201,155,98,.12);
  border-radius:12px;
  background:rgba(255,255,255,.018);
  cursor:pointer;
  overflow:hidden;
  transition:border-color .14s ease,background .14s ease,transform .14s ease;
}

.ti-sticker-choice--recent{
  width:78px;
  min-width:78px;
  height:78px;
}

.ti-sticker-choice:hover,
.ti-sticker-choice:focus-visible{
  border-color:rgba(201,155,98,.58);
  background:rgba(183,132,67,.075);
  outline:none;
  transform:translateY(-1px);
}

.ti-sticker-choice.is-selected{
  border-color:#c99b62;
  background:rgba(183,132,67,.13);
  box-shadow:0 0 0 1px rgba(201,155,98,.18) inset;
}

.ti-sticker-choice.is-selected::after{
  content:"✓";
  position:absolute;
  top:5px;
  right:5px;
  display:grid;
  place-items:center;
  width:20px;
  height:20px;
  border-radius:50%;
  background:#9b553e;
  color:#fff2dd;
  font:700 11px/1 system-ui,sans-serif;
}

.ti-sticker-choice img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  pointer-events:none;
}

/* Light theme */
html[data-theme="light"] .ti-sticker-sheet{
  border-color:rgba(139,94,46,.28);
  background:#f7eddf;
  color:#4a3024;
  box-shadow:0 32px 90px rgba(72,44,24,.24);
}

html[data-theme="light"] .ti-sticker-sheet__header{
  border-color:rgba(139,94,46,.16);
  background:rgba(255,255,255,.30);
}

html[data-theme="light"] .ti-sticker-sheet__header small,
html[data-theme="light"] .ti-sticker-recent>p,
html[data-theme="light"] .ti-sticker-all>p{
  color:#8d6749;
}

html[data-theme="light"] .ti-sticker-sheet__header strong{
  color:#432b20;
}

html[data-theme="light"] .ti-sticker-close,
html[data-theme="light"] .ti-sticker-clear{
  color:#6f503c;
  border-color:rgba(139,94,46,.24);
}

html[data-theme="light"] .ti-sticker-choice{
  border-color:rgba(139,94,46,.14);
  background:rgba(255,255,255,.34);
}

html[data-theme="light"] .ti-sticker-choice:hover,
html[data-theme="light"] .ti-sticker-choice:focus-visible{
  border-color:rgba(139,94,46,.46);
  background:rgba(183,132,67,.10);
}

html[data-theme="light"] .ti-sticker-trigger{
  border-color:rgba(139,94,46,.28);
  background:rgba(183,132,67,.075);
  color:#563a2b;
}

html[data-theme="light"] .ti-sticker-tools__preview{
  border-color:rgba(139,94,46,.28);
  background:rgba(255,255,255,.42);
}

/* Mobile bottom sheet */
@media(max-width:700px){
  .ti-sticker-tools{
    gap:6px;
    margin-top:8px;
  }

  .ti-sticker-trigger{
    min-height:36px;
    padding:0 10px;
  }

  .ti-sticker-trigger>b{
    font-size:11px;
  }

  .ti-comment-sticker{
    width:min(158px,52vw);
    margin-top:8px;
  }

  .ti-comment-sticker img{
    max-height:180px;
  }

  .ti-sticker-overlay{
    place-items:end stretch;
    padding:0;
    background:rgba(5,4,6,.58);
  }

  .ti-sticker-sheet{
    width:100%;
    max-height:78dvh;
    border-left:0;
    border-right:0;
    border-bottom:0;
    border-radius:18px 18px 0 0;
    padding-bottom:env(safe-area-inset-bottom);
  }

  .ti-sticker-sheet__header{
    padding:13px 14px;
  }

  .ti-sticker-sheet__header strong{
    font-size:20px;
  }

  .ti-sticker-sheet__scroll{
    padding:12px;
  }

  .ti-sticker-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:7px;
  }

  .ti-sticker-choice{
    border-radius:10px;
    padding:4px;
  }

  .ti-sticker-choice--recent{
    width:68px;
    min-width:68px;
    height:68px;
  }
}

@media(max-width:380px){
  .ti-sticker-grid{
    gap:5px;
  }

  .ti-sticker-sheet__scroll{
    padding:10px;
  }
}

@media(prefers-reduced-motion:reduce){
  .ti-sticker-trigger,
  .ti-sticker-choice{
    transition:none!important;
  }
}
