/* UpQuest community and an original game-inspired frame for shared guild chat. */
.community-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.community-eyebrow { margin-bottom: 1rem; color: var(--amber); font-size: .75rem; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.community-intro h1 { max-width: 12ch; font-size: clamp(2.8rem, 4.8vw, 4.6rem); }
.community-lead { max-width: 34ch; margin-top: 1.6rem; color: var(--text); font-size: 1.3rem; line-height: 1.5; }
.community-description { max-width: 48ch; color: var(--muted); font-size: 1rem; }
.community-intro .cta-row { align-items: center; gap: 1.4rem; margin-top: 1.8rem; }
.community-text-link { display: inline-flex; align-items: center; gap: .65rem; min-height: 44px; font-size: .95rem; font-weight: 650; text-decoration: none; }
.community-guild { position: relative; overflow: hidden; padding: 2.2rem 2rem 0; border: 1px solid var(--line-strong); border-radius: 22px; background: radial-gradient(ellipse at 50% 25%, rgba(255,128,0,.12), transparent 60%), linear-gradient(160deg, var(--navy-700), var(--navy-900)); text-align: center; box-shadow: 0 24px 70px -35px #000; }
.community-guild::before { content: ""; position: absolute; inset: 0 15% auto; height: 2px; background: linear-gradient(90deg, transparent, var(--orange), transparent); }
.community-emblem { display: flex; justify-content: center; margin: .5rem 0 1.7rem; color: var(--amber); }
.community-guild-kicker { margin-bottom: .5rem; color: var(--subtle); font-size: .75rem; letter-spacing: .13em; text-transform: uppercase; }
.community-guild h2 { font-size: clamp(1.9rem, 2.5vw, 2.5rem); }
.community-guild-note { margin-bottom: 2rem; color: var(--muted); font-size: .9rem; }
.community-guild-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-inline: -2rem; padding: 1rem 1.5rem; border-top: 1px solid var(--line); color: var(--subtle); background: rgba(0,0,0,.15); font-size: .72rem; letter-spacing: .04em; }
.community-guild-footer span:first-child { color: var(--amber); font-weight: 700; }
.community-snapshot { padding-top: 1.5rem; }
.community-section-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.8rem; }
.community-section-heading .community-eyebrow { margin-bottom: .65rem; }
.community-section-heading h2 { margin-bottom: 0; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.community-status { display: inline-flex; align-items: center; gap: .5rem; margin: 0; padding: .42rem .8rem; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; font-size: .76rem; background: var(--navy-800); }
.community-status span { width: 6px; height: 6px; border-radius: 50%; background: var(--subtle); }
.community-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: rgba(14,21,45,.88); }
.community-stat { padding: 1.7rem; }
.community-stat + .community-stat { border-left: 1px solid var(--line); }
.community-stat dt { color: var(--text); font-size: .95rem; font-weight: 650; }
.community-stat dd { margin: .8rem 0 .5rem; color: var(--subtle); font-size: 2.4rem; line-height: 1.2; }
.community-stat p { max-width: 30ch; margin-bottom: 0; color: var(--subtle); font-size: .85rem; line-height: 1.65; }
.community-freshness { display: flex; justify-content: space-between; gap: 1rem 3rem; padding: 1.15rem .2rem; color: var(--subtle); font-size: .75rem; }
.community-freshness p { margin-bottom: 0; }
.community-freshness p:first-child { flex: none; }
.community-freshness p:last-child { max-width: 65ch; }
.community-freshness strong { color: var(--muted); }
.community-conversation { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); padding-block: 4.5rem 5rem; margin-top: 3.5rem; border-top: 1px solid var(--line-strong); }
.community-conversation h2 { margin: 0; font-size: clamp(2rem, 3.5vw, 3rem); line-height: 1.2; }
.community-conversation-copy { padding-top: 2.5rem; color: var(--muted); }
.community-conversation-copy > p { max-width: 43ch; }
.community-chat-note { margin-top: 2rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.community-chat-note h3 { margin-bottom: .5rem; color: var(--text); font-size: .85rem; }
.community-chat-note p { margin-bottom: 0; color: var(--subtle); font-size: .85rem; }
.community-chat { padding-block: 1rem 3rem; }
.guild-chat-home { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.35fr); align-items: start; gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: 2rem; }
.guild-invitation { padding-top: .8rem; }
.guild-invitation .community-eyebrow { margin-bottom: .8rem; }
.guild-invitation h3 { margin: 0 0 1.1rem; font-size: clamp(1.9rem, 3vw, 2.7rem); line-height: 1.1; letter-spacing: -.035em; }
.guild-invitation > p:not(.community-eyebrow):not(.guild-realm):not(.guild-invitation-lead) { max-width: 43ch; margin-block: 1.1rem 1.5rem; color: var(--muted); font-size: .97rem; line-height: 1.7; }
.guild-invitation-lead { margin: 0 0 .65rem; color: var(--text); font-size: 1.14rem; line-height: 1.5; }
.guild-invitation-lead strong { color: var(--amber); }
.guild-realm { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 0; color: #bcd6af; font-size: .84rem; font-weight: 650; }
.guild-realm::before { content: ""; width: 6px; height: 6px; margin-right: .15rem; border-radius: 50%; background: #8fb277; }
.guild-realm span { color: var(--subtle); font-weight: 400; }
.guild-invitation .btn { white-space: normal; }
.guild-chat-shell { position: relative; min-width: 0; padding: 4px; border: 1px solid #7c8062; border-radius: 12px; background: radial-gradient(ellipse at 10% 0%, rgba(104,135,80,.1), transparent 65%), linear-gradient(160deg, #111710, #090f0c 75%, #101810); box-shadow: inset 0 1px 0 #b1a782, inset 1px 0 0 #526047, inset 0 -1px 0 #293221, 0 0 0 1px #080b08, 0 0 0 3px rgba(132,128,96,.1), 0 24px 50px -30px #000; font-family: "Trebuchet MS", Tahoma, Arial, sans-serif; text-shadow: 0 1px 1px #000; }
.guild-chat-shell::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(153,160,111,.17); border-radius: 8px; pointer-events: none; }
.guild-chat-shell::after { content: ""; position: absolute; inset: 5px; border-radius: 7px; background: url("/assets/art/grain.svg?v=2.2.63"); opacity: .035; pointer-events: none; }
/* The heading, the lines and the footer sit above the guild fire (hearth.css), whose canvas reaches up behind the last lines. */
.guild-chat-heading { position: relative; z-index: 1; display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem .8rem; margin: 0; padding: .95rem 1rem; border-bottom: 1px solid rgba(157,165,116,.2); border-radius: 8px 8px 0 0; background: linear-gradient(180deg, rgba(149,159,103,.07), transparent); }
.guild-chat-heading h2, .guild-chat-heading h3 { margin: 0; color: #e7ce90; font-family: inherit; font-size: 1rem; font-weight: 700; line-height: 1.3; letter-spacing: .01em; }
.guild-chat-name { margin: 0; color: #afc69b; font-size: .8rem; line-height: 1.3; }
.guild-chat-name span { color: #929682; }
.guild-chat-status { margin: 0 0 0 auto; color: #a0aa96; font-size: .7rem; line-height: 1.3; }
.guild-chat-status[data-state="ready"] { color: #a8c795; }
.guild-chat-status[data-state="error"] { color: #b9a989; }
.guild-chat-empty { position: relative; z-index: 1; display: grid; place-content: center; min-height: 11rem; margin: 0; padding: 1.8rem 1.1rem; color: #a8b89a; font-size: .9rem; line-height: 1.6; text-align: center; }
.guild-messages { position: relative; z-index: 1; margin: 0; padding: .8rem 1.1rem 1rem; list-style: none; }
.guild-message { display: block; margin: .35rem 0; padding: 0; color: #62ef79; font-size: 1rem; font-weight: 400; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; text-shadow: 0 1px 1px #000, 0 0 6px rgba(6,10,7,.9); }
.guild-message-guild { color: #b8d7a0; font-weight: 700; }
.guild-message[data-guild="upquest"] .guild-message-guild { color: #ffb454; }
.guild-message-author { color: #b8d7a0; font-weight: 700; }
.guild-message-text { color: inherit; }
.guild-chat-footer { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .25rem 1rem; margin: 0; padding: .65rem 1rem; border-top: 1px solid rgba(157,165,116,.15); color: #a0aa96; font-size: .68rem; line-height: 1.5; }
.guild-chat-disclosure { margin: .7rem 0 0; color: var(--subtle); font-size: .72rem; line-height: 1.5; }
.chat-pulse .guild-chat-shell { animation: campfire-glow 1.4s ease-out; }
@keyframes campfire-glow { 0%,100% { border-color: #7c8062; } 25% { border-color: #aac78d; } }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { .chat-pulse .guild-chat-shell { animation: none; } }
@media (max-width: 59.99rem) {
  .community-hero { gap: 2rem; }
  .community-intro h1 { font-size: clamp(2.5rem, 5.6vw, 4rem); }
  .community-guild { padding-inline: 1.3rem; }
  .community-guild-footer { margin-inline: -1.3rem; }
}
@media (max-width: 43rem) {
  .guild-chat-home { grid-template-columns: minmax(0, 1fr); gap: 1.7rem; }
  .guild-invitation { padding-top: 0; }
  .community-hero { grid-template-columns: 1fr; padding-block: 3rem; }
  .community-intro h1 { max-width: 15ch; font-size: clamp(2.7rem, 9vw, 3.7rem); }
  .community-guild { margin-top: .5rem; }
  .community-emblem { margin-top: 0; margin-bottom: 1rem; }
  .community-emblem svg { width: 120px; }
  .guild-chat-heading { gap: .35rem .65rem; padding: .8rem; }
  .guild-chat-name { font-size: .76rem; }
  .guild-message { font-size: .95rem; }
  .guild-chat-status { font-size: .68rem; }
  .guild-messages { padding-inline: .85rem; }
  .guild-chat-footer { padding-inline: .8rem; }
  .community-stats { grid-template-columns: 1fr; }
  .community-stat { padding: 1.4rem; }
  .community-stat + .community-stat { border-left: 0; border-top: 1px solid var(--line); }
  .community-stat dd { font-size: 2rem; margin-block: .4rem; }
  .community-stat p { max-width: none; }
  .community-freshness { flex-direction: column; gap: .4rem; }
  .community-conversation { grid-template-columns: 1fr; padding-block: 2.7rem 3rem; margin-top: 2rem; gap: 1.3rem; }
  .community-conversation-copy { padding-top: 0; }
}

.community-spotlight {
  margin-top: 1.6rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(14, 21, 45, 0.6);
  box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.7);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.community-spotlight:hover {
  border-color: var(--orange);
  background: rgba(14, 21, 45, 0.9);
}
.community-spotlight[data-tier="grade-a"] { border-color: #b9c9d5; }
.community-spotlight[data-tier="grade-s"] { border-color: #ffb454; }
.spotlight-kicker {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--amber);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.spotlight-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
}
.spotlight-card:hover {
  text-decoration: none;
}
.spotlight-title {
  margin: 0 0 0.2rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}
.spotlight-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.spotlight-arrow {
  flex-shrink: 0;
  color: var(--amber);
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}
.spotlight-card:hover .spotlight-arrow {
  transform: translate(2px, -2px);
}

