html, body { margin: 0; height: 100%; overflow: hidden; background: #1d5c45; font-family: "Yu Gothic UI", "Yu Gothic", "Meiryo", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif; }
#gameCanvas { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }

button { font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 6px; border: 1px solid #0006; background: #f2ead6; color: #222; cursor: pointer; }
button:hover { background: #fff; }
button.primary { background: #f2c230; font-weight: bold; }

.hud { position: fixed; top: 10px; right: 12px; z-index: 10; display: flex; gap: 6px; }

.seat { position: fixed; left: 10px; z-index: 5; width: min(220px, 17vw); min-width: 150px; box-sizing: border-box;
  padding: 8px 10px; border-radius: 8px; background: rgb(0 0 0 / 45%); color: #eef1f7; font-size: 13px; line-height: 1.5; pointer-events: none; }
.seat.top { top: 10px; }
.seat.bottom { bottom: 10px; }
.seat .name { font-weight: bold; }
.seat .score { font-size: 22px; font-weight: bold; color: #ffe08a; }
.seat .yaku { color: #9fe3ff; }
.seat .muted { color: #aab; }
.tag { display: inline-block; padding: 0 6px; margin-left: 4px; border-radius: 4px; background: #f2c230; color: #222; font-size: 11px; }
.tag.koi { background: #e0533a; color: #fff; }

.float { position: fixed; z-index: 5; transform: translate(-50%, -50%); pointer-events: none; white-space: nowrap;
  color: #fff; font-size: 15px; text-shadow: 0 1px 3px #000; }
#status { background: rgb(0 0 0 / 45%); padding: 6px 14px; border-radius: 20px; }
#deckCount { font-size: 12px; }

.dialog { position: fixed; z-index: 15; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 16px 22px; border-radius: 10px; background: #232733ee; color: #eef1f7; text-align: center; line-height: 1.6;
  box-shadow: 0 6px 30px #0008; min-width: 260px; }
.dialog[hidden] { display: none; }
.dialog .big { font-size: 20px; font-weight: bold; color: #ffe08a; }
.dialog .buttons { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }

.overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgb(0 0 0 / 55%); }
/* display: grid above beats the hidden attribute, so hide it explicitly */
.overlay[hidden] { display: none; }
.panel { max-width: 560px; max-height: 80vh; overflow-y: auto; padding: 20px 24px; border-radius: 10px;
  background: #232733; color: #eef1f7; line-height: 1.7; }
.panel h2 { margin-top: 0; }
.panel h3 { margin-bottom: 4px; }
.panel .muted { color: #aab; font-size: 13px; }
.panel .err { color: #ff8a7a; white-space: pre-wrap; }
.panel table { border-collapse: collapse; margin: 8px 0; }
.panel td { padding: 2px 12px 2px 0; }
.linkbox { display: flex; gap: 6px; margin: 8px 0; }
.linkbox input { flex: 1; font: inherit; font-size: 13px; padding: 4px 6px; }

#toast { position: fixed; z-index: 30; left: 50%; bottom: 20%; transform: translateX(-50%); padding: 8px 16px; border-radius: 20px;
  background: #000c; color: #fff; pointer-events: none; }
#toast[hidden] { display: none; }
