/* The bar: its layout and rail, toast tiles and reactions, skeletons, the crown strip and the hit list. */

.bar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: start;
}
.rail {
  position: sticky;
  top: calc(var(--top-height) + 20px);
  display: grid;
  gap: 20px;
}
.panel {
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent), var(--ink-2);
}
.panel-title {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font: 600 12px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mute);
}
.panel-title a {
  display: inline-block;
  min-width: 44px;
  text-align: right;
  padding: 14px 12px;
  margin: -14px -12px;
  color: var(--acid);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
}

.bar-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.bar-title {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.bar-title em {
  font-family: var(--serif);
  font-weight: 500;
  font-size-adjust: 0.47;
  font-weight: 400;
  color: var(--bone-2);
}

.feed {
  display: grid;
  gap: 16px;
}
.feed-more {
  display: grid;
  place-items: center;
  padding: 18px 0 0;
}
.feed-end {
  text-align: center;
  color: var(--dim);
  font: 500 13px/1 var(--mono);
  padding: 22px 0 0;
}

/* ---------- Toast tile ---------- */

.toast {
  --accent: var(--acid);
  position: relative;
  display: grid;
  gap: 14px;
  padding: clamp(18px, 3vw, 26px);
  border-radius: var(--r-3);
  border: 1px solid var(--line);
  background:
    radial-gradient(500px 220px at 0% 0%, rgba(210, 255, 31, 0.045), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.005)), var(--ink-2);
  transition:
    border-color 0.25s,
    transform 0.25s var(--ease-out),
    box-shadow 0.25s;
  animation: tile-in 0.5s var(--ease-out) both;
}
.toast:hover {
  border-color: var(--line-2);
}
.toast.is-new {
  animation: tile-new 0.9s var(--ease-spring) both;
}
.toast.is-crowned {
  border-color: rgba(255, 210, 90, 0.4);
  background: radial-gradient(500px 240px at 100% 0%, rgba(255, 210, 90, 0.12), transparent 70%), var(--ink-2);
}
.toast.is-hidden {
  opacity: 0.6;
  border-style: dashed;
}
.toast.is-big {
  padding: clamp(22px, 4.5vw, 44px);
}
@keyframes tile-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
@keyframes tile-new {
  0% {
    opacity: 0;
    transform: translateY(-20px) scale(0.96);
    box-shadow: 0 0 0 0 var(--acid-glow);
  }
  60% {
    box-shadow: 0 0 0 8px rgba(210, 255, 31, 0.08);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.toast-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.toast-who {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}
.toast-name {
  display: inline-block;
  padding-block: 12px;
  margin-block: -12px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toast-name:hover {
  text-decoration: underline;
}
.toast-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--mute);
}
.toast-when {
  display: inline-block;
  padding: 12px 14px;
  margin: -12px -14px;
}
.rank-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--r-1);
  border: 1px solid var(--line-2);
  font: 600 11px/1.4 var(--mono);
  color: var(--bone-2);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.rank-chip.is-house {
  border-color: rgba(210, 255, 31, 0.35);
  color: var(--acid);
}
.toast-more {
  margin-left: auto;
  width: 40px;
  height: 40px;
}
.crown-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-1);
  background: rgba(255, 210, 90, 0.14);
  color: var(--gold);
  font: 700 11px/1.3 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hidden-chip {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: var(--r-1);
  background: rgba(255, 90, 79, 0.14);
  color: #ffb3ad;
  font: 700 11px/1.3 var(--mono);
}

.toast-words {
  display: grid;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}
