/* m3llo translate: the parts that shared.css does not have. */

[hidden] { display: none !important; }
.top-right { position: relative; }
.lang-switch.cjk { font-family: 'Barlow', var(--cjk); }

.lang-menu {
  position: absolute; top: 40px; left: 0; z-index: 10; min-width: 200px;
  display: flex; flex-direction: column; padding: 4px 0;
  background: var(--bg-panel); border: 1px solid var(--line-hi);
}
.lang-menu button {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 7px 12px; text-align: left; color: var(--text); font-size: 13px; font-weight: 400;
}
.lang-menu button:hover { background: var(--bg-card-hover); color: var(--text-hi); }
.lang-menu button.on { color: var(--text-hi); box-shadow: inset 2px 0 0 var(--accent); }
.lang-menu button.cjk { font-family: 'Barlow', var(--cjk); }
.lang-menu .tag { font-family: var(--mono); font-size: 11px; color: var(--text-dim); }

.role span { cursor: pointer; }
.empty { padding: 28px 12px; color: var(--text-dim); font-size: 13px; }
.sign-in { max-width: 460px; gap: 10px; align-items: stretch; }
.note { margin-top: 18px; font-size: 13px; color: var(--text-dim); }
.note a { color: var(--text); text-decoration: underline; }
.sign-out { margin-left: 10px; }
.hint { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--amber); }
.hint::before { content: ""; width: 7px; height: 7px; border-radius: 9px; background: currentColor; flex: none; }

/* Narrow windows: no fixed page width, and the header wraps. Below 900 px the
   side column of a page moves above or under the main column (each page sets it). */
body { min-width: 0; }
@media (max-width: 900px) {
  .top { flex-wrap: wrap; height: auto; min-height: 56px; gap: 0 18px; padding: 0 16px; }
  .top .brand { padding: 16px 0; }
  .top .nav { height: 56px; }
  .top .nav a { padding: 0 9px; }
  .top-right { margin-left: 0; flex-basis: 100%; padding: 0 0 12px; }
  .page { padding: 28px 16px 64px; }
  .head-row { flex-wrap: wrap; gap: 8px 20px; margin-bottom: 24px; }
  .head-row h1 { font-size: 32px; }
}

/* The glossary pairs in the hint line: no warning, so no amber. */
.hint.gloss { color: var(--text-dim); gap: 18px; }
.hint.gloss::before { display: none; }
.hint .more { font-size: 12px; color: var(--text-dim); border-bottom: 1px solid var(--line-hi); }
.hint .more:hover { color: var(--text-hi); }

/* The agreement line: in the place of the send action until the user agrees. */
.agree { display: inline-flex; align-items: stretch; gap: 12px; font-size: 13.5px; color: var(--text-dim); white-space: nowrap; }
.agree > span { align-self: center; }

/* The sign-in pages: the same layout as the sign-in panel of the client.
   Two buttons of 280 px and a gap of 16 px make the block width. It sits at
   the left of the page column. Under 560 px the grid has one column. */
.auth { max-width: 576px; }
.auth-head { margin-bottom: 48px; }
.auth-head h1 { font-size: 48px; font-weight: 600; letter-spacing: -1.5px; line-height: 1.25; }
.auth-head .sub { margin-top: 8px; font-size: 14px; font-weight: 600; letter-spacing: 1.5px; color: var(--text-dim); }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* A grid button: a 1 px line that follows the cut corners. The element is the
   line; ::before is the face, inset by the line and cut by the same corners. */
.auth-btn {
  position: relative; display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 16px; min-width: 0;
  font-weight: 600; font-size: 13px; letter-spacing: 1.5px; line-height: 1; color: var(--text-hi); white-space: nowrap;
  background: var(--line);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.auth-btn::before {
  --in: calc(var(--cut) - .59px);
  content: ""; position: absolute; inset: 1px; z-index: -1; background: var(--bg-app);
  clip-path: polygon(var(--in) 0, 100% 0, 100% calc(100% - var(--in)), calc(100% - var(--in)) 100%, 0 100%, 0 var(--in));
}
.auth-btn > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.auth-btn:hover, .auth-btn:focus-visible, .auth-btn[aria-current] { background: var(--line-hi); outline: 0; }
.auth-btn:hover::before, .auth-btn:focus-visible::before { background: var(--bg-raised); }

/* The icons are single-colour files. The mask takes their shape; the colour is the text colour. */
.auth-ico, .auth-arrow { flex: none; background: currentColor; mask: center / contain no-repeat; }
.auth-ico { width: 20px; height: 20px; opacity: .8; }
.ico-steam { mask-image: url('icons/steam.svg'); }
.ico-twitch { mask-image: url('icons/twitch.svg'); }
.ico-google { mask-image: url('icons/google.svg'); }
.ico-discord { mask-image: url('icons/discord.svg'); }
.ico-mail { mask-image: url('icons/mail.svg'); }
.auth-arrow { width: 14px; height: 14px; mask-image: url('icons/arrow-right.svg'); }

/* The email form: a plain rectangle per field, and the red button that commits. */
.auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
.auth-field {
  height: 52px; padding: 0 16px; width: 100%; outline: 0; border-radius: 0;
  font-family: var(--text-face); font-weight: 400; font-size: 14px; color: var(--text-hi);
  background: var(--bg-panel); border: 1px solid var(--line);
}
.auth-field::placeholder { font-weight: 600; letter-spacing: 1.5px; color: var(--text-faint); }
.auth-field:focus { border-color: var(--line-hi); }
.auth-submit { height: 52px; gap: 12px; font-size: 14px; letter-spacing: 1.5px; }
.auth-submit:focus-visible { outline: 1px solid var(--line-hi); outline-offset: 2px; }

/* An error of a sign-in: under the grid and the form, as in the client. */
.sign-in-error { margin-top: 24px; font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--text-hi); }
.sign-in-error::before { display: none; }
.auth .note { margin-top: 24px; }
.auth .note + .note { margin-top: 8px; }

@media (max-width: 560px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-head { margin-bottom: 32px; }
  .auth-head h1 { font-size: 40px; }
}
