/* net.css: the shared town's pieces: names and bubbles over other slimes, the "N here" pill, the Talk sheet.
   Same look as the signs, the family's bubbles and the other sheets in index.html. */

/* over each other slime: a bubble when they say something, their name under it */
.rtag { position: fixed; left: 0; top: 0; z-index: 41; pointer-events: none; will-change: transform; display: flex; flex-direction: column; align-items: center; gap: 7px;
  transition: opacity .35s; }
.rtag.off { visibility: hidden; }
.rtag.out { opacity: 0; }
.rlabel { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 13px; line-height: 1; white-space: nowrap; background: rgba(255,253,247,.94); color: var(--ink);
  padding: 6px 11px; border-radius: 999px; box-shadow: 0 3px 10px rgba(70,45,20,.18); transition: background .2s; }
.rlabel.flash { background: var(--star); }
.rlabel.me { display: none; }
.rsay { position: relative; display: none; max-width: min(210px, 58vw); background: #fff; border-radius: 16px; padding: 8px 13px 9px; box-shadow: var(--shadow);
  font-family: "Fredoka", sans-serif; font-weight: 500; font-size: 15px; line-height: 1.25; color: var(--ink); text-align: center; overflow-wrap: anywhere; }
.rsay.on { display: block; animation: sayPop .22s cubic-bezier(.2,.9,.3,1.3); }
.rsay::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: #fff; transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
.rsay.big { font-size: 26px; padding: 5px 12px 6px; line-height: 1.1; }
.rfx { position: fixed; left: 0; top: 0; z-index: 42; pointer-events: none; will-change: transform; }
.rfx span { display: block; font-size: 24px; line-height: 1; animation: rfxUp 1.3s ease-out forwards; }
.rfx.loop span { animation-iteration-count: 3; animation-duration: 1.1s; font-size: 20px; }
@keyframes rfxUp { 0% { opacity: 0; transform: translateY(6px) scale(.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-34px) scale(1.15); } }

/* the pill under your name */
#hereChip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 7px 12px; font-size: 13px; }
#hereChip[hidden] { display: none; }
#hereChip.pop { animation: lampPop .35s cubic-bezier(.3,1.6,.5,1); }

/* the Talk sheet */
.sheet.talk { max-height: 78vh; max-height: 78dvh; padding-bottom: calc(18px + var(--sb)); }
.tk-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 4px; }
.tk-head h3 { margin: 0 0 0 4px; }
.tk-x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--cream); display: grid; place-items: center; cursor: pointer; padding: 0; }
.tk-x svg { width: 15px; height: 15px; }
.tk-sec { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 13px; color: var(--muted); margin: 14px 0 7px 4px; letter-spacing: .02em; }
.tk-emotes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tk-emotes button { min-height: 62px; border: 0; border-radius: 16px; background: var(--cream); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-family: "Fredoka", sans-serif; font-weight: 500; font-size: 12px; color: var(--ink); padding: 6px 2px; touch-action: manipulation; }
.tk-emotes button b { font-size: 24px; line-height: 1; font-weight: 400; }
.tk-phrases { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-phrases button { min-height: 44px; padding: 9px 15px; border-radius: 22px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-family: "Fredoka", sans-serif; font-weight: 500; font-size: 15px; color: var(--ink); touch-action: manipulation; }
.tk-emotes button:active, .tk-phrases button:active { transform: scale(.95); background: var(--star); }
.tk-emotes button:disabled, .tk-phrases button:disabled { opacity: .55; }
.tk-who { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tk-who li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 12px; font-family: "Fredoka", sans-serif; font-weight: 500; font-size: 15px; }
.tk-who li.you { background: var(--cream); }
.tk-who i { flex: none; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.tk-who em { margin-left: auto; font-style: normal; font-size: 16px; }
.tk-invite { background: var(--cream); border-radius: 18px; padding: 12px 14px 14px; }
.tk-invite p { margin: 0 0 10px; font-size: 14px; line-height: 1.35; color: var(--ink); }
.tk-link { display: block; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--ink); margin-bottom: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tk-btn { min-height: 44px; padding: 10px 18px; border-radius: 22px; border: 0; background: #fff; box-shadow: var(--shadow); cursor: pointer; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 15px; color: var(--ink); touch-action: manipulation; }
.tk-btn.accent { background: var(--accent); color: #fff; }
.tk-btn:active { transform: scale(.96); }
.tk-chat { background: var(--cream); border-radius: 18px; padding: 10px 10px 10px; margin-bottom: 4px; }
.tk-log { max-height: 108px; overflow-y: auto; margin: 0 0 8px 2px; font-size: 14px; line-height: 1.35; }
.tk-log div { padding: 1px 0; overflow-wrap: anywhere; } .tk-log b { font-family: "Fredoka", sans-serif; font-weight: 600; color: var(--accent); }
.tk-log:empty { display: none; }
.tk-form { display: flex; gap: 8px; }
.tk-form input { flex: 1; min-width: 0; min-height: 44px; border-radius: 22px; border: 1.5px solid var(--line); padding: 0 16px; font: 500 16px "Nunito", system-ui, sans-serif; color: var(--ink); background: #fff; }
.tk-form input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.tk-form button { flex: none; }
.tk-note { font-size: 12.5px; color: var(--muted); margin: 6px 4px 0; }
@media (min-width: 761px) {
  .sheet.talk { left: 50%; right: auto; width: min(460px, 92vw); transform: translateX(-50%); border-radius: 26px; bottom: 90px; padding: 14px 22px 18px; animation: fade .2s; }
  .sheet.talk .grab { display: none; }
}
body.fishing .rtag, body.cooking .rtag, body.fishing .rfx, body.cooking .rfx, body.gate .rtag, body.gate .rfx { opacity: 0 !important; }
body.fishing #hereChip, body.cooking #hereChip, body.gate #hereChip { pointer-events: none !important; }
@media (prefers-reduced-motion: reduce) { .rfx span, .rsay.on { animation: none; } }

/* Wren's bubble when a fight is on in this town */
.prompt.joinfight { background: #fff3c4; box-shadow: 0 0 0 3px var(--star), 0 6px 22px rgba(255,197,61,.55); animation: bob 1.6s ease-in-out infinite, joinGlow 1.2s ease-in-out infinite alternate; }
.prompt.joinfight::after { background: #fff3c4; }
@keyframes joinGlow { from { filter: none; } to { filter: brightness(1.06) saturate(1.2); } }
