.gb-dialog {
  margin: auto;
  background: #121310;
  color: #f0e3c9;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color-scheme: dark;
}
.gb-dialog * { box-sizing: border-box; letter-spacing: 0; }
.gb-dialog [hidden] { display: none !important; }
.gb-dialog button { cursor: pointer; font: inherit; }
.gb-dialog button:focus-visible { outline: 2px solid #c5ae70; outline-offset: 3px; }
.gb-dialog svg, .gb-entry svg { width: 17px; height: 17px; flex: 0 0 auto; display: block; }
.gb-dialog [data-icon] { display: inline-flex; }
.gb-author-contact.author-contact { display: grid; grid-template-columns: auto 42px; column-gap: 14px; row-gap: 5px; bottom: 28px; }
.gb-author-contact > .author-link { grid-column: 1; grid-row: 2; justify-self: start; }
.gb-author-contact .author-seal { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.gb-entry {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  pointer-events: auto; color: #d4b779; border: 0; background: transparent;
  font: 13px/1.2 "Songti SC", "STSong", serif; cursor: pointer;
  min-height: 30px; padding: 3px 0; border-radius: 3px;
  transition: color 180ms ease, opacity 320ms ease;
}
body.ink-intro-pending .gb-entry,
body.ink-intro-active .gb-entry { opacity: 0; visibility: hidden; pointer-events: none; }
.gb-entry:hover { color: #ffe6a6; }
.gb-entry:focus-visible { outline: 1px solid #d4b779; outline-offset: 4px; }
.gb-desktop-entry { grid-column: 1; grid-row: 1; justify-self: start; }
.gb-mobile-entry { display: none; }
.gb-dialog {
  position: fixed; padding: 30px; width: min(476px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px); overflow-y: auto; border-radius: 5px;
  color: #eee1c7; border: 1px solid #827044;
  background: linear-gradient(110deg, #101412ee, #181712f5), url("../assets/ui/lacquer-silk-texture-v1.webp") center / 700px;
  box-shadow: inset 0 0 0 5px #121410, inset 0 0 0 6px #71603869, 0 24px 90px #000a;
}
.gb-dialog::before, .gb-dialog::after {
  position: absolute; width: 48px; height: 48px; pointer-events: none; opacity: .64;
  background: url("../assets/ui/bronze-corner-ornament-v1.webp") center / contain no-repeat; content: "";
}
.gb-dialog::before { top: 7px; left: 7px; }
.gb-dialog::after { bottom: 7px; right: 7px; transform: rotate(180deg); }
.gb-dialog::backdrop { background: #080a09a6; backdrop-filter: blur(3px); }
.gb-icon-button { display: grid; place-items: center; padding: 0; border: 1px solid #9b824d8a; border-radius: 50%; color: #d5bc85; background: #1e211b; }
.gb-close { position: absolute; top: 17px; right: 17px; width: 30px; height: 30px; }
.gb-close:hover { background: #34382c; }
.gb-heading { display: flex; gap: 13px; align-items: center; padding-bottom: 23px; }
.gb-seal { width: 39px; height: 45px; object-fit: contain; opacity: .85; }
.gb-kicker { margin: 0 0 6px; color: #b8a37d; font-size: 11px; line-height: 1.5; }
.gb-heading h2 { margin: 0; font: 600 25px/1.3 "Songti SC", "STSong", serif; }
.gb-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.gb-dialog label { font-size: 13px; color: #dccba8; }
.gb-private { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #b7bca7; }
.gb-private svg { width: 12px; height: 12px; }
.gb-textarea-wrap { position: relative; }
.gb-dialog textarea, .gb-dialog input {
  width: 100%; border: 1px solid #71634577; border-radius: 3px;
  background: #05090861; color: #f2e8d3; font: 13px/1.7 "PingFang SC", sans-serif;
  outline: 0; user-select: text; -webkit-user-select: text;
}
.gb-dialog textarea { display: block; min-height: 156px; max-height: 240px; resize: vertical; padding: 13px 14px 29px; }
.gb-dialog input { height: 40px; padding: 8px 11px; }
.gb-dialog textarea:focus, .gb-dialog input:focus { border-color: #baa369; box-shadow: 0 0 0 2px #c9ac5820; }
.gb-dialog textarea::placeholder, .gb-dialog input::placeholder { color: #918b78; }
.gb-count { position: absolute; right: 12px; bottom: 8px; color: #99917b; font-size: 10px; font-variant-numeric: tabular-nums; }
.gb-fields { display: grid; grid-template-columns: .8fr 1.2fr; gap: 14px; margin-top: 18px; }
.gb-fields label { display: block; margin-bottom: 8px; }
.gb-fields label span { color: #8e8979; font-size: 10px; margin-left: 3px; }
.gb-error { min-height: 18px; margin: 7px 0 4px; color: #e2a394; font-size: 12px; }
.gb-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid #80704a44; }
.gb-demo-note { color: #9b988b; font-size: 10px; }
.gb-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 19px; font-size: 13px !important; white-space: nowrap;
  border-radius: 4px; border: 1px solid #b39653; color: #f9e8b9;
  background: linear-gradient(#8c713b33, #493a1a33), url("../assets/ui/lacquer-silk-texture-v1.webp") center / 440px;
  box-shadow: inset 0 0 0 2px #171710b3, inset 0 0 0 3px #bba36630;
}
.gb-submit:hover { border-color: #f1d18a; background-color: #67542855; }
.gb-submit:disabled { opacity: .5; cursor: wait; }
.gb-success { text-align: center; padding: 26px 4px 18px; }
.gb-success-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 23px; border: 1px solid #a99463; border-radius: 50%; color: #d6c59b; background: #606b4826; box-shadow: inset 0 0 0 5px #1c2016; }
.gb-success-icon svg { width: 26px; height: 26px; }
.gb-success h2 { font: 600 24px/1.5 "Songti SC", serif; margin: 10px 0; }
.gb-success > p:not(.gb-kicker) { font-size: 12px; color: #b6af9c; line-height: 1.7; margin: 10px 0 28px; }
@media (max-width: 900px) {
  .gb-author-contact.author-contact { display: none; }
  .gb-mobile-entry { display: flex; position: fixed; top: 83px; right: 13px; z-index: 21; min-height: 36px; padding: 5px 12px; border: 1px solid #9b814e99; border-radius: 4px; background: #151812ed; box-shadow: inset 0 0 0 2px #57472b33, 0 3px 12px #0006; }
  body.panel-open .gb-mobile-entry, body.quest-open .gb-mobile-entry { display: none; }
}
@media (max-width: 500px) {
  .gb-dialog { padding: 27px 22px 24px; }
  .gb-heading { padding-bottom: 21px; }
  .gb-heading h2 { font-size: 23px; }
  .gb-heading .gb-kicker { font-size: 10px; }
  .gb-seal { width: 33px; height: 41px; }
  .gb-fields { gap: 10px; grid-template-columns: .85fr 1.15fr; }
  .gb-dialog textarea { min-height: 150px; }
  .gb-fields label { font-size: 12px; }
  .gb-dialog input { font-size: 12px; min-width: 0; }
  .gb-demo-note { font-size: 10px; }
  .gb-submit { padding: 0 14px; }
}
.gb-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.gb-dialog h2, .gb-dialog p { letter-spacing: 0; }
.gb-dialog button { min-width: 0; }
.gb-entry [data-icon] { display: inline-flex; }
