/* Desert Grognards - crew, room and sign-in styles. Uses the colours from styles.css. */

/* ---------- shared bits ---------- */
.dg-noscroll { overflow: hidden; }
.dg-toast {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 90; max-width: 92vw;
  padding: 10px 16px; border: 4px solid #111; font-weight: bold; box-shadow: 5px 5px 0 #111;
}
.dg-toast[hidden] { display: none; }
.dg-toast-ok { background: #dfe8cf; color: #1f2e12; }
.dg-toast-bad { background: #f3d4cf; color: #5a1a10; }
.dg-form-error { color: #8b1a10; font-weight: bold; min-height: 1.2em; font-size: .9rem; }
.dg-hint { font-size: .75rem; min-height: 1em; }
.dg-hint.ok { color: #2f5d12; } .dg-hint.bad { color: #8b1a10; }
.dg-field { display: block; margin-bottom: 12px; }
.dg-field input[type=text], .dg-field input[type=email], .dg-field input[type=password], .dg-field select, .dg-field textarea {
  width: 100%; padding: 8px; border: 2px solid #111; background: #fffdf5; font: inherit;
}
.dg-field input:focus-visible, button:focus-visible, a:focus-visible, canvas:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--rust); outline-offset: 2px; }

/* ---------- modal ---------- */
.dg-modal {
  position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.78);
  display: flex; align-items: flex-start; justify-content: center; padding: 16px; overflow-y: auto;
}
.dg-modal[hidden] { display: none; }
.dg-modal-panel { width: 100%; max-width: 460px; padding: 24px; margin: auto; transform: rotate(-.6deg); }
.dg-avatar-stage { display: flex; justify-content: center; }
.dg-avatar-canvas { width: 256px; height: 256px; max-width: 100%; cursor: grab; touch-action: none; background: #555; box-shadow: 3px 3px 10px rgba(0,0,0,.5); }
.dg-avatar-canvas:active { cursor: grabbing; }

/* ---------- crew grid ---------- */
.crew-grid { display: grid; gap: 28px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px)  { .crew-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .crew-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.crew-card { position: relative; display: block; text-align: left; transition: transform .15s; background: none; border: 0; padding: 0; font: inherit; color: inherit; }
.crew-card:nth-child(4n+1) { transform: rotate(-2deg); }
.crew-card:nth-child(4n+2) { transform: rotate(1.5deg); }
.crew-card:nth-child(4n+3) { transform: rotate(-1deg); }
.crew-card:nth-child(4n+4) { transform: rotate(2.5deg); }
.crew-card:hover { transform: rotate(0) scale(1.03); z-index: 5; }
.crew-card .polaroid { display: block; width: 100%; padding: 10px 10px 14px; background: #f4f1e1; border-color: #d1cbb8; }
.crew-card .crew-photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border: 1px solid #d1cbb8; display: block; background: #555; image-rendering: auto; }
.crew-card .crew-name { font-family: 'Comic Sans MS', 'Marker Felt', sans-serif; font-weight: bold; font-size: 1.05rem; line-height: 1.2; margin: 8px 0 2px; text-align: center; color: #111; }
.crew-card .crew-detail { font-size: .78rem; line-height: 1.3; text-align: center; color: #333; }
.crew-tape { position: absolute; top: -10px; left: 50%; width: 76px; height: 24px; margin-left: -38px; transform: rotate(-4deg); z-index: 3;
  background: #d8d4b8; border-top: 1px solid #a8a488; border-bottom: 1px solid #a8a488; box-shadow: 2px 2px 4px rgba(0,0,0,.4);
  border-left: 2px dotted #a8a488; border-right: 2px dotted #a8a488; opacity: .95; }
.crew-silhouette { width: 100%; aspect-ratio: 1 / 1; background: var(--sand); border: 1px solid #d1cbb8; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; overflow: hidden; }
.crew-silhouette svg { width: 78%; height: auto; display: block; }
.crew-silhouette span { font-size: .62rem; font-weight: bold; color: #3a3226; padding: 2px 0 6px; text-transform: uppercase; letter-spacing: 1px; }
.you-card .polaroid { border: 4px dashed var(--rust); background: #fff8e8; }
.you-card .crew-tape { background: #e8c9c0; border-color: var(--rust); color: var(--rust); font-weight: bold; font-size: .7rem; display: flex; align-items: center; justify-content: center; width: 110px; margin-left: -55px; }
.you-card .crew-name { color: var(--rust); font-family: Impact, 'Arial Narrow Bold', sans-serif; letter-spacing: 2px; text-transform: uppercase; font-size: 1.3rem; }
.you-card { cursor: pointer; text-decoration: none; }


/* ---------- your room ---------- */
.room-scroll { overflow-x: auto; border: 6px solid #111; background: #111; box-shadow: 8px 10px 15px rgba(0,0,0,.6); }
.room-svg { display: block; width: 100%; min-width: 760px; height: auto; }
.room-svg .clickable { cursor: pointer; }
.room-svg text { font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif; }
.room-svg .mono { font-family: 'Courier New', Courier, monospace; font-weight: bold; }
.room-panel .dg-field span.label { display: block; font-weight: bold; margin-bottom: 2px; }
.room-trophy-list li { padding: 2px 0; }

/* editor zoom slider fills the panel */
.dg-modal-panel input[type=range] { display: block; width: 100%; margin-top: 4px; }

.crew-loaderr { grid-column: 1 / -1; padding: 12px; border: 3px solid #8b3a2b; background: #f6e3d8; color: #5a1e12; font-weight: 700; }
