html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin: 40px auto;
  max-width: 800px;
  font-family: sans-serif;
}

.content {
  margin-left: 20px;
  margin-right: 20px;
}

.comment-row {
  display: flex
}

.comment-user {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-right: 2em;
}

summary {
  text-decoration: underline;
  cursor: grab;
}

details {
  background-color: aliceblue;
}

.spoiler-content {
  padding-left: 1em;
  padding-right: 1em;
  padding-bottom: 0.1em;
}

.check-btn {
  margin-left: 2px;
  padding: 0.5em 2em 0.5em 2em;
  background-color: white;
  cursor: grab;
  border: groove 2px ThreeDFace;
  font-size: 16px;
}

.error {
  color: red;
}

/* rank choice */

.rank-choice {
  display: flex;
  flex-wrap: wrap;
  margin-top: 1em;
  margin-bottom: 1em;
}

.rank-choice label {
  width: 7em;
  margin: 0.2em;
  cursor: grab;
}

.rank-choice label span {
  text-align: center;
  display: block;
  padding: 1em 0;
  color: white;
}

.rank-choice label input {
  display: none;
}

.rank-choice label input:checked + span {
  border: 2px solid black;
  padding-top: calc(1em - 2px);
  padding-bottom: calc(1em - 2px);
}

.rank-choice label.user-newbie span {
  background-color: gray;
}

.rank-choice label.user-pupil span {
  background-color: green;
}

.rank-choice label.user-specialist span {
  background-color: #03a89e;
}

.rank-choice label.user-expert span {
  background-color: blue;
}

.rank-choice label.user-candidate-master span {
  background-color: #a0a;
}

.rank-choice label.user-master span {
  background-color: #ff8c00;
}

.rank-choice label.user-grandmaster span {
  background-color: red;
}

.rank-choice label.user-legendary-grandmaster span {
  background: linear-gradient(90deg, rgba(0,0,0,1) 20%, rgba(255,0,0,1) 20%);
}

/* statistics */

.bar-chart {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 2px solid black;
  width: 60%;
  margin-left: 6em;
}

.bar {
  background-color: #daa520;
  height: 2em;
  /*noinspection CssUnresolvedCustomProperty*/
  width: var(--bar-value);
  align-self: flex-start;
  border-radius: 0 3px 3px 0;
  position: relative;
  margin: 0.2em 0;
}

.bar::before {
  content: attr(data-name);
  line-height: 2em;
  position: absolute;
  right: 100%;
  white-space: nowrap;
  font-weight: normal;
  color: black;
  padding: 0 1em;
}

.bar::after {
  content: attr(data-value);
  position: absolute;
  left: 100%;
  display: inline-block;
  white-space: nowrap;
  padding: 0 1em;
  line-height: 2em;
  font-weight: normal;
  color: black;
}

.bar.user-newbie {
  background-color: gray;
}

.bar.user-pupil {
  background-color: green;
}

.bar.user-specialist {
  background-color: #03a89e;
}

.bar.user-expert {
  background-color: blue;
}

.bar.user-candidate-master {
  background-color: #a0a;
}

.bar.user-master {
  background-color: #ff8c00
}

.bar.user-grandmaster {
  background-color: red;
}

.bar.user-legendary-grandmaster {
  background: linear-gradient(90deg, rgba(0,0,0,1) 20%, rgba(255,0,0,1) 20%);
}

/* ranks */

.user-newbie {
  color: gray;
  font-weight: bold;
}

.user-pupil {
  color: green;
  font-weight: bold;
}

.user-specialist {
  color: #03a89e;
  font-weight: bold;
}

.user-expert {
  color: blue;
  font-weight: bold;
}

.user-candidate-master {
  color: #a0a;
  font-weight: bold;
}

.user-master {
  color: #ff8c00;
  font-weight: bold;
}

.user-grandmaster {
  color: red;
  font-weight: bold;
}

.user-legendary-grandmaster {
  color: red;
  font-weight: bold;
  display: inline-block;
}

.user-legendary-grandmaster::first-letter {
  color: black;
}

.comment-list-table {
  width: 100%;
}

.comment-plaintext div {
  max-height: 1.4em;
  overflow: hidden;
  position: relative;
  text-overflow: ellipsis;
}

.order-choices {
  margin-bottom: 1em;
  font-size: 0.9em;
}

footer {
  margin-top: 1em;
  padding-top: 0.2em;
  border-top: solid 1px gray;
  display: flex;
  justify-content: flex-end;
  font-size: 0.9em;
  gap: 0.3em;
}

.search-form {
  display: flex;
  gap: 2px;
  margin-bottom: 0.5em;
}

.search-form input[type="text"] {
  flex-grow: 1;
}

.search-form input[type="submit"] {
  min-width: 5em;
}