#banner, #gimmick {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.25rem 0.8rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 246, 234, 0.92);
  font-family: "Jua", "Malgun Gothic", sans-serif;
  pointer-events: none;
  max-width: calc(100% - 220px);
  text-align: center;
}

#banner { top: 12px; }

#gimmick {
  top: 52px;
  background: #ffd0e0;
}

#topLeftHud {
  position: absolute;
  top: 12px;
  left: 10px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: min(250px, 48vw);
}

.badge-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.45rem 0.65rem;
  background: linear-gradient(135deg, #fffdf2 0%, #ffeed1 100%);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 3px 0 var(--ink);
  font-family: "Jua", "Malgun Gothic", sans-serif;
  color: var(--ink);
  pointer-events: none;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.badge-notice[hidden] {
  display: none !important;
}

.badge-notice.has-badge {
  background: linear-gradient(135deg, #ecfdf5 0%, #bbf7d0 100%);
  border-color: #15803d;
  box-shadow: 0 3px 0 #15803d;
}

.badge-notice.has-badge .badge-notice-tag {
  background: #16a34a;
}

.badge-notice-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.15));
}

.badge-notice-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.badge-notice-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.badge-notice-tag {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  font-size: 0.72rem;
  line-height: 1.1;
  background: #ff5d8f;
  color: #fff;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.badge-notice-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.badge-notice-desc {
  font-size: 0.8rem;
  line-height: 1.25;
  color: #55444b;
  word-break: keep-all;
  white-space: normal;
}

#board, #feed {
  position: absolute;
  left: 10px;
  margin: 0;
  padding: 0.35rem 0.55rem;
  list-style: none;
  background: rgba(255, 246, 234, 0.92);
  border: 3px solid var(--ink);
  border-radius: 14px;
  pointer-events: none;
  max-width: min(240px, 46vw);
}

#topLeftHud #board {
  position: static;
  top: auto;
  left: auto;
  max-width: 100%;
}

#board { top: 12px; }

#feed { bottom: 12px; }

#board li, #feed li {
  padding: 0.12rem 0;
  line-height: 1.3;
}

#board li.me { font-weight: 800; }

#bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Emote Queue (Bottom-Left) */
#emoteQueue {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  max-width: min(380px, 82vw);
}

.emote-item {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  will-change: transform, opacity;
  transform-origin: left bottom;
}

.emote-item.pop-in {
  animation: emotePopIn 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.emote-item.fade-out {
  transition: opacity 0.22s ease-out, transform 0.22s cubic-bezier(0.4, 0, 1, 1);
  opacity: 0;
  transform: translateY(6px) scale(0.85);
}

@keyframes emotePopIn {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.75);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.emote-portrait {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
}

.emote-portrait svg {
  width: 100%;
  height: 100%;
  display: block;
}

.emote-bubble-wrap {
  display: flex;
  align-items: center;
  position: relative;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.18));
}

.emote-arrow {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 8px solid var(--ink);
  margin-right: -2.5px;
  position: relative;
  z-index: 2;
}

.emote-arrow::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 2px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-right: 6px solid #fff;
}

.emote-bubble {
  background: #ffffff;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  padding: 0.3rem 0.65rem;
  font-family: "Jua", "Malgun Gothic", sans-serif;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.emote-name {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: normal;
}

.emote-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.bubble {
  position: absolute;
  transform: translate(-50%, -120%);
  padding: 0.15rem 0.45rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  font-family: "Jua", "Malgun Gothic", sans-serif;
  white-space: nowrap;
}

#centerTimer[hidden] { display: none; }

#centerTimer {
  position: absolute;
  inset: 0;
  z-index: 4;
  font-family: "Jua", "Malgun Gothic", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  pointer-events: none;
}

#count, #countExtra {
  font-size: 8rem;
  line-height: 0.9;
  color: #fff;
  -webkit-text-stroke: 8px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 8px 0 rgba(42, 29, 36, 0.25);
}

#centerNote {
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: clamp(1.6rem, 4vw, 3rem);
  color: #fff;
  -webkit-text-stroke: 6px var(--ink);
  paint-order: stroke fill;
  text-align: center;
  max-width: 90%;
}

#soloBar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

#soloBar[hidden] { display: none; }

#soloBar button {
  padding: 0.32rem 0.65rem;
  font-family: "Jua", "Malgun Gothic", sans-serif;
  font-size: 0.85rem;
  background: rgba(255, 246, 234, 0.95);
}