.toast-lead {
  font: 700 12px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
}
.toast-lead em {
  font-family: var(--serif);
  font-weight: 500;
  font-size-adjust: 0.47;
  font-size: 1.5em;
  text-transform: none;
  letter-spacing: 0;
  color: var(--bone-2);
  font-weight: 400;
}
.toast-target {
  margin: 0;
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.toast-target a {
  text-decoration: none;
}
.toast-target a:hover {
  color: var(--acid);
}
.toast.is-big .toast-target {
  font-size: clamp(48px, 10vw, 104px);
}
.toast-litany {
  font-family: var(--read);
  font-weight: 400;
  font-optical-sizing: auto;
  margin: 0;
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--bone-2);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.toast-blessing {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size-adjust: 0.47;
  font-style: italic;
  font-size: clamp(20px, 2.8vw, 26px);
  line-height: 1.2;
  color: var(--acid);
  overflow-wrap: anywhere;
}
.toast-blessing .house-tag {
  margin-left: 8px;
  font: 500 11px/1 var(--mono);
  font-style: normal;
  color: var(--dim);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.toast-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.react {
  --react: var(--bone);
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: var(--r-1);
  border: 1px solid var(--line-2);
  background: var(--ink-3);
  color: var(--bone-2);
  font: 600 14px/1 var(--mono);
  font-variant-numeric: tabular-nums;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.15s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.react:hover {
  border-color: var(--line-3);
  color: var(--bone);
}
.react:active {
  transform: scale(0.94);
}
.react .icon {
  width: 20px;
  height: 20px;
}
.react[aria-pressed="true"] {
  color: var(--ink);
  border-color: transparent;
}
.react-clink[aria-pressed="true"] {
  background: var(--acid);
  box-shadow: 0 0 22px var(--acid-glow);
}
.react-flat[aria-pressed="true"] {
  background: var(--ice);
}
.react-alchemy[aria-pressed="true"] {
  background: var(--gold);
  box-shadow: 0 0 22px var(--gold-glow);
}
.react.is-popping .icon {
  animation: clink-pop 0.55s var(--ease-spring);
}
@keyframes clink-pop {
  0% {
    transform: rotate(0) scale(1);
  }
  30% {
    transform: rotate(-22deg) scale(1.35);
  }
  60% {
    transform: rotate(12deg) scale(0.95);
  }
  100% {
    transform: none;
  }
}
.react-label {
  font-family: var(--display);
  font-weight: 600;
}
.react-share {
  margin-left: auto;
}

.burst {
  position: absolute;
  pointer-events: none;
  inset: 0;
  overflow: visible;
}
.burst i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--burst, var(--acid));
  animation: burst 0.7s var(--ease-out) forwards;
}
@keyframes burst {
  from {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  to {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.2);
    opacity: 0;
  }
}

/* ---------- Skeletons ---------- */

.skeleton {
  border-radius: var(--r-3);
  border: 1px solid var(--line);
  background: var(--ink-2);
  padding: 24px;
  display: grid;
  gap: 14px;
}
.skeleton i {
  display: block;
  height: 14px;
  border-radius: var(--r-1);
  background: linear-gradient(90deg, var(--ink-3), var(--ink-4), var(--ink-3));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.skeleton i:nth-child(1) {
  width: 40%;
}
.skeleton i:nth-child(2) {
  width: 85%;
  height: 44px;
}
.skeleton i:nth-child(3) {
  width: 65%;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ---------- Crown strip ---------- */

.crown {
  display: grid;
  gap: 12px;
  margin-bottom: 30px;
}
.crown-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font: 700 12px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
}
.crown-head .icon {
  width: 18px;
  height: 18px;
}

/* ---------- Hit list ---------- */

.hits {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hit {
  position: relative;
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-2);
  text-decoration: none;
  background: var(--ink-3);
  border: 1px solid transparent;
  overflow: hidden;
  isolation: isolate;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.hit:hover {
  border-color: var(--line-2);
  background: var(--ink-4);
}
.hit::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--share, 0) * 100%);
  background: linear-gradient(90deg, rgba(210, 255, 31, 0.12), rgba(210, 255, 31, 0.02));
  z-index: -1;
}
.hit-place {
  font: 700 13px/1 var(--mono);
  color: var(--dim);
}
.hit-label {
  font-weight: 750;
  font-size: 19px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hit-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 13px/1 var(--mono);
  color: var(--bone-2);
  white-space: nowrap;
}
.hit-count i {
  font-style: normal;
  color: var(--dim);
}
.hit-count .icon-finger {
  color: var(--acid);
}
.hit-count .icon-clink {
  color: var(--gold);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--r-1);
  border: 1px solid var(--line-2);
  background: var(--ink-3);
  text-decoration: none;
  font-weight: 650;
  font-size: 14px;
  transition:
    border-color 0.2s,
    background 0.2s,
    color 0.2s;
}
.chip:hover {
  border-color: var(--acid);
  color: var(--acid);
}
.chip small {
  font: 600 11px/1 var(--mono);
  color: var(--mute);
}
.search {
  position: relative;
  max-width: 520px;
  margin-bottom: 18px;
}
.search .icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mute);
  pointer-events: none;
}
.search .input {
  padding-left: 46px;
}
