/* The Honest Place — quiet editorial emoji picker
   Floating layer: must sit ABOVE the NT Desk nav drawer.
   NT scale (nt3430.css): backdrop 80, drawer 90.
   Picker uses 100 so it remains usable while the sidebar is open. */
.thp-emoji-picker {
  position: fixed;
  z-index: 100;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: min(20rem, calc(100vw - 1rem));
  max-height: min(22.5rem, calc(100vh - 1rem));
  padding: 0;
  border: 1px solid var(--rule, #d5cec2);
  border-radius: 0.85rem;
  background: #faf7f1;
  color: var(--ink-primary, #2f2f2f);
  box-shadow: 0 10px 28px rgba(40, 35, 25, 0.1);
  overflow: hidden;
  font-family: var(--font-ui, "Iowan Old Style", Palatino, Georgia, serif);
}
.thp-emoji-picker[hidden] {
  display: none !important;
}
.thp-emoji-picker-chrome {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
  height: 100%;
}
.thp-emoji-search-label {
  display: block;
  margin: 0;
  padding: 0.55rem 0.65rem 0.35rem;
  border-bottom: 1px solid rgba(213, 206, 194, 0.7);
}
.thp-emoji-search {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--rule, #d5cec2);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.65);
  color: inherit;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.3;
}
.thp-emoji-search:focus {
  outline: 1px solid var(--accent, #7a6552);
  outline-offset: 1px;
}
.thp-emoji-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.1rem;
  padding: 0.3rem 0.4rem;
  border-bottom: 1px solid rgba(213, 206, 194, 0.7);
  overflow-x: auto;
  scrollbar-width: thin;
}
.thp-emoji-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-secondary, #6a6a6a);
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.15rem;
  border-radius: 0.45rem;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}
.thp-emoji-tab:hover,
.thp-emoji-tab:focus-visible {
  background: rgba(122, 101, 82, 0.08);
  color: var(--ink-primary, #2f2f2f);
}
.thp-emoji-tab.is-active {
  background: rgba(122, 101, 82, 0.12);
  color: var(--ink-primary, #2f2f2f);
}
.thp-emoji-tab:focus-visible {
  outline: 1px solid var(--accent, #7a6552);
  outline-offset: 1px;
}
.thp-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.1rem;
  padding: 0.4rem 0.45rem 0.55rem;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
  -webkit-overflow-scrolling: touch;
}
.thp-emoji-btn {
  appearance: none;
  border: 0;
  background: transparent;
  min-width: 0;
  min-height: 2.15rem;
  padding: 0.15rem;
  border-radius: 0.4rem;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.thp-emoji-btn:hover,
.thp-emoji-btn:focus-visible {
  background: rgba(122, 101, 82, 0.1);
}
.thp-emoji-btn:focus-visible {
  outline: 1px solid var(--accent, #7a6552);
  outline-offset: 1px;
}
.thp-emoji-empty {
  grid-column: 1 / -1;
  margin: 0.75rem 0.25rem;
  color: var(--ink-secondary, #6a6a6a);
  font-size: 0.9rem;
  text-align: center;
}
.thp-emoji-picker .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 419px) {
  .thp-emoji-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}
