/* Guild page and chat, laid out after forge-clone-2's (blue / red buttons, green checks and grade),
   coloured with this game's navy panels. */

/* ---------- guild ---------- */
#app.sheet.tall #panel { height: min(calc(var(--game-height) * .68), 600px); }
#app.sheet.tall #toasts { bottom: auto; top: 64px; }
.gbtn {
  border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 10px; padding: 6px 12px;
  background: linear-gradient(#4a5878, #2c3550); font-size: 13px; white-space: nowrap;
}
.gbtn:active:not(:disabled) { border-bottom-width: 2px; transform: translateY(2px); }
.gbtn:disabled { filter: grayscale(.7) brightness(.7); }
.gbtn.blue { background: linear-gradient(#8093f1, #6c82ee); }
.gbtn.red { background: linear-gradient(#d0607a, #c34c68); }
.gbtn.gray { background: linear-gradient(#5a6478, #3a4258); }
.gbtn.wide { display: block; width: 100%; margin-top: 8px; padding: 9px; font-size: 15px; }
.gbtn.gico { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; background: linear-gradient(#5a5070, #3d3550); }
.gbtn.gico .gi { width: 24px; height: 24px; }
.ghelp { flex: 0 0 auto; width: 30px; height: 30px; padding: 0; border-radius: 50%; font-size: 16px; background: linear-gradient(#5a5070, #3d3550); }
.gi { width: 16px; height: 16px; vertical-align: -3px; }
.gband { display: flex; align-items: center; gap: 8px; padding: 8px; margin: 0 -2px 6px; border-radius: 12px; border: 2px solid var(--line); background: linear-gradient(#24477c, #1a3460); }
.gsearch input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border-radius: 10px; border: 2px solid var(--line); background: #0c1e3e; color: #fff; font: inherit; font-size: 14px; }
.gsearch input::placeholder { color: #7f93b8; }
.gcool { margin: 0 2px 6px; font-size: 12px; color: #ffb27a; }
.glist, .gmembers { display: flex; flex-direction: column; gap: 6px; }
.gcard, .gmem {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px;
  border: 2px solid var(--line); border-bottom: 4px solid #3a5a8c; background: linear-gradient(var(--card2), var(--card));
}
.gcard { cursor: pointer; min-height: 64px; }
.gemb { width: 40px; height: 45px; flex: 0 0 auto; object-fit: contain; }
.gemb.big { width: 60px; height: 68px; }
.gemb.huge { width: 82px; height: 92px; }
.gemb.sm { width: 30px; height: 34px; }
.ginfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; text-align: left; }
.ginfo > b { font-weight: normal; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ginfo .gname { font-size: 17px; }
.gtier { font-size: 12px; color: #9fe77f; }
.gstats, .glead { display: flex; align-items: center; gap: 3px; font-size: 12px; color: #dfe6f8; }
.gstats .gi:not(:first-child) { margin-left: 8px; }
.gfull { color: #ff7a8a; font-size: 13px; }
.gapplied { color: var(--muted); font-size: 13px; }
.gempty, .muted { color: var(--muted); font-size: 13px; text-align: center; padding: 10px 0; }
.gnotice .muted { padding: 0; text-align: left; }
.gfoot { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 4px; }
.gcreate { flex: 1; max-width: 220px; padding: 10px; font-size: 16px; }
.gsum { position: relative; padding-right: 76px; }
.gsum .gset { position: absolute; right: 40px; top: 8px; }
.gsum .ghelp { position: absolute; right: 6px; top: 10px; }
.gnotice { margin: 0 0 6px; border-radius: 12px; border: 2px solid var(--line); background: #0c1e3e; overflow: hidden; }
.gnt { padding: 4px 10px; font-size: 13px; color: #fff3b0; background: rgba(255, 255, 255, .06); }
.gnb { max-height: 72px; overflow-y: auto; padding: 6px 10px; font-size: 13px; line-height: 1.4; color: #e4ebfa; text-align: left; }
.gcap { margin: 8px 2px 4px; font-size: 13px; color: #fff3b0; text-align: left; }
.gmem.me { border-bottom-color: #c9a640; }
.gmem.solo { margin: 4px 0 6px; }
.gavb { padding: 0; border: 0; background: none; flex: 0 0 auto; }
.gav { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--line); border-bottom-width: 3px; background: #2a3550; overflow: hidden; display: block; }
.gav canvas { width: 100%; height: 100%; display: block; }
.gav.big { width: 64px; height: 64px; }
.gnm { display: flex; align-items: center; gap: 4px; min-width: 0; }
.gnm b { font-weight: normal; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gsex { flex: 0 0 auto; width: 16px; height: 16px; border-radius: 5px; font-size: 11px; line-height: 16px; text-align: center; color: #fff; }
.gsex.s1 { background: #6c82ee; }
.gsex.s2 { background: #f07fbe; }
.gpw { font-size: 12px; color: #dfe6f8; }
.grole { font-size: 12px; color: #9fe77f; }
.gtabs { position: sticky; bottom: -10px; display: flex; gap: 6px; margin: 10px -8px -10px; padding: 8px; background: linear-gradient(#1a3460, #10264a); border-top: 2px solid var(--line); }
.gtabs button { flex: 1; position: relative; padding: 8px 0; border-radius: 10px; border: 2px solid var(--line); background: #2c3550; font-size: 14px; }
.gtabs button.on { background: linear-gradient(#8093f1, #6c82ee); }
.gtabs button.lock { color: #8a93a8; background: #222a3c; }
.glock { width: 14px; height: 14px; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); opacity: .8; }
.gback { padding: 9px 30px; font-size: 15px; }

/* guild modals */
.mbox.gmodal { max-width: 360px; text-align: left; }
.gplaque {
  margin: -4px -4px 10px; height: 46px; display: grid; place-items: center; font-size: 19px; color: #fff9ee;
  border-style: solid; border-color: transparent; border-width: 0 32px;
  border-image: var(--gplaque) 0 128 fill / 0 32px stretch;
  background: var(--gplaque-bg, none);
  text-shadow: var(--stroke);
}
.gconf { text-align: center; font-size: 15px !important; margin: 14px 0 !important; }
.gmodal .mrow { display: flex; gap: 8px; margin-top: 10px; }
.gmodal .mrow .gbtn { flex: 1; padding: 9px; font-size: 15px; }
.gcemb { text-align: center; }
.gembbtn { position: relative; padding: 0; border: 0; background: none; }
.gpen { position: absolute; right: -6px; bottom: 2px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; border: 2px solid var(--line); background: linear-gradient(#8093f1, #6c82ee); }
.gfield { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 14px; }
.gfield span { flex: 0 0 34px; color: #fff3b0; }
.gfield input, .gmodal textarea, .grolerow select {
  flex: 1; min-width: 0; height: 36px; padding: 0 10px; border-radius: 10px; border: 2px solid var(--line);
  background: #0c1e3e; color: #fff; font: inherit; font-size: 14px;
}
.gmodal textarea { width: 100%; height: auto; padding: 8px 10px; resize: none; line-height: 1.4; }
.gjoinset { margin: 6px 0; }
.gradio { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; padding: 4px 6px; border: 0; background: none; font-size: 14px; }
.gradio i { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); background: #0c1e3e; display: grid; place-items: center; }
.gchk { width: 18px; height: 18px; }
.gsmall { font-size: 12px !important; color: var(--muted); margin: 2px 0 !important; text-align: center; }
.gsubmit { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; padding: 10px; font-size: 17px; }
.gcost { display: inline-flex; align-items: center; gap: 2px; font-size: 15px; color: #fff3b0; }
.gcost .ci { width: 18px; height: 18px; }
.gepv { text-align: center; }
.gscroll { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.gpick { position: relative; flex: 0 0 auto; padding: 4px; border-radius: 10px; border: 2px solid var(--line); background: #0c1e3e; }
.gpick.on { border-color: var(--gold); }
.gpick.sym img { width: 40px; height: 40px; display: block; }
.gpick .gchk.mid { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); width: 20px; height: 20px; }
.gpick .gchk.corner { position: absolute; right: -4px; top: -4px; width: 16px; height: 16px; }
.gswatches { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 4px 0; }
.gsw { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 3px solid var(--line); }
.gsw.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.grolerow { display: flex; gap: 8px; }
.ginfobody { max-height: calc(var(--game-height) * .52); overflow-y: auto; font-size: 13px; }
.ginfobody p { margin: 2px 0 !important; font-size: 13px !important; line-height: 1.45 !important; }
.ginfobody .gih { margin-top: 10px !important; color: #fff3b0; font-size: 14px !important; }
.gprof { display: flex; align-items: center; gap: 10px; }
.gprow { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; padding: 6px 8px; border-radius: 10px; background: #0c1e3e; font-size: 14px; }
.gprow b { font-weight: normal; }
.gprow.muted { justify-content: center; }

/* ---------- chat ---------- */
#chatbar {
  flex: 0 0 auto; width: 100%; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px;
  border: 0; border-bottom: 2px solid var(--line); background: linear-gradient(#2a4370, #1c3158); text-align: left;
}
#chatbar .cicon { position: relative; flex: 0 0 auto; width: 28px; height: 28px; }
#chatbar .cicon img { width: 28px; height: 28px; }
.cbadge { position: absolute; right: -6px; top: -4px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: #c34c68; border: 2px solid var(--line); font-size: 10px; font-weight: normal; line-height: 12px; text-align: center; }
.cbadge[hidden] { display: none; }
.cprev { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 11px; line-height: 1.3; color: #dfe6f8; }
.cprev span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#chat { position: absolute; inset: 0; z-index: 15; display: flex; flex-direction: column; background: #10203e; }
#chat[hidden] { display: none; }
.ctabs { flex: 0 0 auto; display: flex; gap: 8px; padding: 8px; padding-top: max(8px, env(safe-area-inset-top)); background: linear-gradient(#24477c, #1a3460); border-bottom: 2px solid var(--line); }
.ctabs button { position: relative; width: 29%; max-width: 120px; padding: 7px 0; border-radius: 10px; border: 2px solid var(--line); border-bottom-width: 4px; background: #2c3550; font-size: 15px; }
.ctabs button.on { background: linear-gradient(#8093f1, #6c82ee); }
.ctabs button.lock { color: #8a93a8; }
.ctabs .clock { display: none; width: 14px; height: 14px; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.ctabs button.lock .clock { display: block; }
#clist { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.cmsg { display: flex; gap: 8px; align-items: flex-start; }
.cav { flex: 0 0 auto; padding: 0; border: 0; background: none; }
.cav .gav { width: 38px; height: 38px; border-radius: 10px; }
.cbody { flex: 1; min-width: 0; }
.chead { display: flex; align-items: baseline; gap: 4px; font-size: 12px; }
.chead b { font-weight: normal; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ctag { color: #bdb7d2; }
.chead time { margin-left: auto; color: #8fa2c6; font-size: 11px; flex: 0 0 auto; }
.cbub { display: inline-block; max-width: 100%; margin-top: 2px; padding: 6px 10px; border-radius: 4px 14px 14px 14px; background: #1f3a66; border: 2px solid var(--line); font-size: 14px; line-height: 1.4; word-break: break-word; text-shadow: none; }
.cmsg.me .cbub { background: #2d4f86; }
.cmsg.sys .cbub { background: #4a2a36; color: #ffc6d2; }
.cdiv { display: flex; align-items: center; gap: 6px; color: #ff7a8a; font-size: 11px; }
.cdiv::before, .cdiv::after { content: ""; flex: 1; height: 2px; background: #c34c68; }
.cempty { margin: auto; color: var(--muted); font-size: 13px; text-align: center; }
#cstatus { flex: 0 0 auto; padding: 5px 10px; font-size: 12px; text-align: center; color: #ffd0a0; background: #2a2440; }
#cstatus[hidden] { display: none; }
#ccomp { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; padding: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); background: linear-gradient(#24477c, #1a3460); border-top: 2px solid #3a5a8c; }
.cback { flex: 0 0 auto; width: 38px; height: 38px; padding: 4px; border-radius: 10px; border: 2px solid var(--line); background: linear-gradient(#d0607a, #c34c68); }
.cback img { width: 100%; height: 100%; display: block; }
#cin { flex: 1; min-width: 0; height: 38px; padding: 0 10px; border-radius: 10px; border: 2px solid var(--line); background: #0c1e3e; color: #fff; font: inherit; font-size: 15px; }
#csend { flex: 0 0 auto; height: 38px; padding: 0 14px; border-radius: 10px; border: 2px solid var(--line); border-bottom-width: 4px; background: linear-gradient(#8093f1, #6c82ee); font-size: 15px; }
#csend:disabled { filter: grayscale(.7) brightness(.7); }
.cblocks { max-height: calc(var(--game-height) * .5); overflow-y: auto; }
.cbrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.cbrow b { font-weight: normal; }
