/* In-game bug report window (item 121, src/bug-report.js) in the paper/gold theme of the settings and report windows.
   Fits 390 px phones (stacked, preview at most 30vh) and phones in landscape (844×390: everything scrolls inside the
   window, at most 100dvh). Buttons are at least 44 px tall; no horizontal scroll. */
#game #bug-report-dialog,#bug-report-dialog{box-sizing:border-box;width:min(560px,calc(100vw - 24px));max-height:min(720px,calc(100dvh - 24px));margin:auto;padding:12px 14px;border:2px solid #c9a272;border-radius:14px;background:linear-gradient(#fff9ea,#f1dfbf);color:#584637;font:13px Tahoma,"Noto Sans Thai",sans-serif;box-shadow:0 12px 30px #2a1a0c88;overflow:hidden;display:none;flex-direction:column;gap:8px}
#game #bug-report-dialog[open],#bug-report-dialog[open]{display:flex}
#bug-report-dialog::backdrop{background:#0007}
#bug-report-dialog .bug-report-head{display:flex;align-items:center;gap:10px;min-width:0}
#bug-report-dialog .bug-report-heading{flex:1;min-width:0;margin:0;color:#3e342c;font-size:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#bug-report-dialog .bug-report-close{flex:none;width:40px;height:40px;min-height:0;padding:0;border:1px solid #c9a272;border-radius:50%;background:#fff3da;color:#6d573e;font:bold 22px/1 Tahoma,sans-serif;cursor:pointer}
#bug-report-dialog .bug-report-close:hover,#bug-report-dialog .bug-report-close:focus-visible{outline:0;background:#f2d397}
#bug-report-dialog .bug-report-tabs{display:flex;gap:6px;flex:none}
#bug-report-dialog .bug-report-tab{flex:1;min-height:44px;padding:6px 10px;border:1px solid #d6b98f;border-radius:10px;background:#fffaf0;color:#6d573e;font:bold 13px Tahoma,"Noto Sans Thai",sans-serif;cursor:pointer}
#bug-report-dialog .bug-report-tab.active{border-color:#4f7a3a;background:#e4efcf;color:#2f4a22;box-shadow:inset 0 0 0 1px #4f7a3a}
#bug-report-dialog .bug-report-tab:focus-visible{outline:2px solid #c9a272;outline-offset:1px}
#bug-report-dialog .bug-report-form,#bug-report-dialog .bug-report-mine{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:6px;padding:2px}
#bug-report-dialog .bug-report-form[hidden],#bug-report-dialog .bug-report-mine[hidden]{display:none}
#bug-report-dialog .bug-report-figure{margin:0;display:flex;flex-direction:column;align-items:center;gap:4px}
#bug-report-dialog .bug-report-shot{display:block;max-width:100%;max-height:min(220px,30vh);border:1px solid #c9a272;border-radius:10px;background:#3e342c;object-fit:contain}
#bug-report-dialog .bug-report-shot[hidden],#bug-report-dialog .bug-report-shot-note[hidden]{display:none}
#bug-report-dialog .bug-report-shot-note{margin:0;padding:8px 10px;border:1px dashed #d6b98f;border-radius:10px;background:#fff4e5;color:#7d6a56;font-size:12px;text-align:center;width:100%;box-sizing:border-box}
#bug-report-dialog .bug-report-label{margin:4px 0 0;color:#7c5b37;font-weight:700;font-size:13px}
#bug-report-dialog .bug-report-topics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
#bug-report-dialog .bug-report-topic{min-height:44px;padding:6px 8px;border:1px solid #d6b98f;border-radius:10px;background:#fffaf0;color:#584637;font:13px Tahoma,"Noto Sans Thai",sans-serif;text-align:left;cursor:pointer;overflow-wrap:anywhere}
#bug-report-dialog .bug-report-topic:hover,#bug-report-dialog .bug-report-topic:focus-visible{outline:0;border-color:#b98a4c;background:#fff1d3}
#game #bug-report-dialog .bug-report-topic.selected,#bug-report-dialog .bug-report-topic.selected{border-color:#4f7a3a;background:#dcebc4;color:#2f4a22;font-weight:700;box-shadow:inset 0 0 0 1px #4f7a3a}
#bug-report-dialog .bug-report-topic:disabled{opacity:.6;cursor:default}
#bug-report-dialog .bug-report-title,#bug-report-dialog .bug-report-text{box-sizing:border-box;width:100%;padding:8px;border:1px solid #d6b98f;border-radius:10px;background:#fffdf7;color:#3e342c;font:14px Tahoma,"Noto Sans Thai",sans-serif}
#bug-report-dialog .bug-report-title{min-height:44px}
#bug-report-dialog .bug-report-text{min-height:72px;resize:vertical}
#bug-report-dialog .bug-report-title:focus-visible,#bug-report-dialog .bug-report-text:focus-visible{outline:2px solid #c9a272;outline-offset:1px}
#bug-report-dialog .bug-report-count{align-self:flex-end;color:#93806b;font-size:12px}
#bug-report-dialog .bug-report-note{margin:2px 0;padding:6px 10px;border:1px dashed #d6b98f;border-radius:10px;background:#fff4e578;color:#7d6a56;font-size:12px}
#bug-report-dialog .bug-report-message{display:block;margin:0;padding:6px 10px;border-radius:10px;background:#fbe0d6;color:#8a2f17;font-weight:700}
#bug-report-dialog .bug-report-message[hidden]{display:none}
#bug-report-dialog .bug-report-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:4px;flex-wrap:wrap}
#bug-report-dialog .bug-report-actions button{min-height:44px;min-width:96px;padding:6px 14px;border-radius:10px;font:bold 14px Tahoma,"Noto Sans Thai",sans-serif;cursor:pointer}
#bug-report-dialog .bug-report-cancel{border:1px solid #c9a272;background:#fff3da;color:#6d573e}
#bug-report-dialog .bug-report-send{border:1px solid #3e6a2c;background:#4f7a3a;color:#fff}
#bug-report-dialog .bug-report-send:disabled{opacity:.7;cursor:progress}
#bug-report-dialog .bug-report-empty{margin:8px 0;color:#7d6a56;text-align:center}
#bug-report-dialog .bug-report-empty[hidden]{display:none}
#bug-report-dialog .bug-report-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
#bug-report-dialog .bug-report-row{display:flex;flex-direction:column;gap:3px;padding:8px 10px;border:1px solid #d6b98f;border-radius:10px;background:#fffaf0;min-width:0}
#bug-report-dialog .bug-report-row-top{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
#bug-report-dialog .bug-report-when{color:#93806b;font-size:12px}
#bug-report-dialog .bug-report-row-title{color:#3e342c;overflow-wrap:anywhere}
#bug-report-dialog .bug-report-row-topic{color:#7d6a56}
#bug-report-dialog .bug-report-status{padding:2px 8px;border-radius:999px;background:#efe3cc;color:#6d573e;font-size:12px;font-weight:700;white-space:nowrap}
#bug-report-dialog .bug-report-status[data-bug-status="new"]{background:#fde8c4;color:#8a5a12}
#bug-report-dialog .bug-report-status[data-bug-status="working"]{background:#d9e8f7;color:#264f7a}
#bug-report-dialog .bug-report-status[data-bug-status="fixed"]{background:#dcebc4;color:#2f4a22}
#bug-report-dialog .bug-report-status[data-bug-status="closed"]{background:#e7e1d8;color:#5d5348}
#bug-report-dialog .bug-report-replied{align-self:flex-start;min-height:44px;padding:4px 12px;border:1px solid #b98a4c;border-radius:10px;background:#fff1d3;color:#6d4a1c;font:bold 13px Tahoma,"Noto Sans Thai",sans-serif;cursor:pointer}
@media(max-width:600px){#game #bug-report-dialog,#bug-report-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:10px}#bug-report-dialog .bug-report-heading{font-size:16px}}
/* Phones in landscape: three topics a row, a smaller preview, everything scrolls inside the short window. */
@media(max-height:500px){#game #bug-report-dialog,#bug-report-dialog{max-height:calc(100dvh - 12px);padding:8px 10px;gap:4px}#bug-report-dialog .bug-report-topics{grid-template-columns:repeat(3,minmax(0,1fr))}#bug-report-dialog .bug-report-shot{max-height:30vh}#bug-report-dialog .bug-report-text{min-height:44px}#bug-report-dialog .bug-report-note{padding:4px 8px}}
@media(prefers-reduced-motion:reduce){#bug-report-dialog *{transition:none!important;animation:none!important}}
