.support-dialog { box-sizing:border-box; width:min(740px,calc(100vw - 24px)); max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)); margin:auto; padding:0; border:1px solid #e6ddc9; border-radius:20px; background:#fff8e8; color:#53576c; font:14px/1.65 KanitArc,sans-serif; box-shadow:0 18px 60px #302a4533; overflow:auto; overscroll-behavior:contain; }
.support-dialog::backdrop { background:#282c4259; }
.support-dialog > header { position:sticky; top:0; z-index:1; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 18px; border-bottom:1px solid #e6ddc9; background:#fff8e8; }
.support-dialog h2 { margin:0; font-size:19px; font-weight:500; }
.support-close { flex:none; min-width:44px; height:44px; padding:0; border:0; border-radius:50%; background:#f2ead8; color:#53576c; font-size:26px; cursor:pointer; }
.support-body { display:grid; grid-template-columns:minmax(220px,1fr) minmax(0,1fr); align-items:start; gap:24px; padding:22px; }
.support-code { min-width:0; padding:10px; border-radius:16px; background:white; text-align:center; border:1px solid #e6ddc9; }
.support-method { display:block; margin:0 0 4px; color:#24767a; font-weight:500; font-size:16px; }
.support-code img { display:block; width:100%; height:auto; aspect-ratio:1; object-fit:contain; }
.support-code p { margin:4px 0 6px; font-size:13px; color:#537e70; }
.support-copy h3 { margin:0 0 10px; color:#287c77; font-size:19px; font-weight:500; }
.support-copy p { margin:0 0 14px; }
.support-copy dl { margin:16px 0; padding:10px 14px; border-radius:12px; background:#f0f2e3; }
.support-copy dt { color:#777c89; font-size:12px; }
.support-copy dd { margin:0; font-size:17px; overflow-wrap:anywhere; }
.support-copy .support-check,.support-copy .support-note { font-size:12px; }
.support-copy .support-help { margin-top:12px; color:#747987; font-size:12px; }
.support-actions { display:flex; flex-wrap:wrap; gap:8px; }
.support-actions a { box-sizing:border-box; display:inline-flex; justify-content:center; align-items:center; min-height:44px; padding:8px 14px; text-decoration:none; border-radius:12px; font:inherit; }
.support-save { background:#40bfb7; color:#153f40; }
.support-open { border:1px solid #d9d2c2; color:#53576c; background:#fffcf3; }
.support-login { margin:4px auto 0; min-height:44px; padding:8px 16px; border:1px solid #dce4d4; border-radius:12px; background:#fff8e8e8; color:#357d74; font:inherit; cursor:pointer; }
.support-login svg { width:18px; height:18px; margin-right:7px; vertical-align:middle; }
#btn-support svg { width:25px; height:25px; color:#ce777f; flex:none; }
#btn-support { color:#53576c; }
html[data-ui="mobile"] #hud-topright .top-row #btn-support {
 width:44px; height:44px; min-width:44px; min-height:44px; border-radius:12px;
}
html[data-ui="mobile"][data-orient="landscape"] #hud-topright .world-summary {
 right:calc(293px + var(--safe-r));
 max-width:max(0px, calc((100vw - 433px - var(--safe-l) - var(--safe-r)) / .6));
}
html[data-ui="mobile"][data-orient="portrait"] #hud-topright .top-row { align-items:flex-end; }
@media(max-width:600px) and (min-height:501px) {
 .support-body { grid-template-columns:1fr; gap:16px; padding:16px; }
 .support-code { width:min(250px,100%); box-sizing:border-box; justify-self:center; }
 .support-copy h3 { font-size:18px; }
}
@media(max-height:500px) {
 .support-dialog > header { padding:6px 12px; }
 .support-body { grid-template-columns:minmax(150px,200px) minmax(0,1fr); gap:16px; padding:12px; }
 .support-copy h3 { font-size:17px; }
}
@media(max-width:350px) { .support-body { grid-template-columns:1fr; } }
/* owner 2026-11-12: community buttons (LINE OpenChat now, Discord later) */
.support-community { margin:0 22px 22px; padding:14px 16px; border-radius:16px; background:#f0f2e3; }
.support-community h3 { margin:0 0 10px; color:#287c77; font-size:16px; font-weight:500; }
.support-community-row { display:flex; flex-wrap:wrap; gap:10px; }
.support-line,.support-discord,.support-fb { flex:1 1 180px; display:inline-flex; align-items:center; gap:10px; min-height:52px; padding:8px 14px; border-radius:14px; border:1px solid #d9d2c2; background:#fffcf3; color:#3f4456; font:inherit; font-size:15px; text-decoration:none; cursor:pointer; }
.support-line { border-color:#9fdcb5; background:#eafaf0; }
.support-line svg,.support-discord svg,.support-fb svg,.support-line-card h3 svg { width:32px; height:32px; flex:none; }
.support-discord[disabled] { cursor:default; opacity:.6; filter:grayscale(.5); }
.support-discord small { display:block; font-size:11px; color:#8a8f9c; line-height:1.2; }
.support-line-pop { position:fixed; inset:0; z-index:5; display:flex; align-items:center; justify-content:center; padding:16px; background:#282c4266; }
.support-line-pop[hidden] { display:none; }
.support-line-card { position:relative; box-sizing:border-box; width:min(360px,100%); max-height:100%; overflow:auto; padding:16px 18px 18px; border-radius:20px; background:#fff8e8; text-align:center; box-shadow:0 18px 60px #302a4544; }
.support-line-card h3 { display:flex; align-items:center; justify-content:center; gap:8px; margin:4px 40px 10px; color:#2b7a4b; font-size:17px; font-weight:500; }
.support-line-card img { display:block; width:min(260px,100%); height:auto; aspect-ratio:1; margin:0 auto; border-radius:12px; background:#fff; }
.support-line-card p { margin:10px 0; font-size:13px; }
.support-line-close { position:absolute; top:10px; right:10px; }
.support-line-open { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:8px 20px; border-radius:12px; background:#06c755; color:#fff; text-decoration:none; font-size:15px; }
@media(max-width:600px) { .support-community { margin:0 16px 16px; } }
/* owner 2026-11-12 (iPad): LINE / Discord must be visible without scrolling. The community block now sits in the right
   column under the transfer text, the QR column is narrower, and on one-column screens it moves to the top. */
.support-body { grid-template-columns:minmax(200px,250px) minmax(0,1fr); grid-template-areas:"code copy" "code community"; gap:10px 22px; padding:16px 20px; }
.support-code { grid-area:code; }
.support-copy { grid-area:copy; }
.support-copy h3 { margin-bottom:6px; }
.support-copy p { margin-bottom:8px; }
.support-copy dl { margin:10px 0; padding:8px 12px; }
.support-copy .support-help { margin:8px 0 0; }
.support-community { grid-area:community; margin:0; padding:10px 12px; }
.support-community h3 { margin:0 0 8px; font-size:14px; }
.support-community-row { gap:8px; }
.support-line,.support-discord { flex:1 1 140px; min-height:44px; padding:6px 10px; font-size:14px; gap:8px; }
.support-line svg,.support-discord svg { width:28px; height:28px; }
@media(max-width:600px) and (min-height:501px) {
 .support-body { grid-template-columns:1fr; grid-template-areas:"community" "code" "copy"; padding:12px 14px; }
}
@media(max-height:500px) {
 .support-body { grid-template-columns:minmax(150px,190px) minmax(0,1fr); grid-template-areas:"code community" "code copy"; }
}
@media(max-width:350px) { .support-body { grid-template-columns:1fr; grid-template-areas:"community" "code" "copy"; } }
/* owner 2026-11-13: the support (heart) button glows softly and the heart gives a small beat, to draw the eye a little */
@keyframes support-glow { 0%,55%,100% { box-shadow:0 0 0 0 #ee8f9900, 0 0 0 0 #f7a9b200; } 22% { box-shadow:0 0 0 3px #ee8f99aa, 0 0 16px 6px #f7a9b2cc; background:#fff1f2; } }
@keyframes support-beat { 0%,40%,100% { transform:scale(1); } 12% { transform:scale(1.16); } 24% { transform:scale(1.04); } 32% { transform:scale(1.12); } }
@media (prefers-reduced-motion:no-preference) {
 #btn-support { animation:support-glow 2.6s ease-in-out infinite; }
 #btn-support svg { animation:support-beat 2.6s ease-in-out infinite; transform-origin:50% 55%; }
}
@media (prefers-reduced-motion:reduce) { #btn-support { box-shadow:0 0 0 2px #f2a3ab55, 0 0 8px 2px #f6b9bf77; } }
/* owner 2026-11-14: "What's new" patch notes (Client/js/patchnotes.js), same paper dialog as support */
.patch-dialog { width:min(560px,calc(100vw - 24px)); }
.patch-body { padding:18px 22px 22px; }
.patch-devnote { margin:0 0 16px; padding:10px 12px; border-radius:10px; background:#fbf1dc; border:1px solid #ecd9b0; color:#6b5a3a; font-size:13px; line-height:1.55; }
.patch-entry h3 { margin:0 0 8px; color:#287c77; font-size:18px; font-weight:500; }
.patch-date { margin:0 0 2px; color:#8a8f9c; font-size:12px; }
.patch-entry ul { margin:0; padding-left:20px; }
.patch-entry li { margin:5px 0; }
.patch-entry ul + h3 { margin-top:14px; } /* owner 2026-11-19: same-day uploads share one date block */
.patch-older { margin-top:18px; border-top:1px solid #e6ddc9; padding-top:12px; }
.patch-older summary { cursor:pointer; color:#53576c; min-height:44px; display:flex; align-items:center; }
.patch-older .patch-entry { margin-top:12px; }
.patch-login { margin-top:8px; }
#btn-patch svg { width:25px; height:25px; color:#3f8f86; flex:none; }
#btn-patch { color:#53576c; position:relative; }
[data-patchnotes].patch-new { position:relative; }
[data-patchnotes].patch-new::after { content:''; position:absolute; top:5px; right:5px; width:9px; height:9px; border-radius:50%; background:#e0564a; box-shadow:0 0 0 2px #fff8e8; }

.support-fb { border-color:#b9cdf3; background:#eef4ff; } /* owner 2026-11-15: Facebook page */
.pc-download { display:block; width:max-content; text-decoration:none; } /* owner 2026-11-17 */
.pc-download[hidden], html[data-ui="mobile"] .pc-download { display:none; } /* phones cannot run the Windows installer */
