/* Dark Mage of Mossfen — the sign-in and character screens on the game server (multiplayer step 5,
   src/ui/account.js). They stand on the choosing screen (#select, select.css) and reuse its cards. */

.acct { position: relative; display: grid; justify-items: center; gap: 14px; width: 100%; max-width: 1320px; }
.acct-card {
  display: grid; gap: 10px; width: min(100%, 380px); padding: 18px 20px;
  background: linear-gradient(rgba(24, 33, 27, 0.92), rgba(14, 20, 16, 0.94));
  border: 1px solid var(--edge); border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.06), 0 14px 34px rgba(0, 0, 0, 0.5);
}
.acct label { display: grid; gap: 5px; font: 500 13px/1 var(--f-display); letter-spacing: 0.08em; color: var(--ink-dim); text-align: left; }
.acct input {
  width: 100%; box-sizing: border-box; padding: 9px 10px; border-radius: 5px;
  font: 500 16px/1.2 var(--f-body); color: var(--ink); background: rgba(0, 0, 0, 0.38);
  border: 1px solid var(--edge); outline: none;
}
.acct input:focus { border-color: var(--edge-strong); box-shadow: 0 0 0 2px rgba(181, 154, 85, 0.25); }
.acct-rule { margin: 0; font-size: 13px; line-height: 1.4; color: var(--ink-faint); text-align: left; }
.acct-error { margin: 0; min-height: 0; font-size: 14px; line-height: 1.35; color: var(--danger); }
.acct-error:empty { display: none; }
.acct .pick-go:disabled { opacity: 0.55; cursor: default; }
.acct-wait, .acct-stopped p { margin: 0; font: 500 17px/1.4 var(--f-display); color: var(--ink-dim); text-align: center; }
.acct-stopped { justify-items: center; }

/* Log in / Create account */
.acct-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: -4px 0 4px; border-bottom: 1px solid var(--edge); }
.acct-tabs button {
  padding: 8px 4px 10px; border: 0; background: none; cursor: pointer;
  font: 700 15px/1 var(--f-display); letter-spacing: 0.06em; color: var(--ink-faint);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.acct-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--edge-strong); }
.acct-tabs button:hover { color: var(--ink-dim); }
.acct-sign .pick-go { justify-self: center; margin-top: 4px; }

/* the sign-in card (v1.04): the game's name in gold for a title, the four classes standing beside the card */
#select.is-signin .select-kicker { display: none; }
#select.is-signin h1 {
  padding: 0 0.1em 0.06em; font-size: clamp(38px, 6vw, 70px); letter-spacing: 0.035em;
  background: linear-gradient(#fff0bf 8%, #f3d68a 40%, #c99d45 78%, #9a7130); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.55)) drop-shadow(0 0 26px rgba(201, 157, 69, 0.28));
}
#select.is-signin .select-note { font-size: 16px; }
.acct-gate {
  display: grid; grid-template-columns: 1fr minmax(0, 380px) 1fr; align-items: end; gap: 10px; width: 100%;
}
.acct-gate .acct-sign { width: 100%; }
.acct-heroes { display: flex; align-items: flex-end; gap: 0; min-width: 0; }
.acct-heroes.is-left { justify-content: flex-end; }
.acct-heroes.is-right { justify-content: flex-start; }
.acct-hero {
  display: grid; justify-items: center; gap: 2px; width: clamp(130px, 13.5vw, 220px); margin: 0 -8px;
  background: radial-gradient(ellipse 44% 9% at 50% 84%, rgba(0, 0, 0, 0.6), transparent 70%),
              radial-gradient(ellipse 48% 42% at 50% 56%, color-mix(in srgb, var(--pick) 30%, transparent), transparent 72%);
}
.acct-hero canvas { width: 100%; height: auto; aspect-ratio: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55)); }
.acct-hero span {
  margin-top: -6px; font: 700 12px/1 var(--f-display); letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap;
  color: color-mix(in srgb, var(--pick) 80%, var(--ink));
}
/* the password box's eye */
.acct-pass { position: relative; display: block; }
.acct-pass input { padding-right: 42px; }
.acct-eye {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%); display: grid; place-items: center;
  width: 34px; height: 30px; padding: 0; border: 0; border-radius: 4px; cursor: pointer; background: none; color: var(--ink-faint);
}
.acct-eye:hover, .acct-eye[aria-pressed="true"] { color: var(--ink); }
.acct-eye:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; }
.acct-eye .acct-eye-off { display: none; }
.acct-eye[aria-pressed="true"] .acct-eye-off { display: inline; }

