/* Class-up quest (owner 2026-11-14, CBT): golden, eye-catching window and an on-screen button while the quest runs */
#cq-btn { position: fixed; z-index: 60; pointer-events: auto; right: calc(10px + var(--safe-r, 0px)); top: calc(268px + var(--safe-t, 0px)); max-width: min(270px, 60vw);
  display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 9px; border: 2px solid #e2b54a; border-radius: 14px; text-align: left;
  background: linear-gradient(135deg, #fff8dc 0%, #ffe9a3 55%, #ffd66b 100%); color: #5a3a0a; font: 600 13px/1.25 KanitArc, sans-serif;
  box-shadow: 0 0 0 3px #fff3c455, 0 4px 14px #c9921f66; animation: cq-glow 1.8s ease-in-out infinite; cursor: pointer; }
#cq-btn[hidden] { display: none; }
#cq-btn .cq-b-ic { font-size: 22px; filter: drop-shadow(0 0 4px #fff7); }
#cq-btn .cq-b-tx { display: flex; flex-direction: column; min-width: 0; }
#cq-btn small { font-weight: 500; font-size: 11px; color: #7a5212; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes cq-glow { 0%, 100% { box-shadow: 0 0 0 3px #fff3c455, 0 4px 14px #c9921f66; } 50% { box-shadow: 0 0 0 5px #ffe48a88, 0 4px 22px #e8a92acc; } }
.cq-overlay { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: #2a1a0688; padding: 12px; }
.cq-win { width: min(560px, 100%); max-height: min(86dvh, 760px); display: flex; flex-direction: column; border-radius: 18px; overflow: hidden;
  border: 3px solid #e2b54a; background: linear-gradient(180deg, #fffaf0 0%, #fff4d6 100%); color: #4a3222;
  box-shadow: 0 0 0 4px #fff3c4aa, 0 0 40px #ffd25a99, 0 12px 30px #0006; animation: cq-pop .35s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes cq-pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.cq-win header { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: linear-gradient(135deg, #ffe08a, #f5b93a); color: #4a2a00; }
.cq-win header .cq-crest { font-size: 24px; }
.cq-win header b { flex: 1; font: 700 16px/1.3 KanitArc, sans-serif; }
.cq-win .cq-x { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #fff8; font-size: 20px; line-height: 1; }
.cq-body { padding: 12px 14px; overflow-y: auto; overscroll-behavior: contain; }
.cq-intro { margin: 0 0 10px; padding: 8px 10px; border-left: 4px solid #e2b54a; background: #fff8e2; border-radius: 8px; font-style: italic; }
.cq-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cq-steps li { display: flex; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid #ecd9b6; background: #fffdf6; }
.cq-steps li.now { border: 2px solid #e2b54a; background: #fff6d4; box-shadow: 0 0 10px #f5c84a55; }
.cq-steps li.done { opacity: .72; }
.cq-steps li.next { opacity: .55; }
.cq-dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #f3e3c3; font-weight: 700; font-size: 13px; }
.cq-steps li.now .cq-dot { background: #f5b93a; color: #fff; } .cq-steps li.done .cq-dot { background: #6cc49a; color: #fff; }
.cq-say { margin: 4px 0 0; font-size: 13px; color: #6a4a2a; }
.cq-prog { height: 8px; margin: 5px 0 2px; border-radius: 99px; background: #f0e2c4; overflow: hidden; }
.cq-prog span { display: block; height: 100%; background: linear-gradient(90deg, #f5c84a, #e8a92a); }
.cq-choose { margin-top: 10px; padding: 10px; border-radius: 12px; border: 2px dashed #e2b54a; background: #fffaf0; }
.cq-choose h4 { margin: 0 0 6px; }
.cq-opt { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid #f0e2c4; }
.cq-opt > div { flex: 1; min-width: 0; display: flex; flex-direction: column; } .cq-opt small { color: #8a6a4a; }
.cq-win footer { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid #ecd9b6; background: #fff8e8; }
.cq-win footer .cq-nav { background: linear-gradient(135deg, #f5c84a, #e8a92a); border-color: #c9921f; color: #4a2a00; }
.cq-win footer [hidden] { display: none; }
@media (max-width: 560px) { #cq-btn { top: calc(158px + var(--safe-t, 0px)); max-width: 62vw; padding: 5px 9px 5px 7px; } .cq-win header b { font-size: 14px; } }
/* in-game yes/no box (Client/js/confirm-ui.js): above the class-up window */
.ask-overlay { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; background: #1a10046e; padding: 16px; }
.ask-box { width: min(340px, 100%); background: #fffaf0; border: 2px solid #e8b94a; border-radius: 14px; padding: 16px; box-shadow: 0 10px 30px #0005; color: #4a3417; }
.ask-box p { margin: 0 0 14px; font-weight: 600; line-height: 1.45; text-align: center; }
.ask-btns { display: flex; gap: 10px; justify-content: center; }
.ask-btns .btn { min-width: 110px; min-height: 40px; }
/* castle war timer (owner 2026-11-14): on a phone it sat on top of the name / HP card - one line, below the top bar */
@media (max-width: 600px) { #siege-banner { top: calc(278px + var(--safe-t, 0px)); left: auto; right: calc(8px + var(--safe-r, 0px)); transform: none; white-space: nowrap; font-size: 11px; padding: 3px 10px; z-index: 5; } }
/* owner 2026-11-16: one-time notice (Client/js/confirm-ui.js showNotice) */
.once-box { width: min(420px, 100%); }
.once-box h3 { margin: 0 0 10px; text-align: center; font-size: 16px; color: #7a4a10; }
.once-box p { text-align: left; font-weight: 500; max-height: 62vh; overflow-y: auto; } /* owner 2026-11-19: the long developer letter scrolls on small phones */