/* the characters */
.acct-who { margin: 0; font-size: 15px; color: var(--ink-dim); }
.acct-who b { color: var(--ink); }
.acct-who em {
  margin-left: 4px; padding: 1px 7px; border: 1px solid var(--edge-strong); border-radius: 9px;
  font: 500 11px/1.4 var(--f-display); letter-spacing: 0.08em; text-transform: uppercase; font-style: normal; color: var(--exp);
}
.acct-who .link-btn { margin: 0; }
.acct-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 310px)); gap: 18px;
  justify-content: center; align-items: stretch; width: 100%;
}
.acct-list .pick { grid-template-rows: auto auto auto auto 1fr; cursor: default; }
.acct-list .pick-stage { height: 190px; cursor: pointer; }
.acct-list .pick-stage canvas { width: 176px; height: 176px; }
.acct-list .pick h2 { font-size: 24px; overflow-wrap: anywhere; }
.acct-list .pick-actions { min-height: 0; align-content: end; }
.acct-char.is-deleting .pick-actions { display: none; }
.acct-confirm { display: grid; gap: 8px; text-align: left; }
.acct-confirm[hidden] { display: none; }
.acct-confirm label { font: 400 14px/1.35 var(--f-body); letter-spacing: 0; color: var(--ink-dim); }
.acct-confirm label b { color: var(--ink); }
.acct-confirm div { display: flex; align-items: center; gap: 12px; }
.acct-del-go {
  padding: 8px 12px; border-radius: 5px; cursor: pointer; font: 700 14px/1 var(--f-display); letter-spacing: 0.05em;
  color: #fff; background: #9c2f22; border: 1px solid #000;
}
.acct-del-go:disabled { opacity: 0.4; cursor: default; }
.acct-confirm .link-btn { margin: 0; }

/* a new character: the classes to pick from, then a name */
.acct-new { border-style: dashed; }
.acct-list .acct-new { grid-template-rows: auto auto auto auto auto auto 1fr; }   /* the name and Make take what is left */
.acct-new > * { min-width: 0; }
.acct-classes { display: flex; justify-content: center; gap: 2px; margin: 0 -18px; padding: 12px 4px 4px; border-bottom: 1px solid var(--edge); }
.acct-class {
  flex: 1 1 0; min-width: 0;
  display: grid; justify-items: center; align-content: start; gap: 2px; padding: 4px 2px 6px; cursor: pointer; border-radius: 8px;
  background: none; border: 1px solid transparent; color: var(--ink-faint);
  font: 700 13px/1 var(--f-display); letter-spacing: 0.05em;
}
.acct-class canvas { width: 60px; height: 60px; }     /* four classes side by side (v1.00) */
.acct-class span { font-size: 11.5px; letter-spacing: 0; line-height: 1.15; text-align: center; }
.acct-class:hover { color: var(--ink-dim); }
.acct-class[aria-pressed="true"] {
  color: var(--ink); border-color: color-mix(in srgb, var(--pick) 60%, #000);
  background: radial-gradient(ellipse 70% 60% at 50% 55%, color-mix(in srgb, var(--pick) 26%, transparent), transparent 75%);
}
.acct-new form { display: grid; gap: 8px; }
/* the class picked, big, in the face picked (v1.04); its face colours under it (v0.88) */
.acct-list .acct-big { height: 214px; border-radius: 0; cursor: default; }
.acct-list .acct-big canvas { width: 204px; height: 204px; }
.acct-new .pick-faces { margin: 0 0 2px; }
.acct-new .pick-faces.is-none { min-height: 0; margin: 0; }
.acct-new h2 { margin-top: 2px; }
.acct-new .pick-pitch { min-height: 3.9em; font-size: 14px; }

/* the game master bringing characters over from this browser */
.acct-bring { width: min(100%, 600px); }
.acct-bring h3 { margin: 0; font: 700 18px/1.1 var(--f-display); letter-spacing: 0.04em; color: var(--ink); }
.acct-bring > p { margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink-dim); }
.acct-bring-row { display: grid; grid-template-columns: 1fr 150px auto; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--edge); }
.acct-bring-row span { font-size: 14px; color: var(--ink-dim); }
.acct-bring-row span b { color: var(--ink); font-weight: 600; }
.acct-bring-row .pick-go { min-width: 0; padding: 8px 12px; font-size: 14px; }
.acct-bring-row .acct-error { grid-column: 1 / -1; }

@media (max-width: 1000px) {
  /* the four classes in a row over the sign-in card */
  .acct-gate { grid-template-columns: 1fr 1fr; grid-template-areas: "left right" "card card"; justify-items: center; gap: 4px 0; }
  .acct-gate .acct-sign { grid-area: card; width: min(100%, 380px); }
  .acct-heroes.is-left { grid-area: left; justify-self: end; }
  .acct-heroes.is-right { grid-area: right; justify-self: start; }
  .acct-hero { width: clamp(80px, 21vw, 130px); margin: 0; }
  .acct-hero span { font-size: clamp(9px, 2.5vw, 11px); letter-spacing: 0.04em; }
}
@media (max-width: 720px) {
  .acct-list { grid-template-columns: minmax(0, 420px); }
  .acct-bring-row { grid-template-columns: 1fr auto; }
  .acct-bring-row span { grid-column: 1 / -1; }
}
