@charset "UTF-8";

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  font-size: 1em;
  line-height: 1.6;
  color: #333;
  background: #eee;
}

a {
  color: #333;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

p {
  margin: 0;
  padding: 0;
}
p + p {
  margin-top: 8px;
}

button {
  font: inherit;
  cursor: pointer;
}

.btns {
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
}
.btns + .btns {
  margin-top: 40px;
}

.btn {
  display: inline-block;
  margin: 0;
  padding: 6px 16px;
  border: 1px solid #666;
  border-radius: 8px;
  background: #333;
  color: #fff;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
}
.btn:hover {
  background: #666;
  color: #fff;
}

.btn-back {
  background: #fff;
  color: #333;
}

#root {
  width: 620px;
  margin: 0 auto;
  padding: 0;
  background: #fff;
}

.page-ttl {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.2;
}
.s-ttl {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: bold;
  line-height: 1.2;
}

.message {
  margin: 20px 0 40px;
  color: #d00;
}

/* .site-header ============== */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 10px 20px;
  height: 60px;
  background: #c1f3ff;
}

.site-header h1 {
  margin: 0;
  padding: 0;
  font-size: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.site-header .info {
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-header .user_name {
  font-weight: bold;
}

/* .site-main ============== */
.site-main {
  margin: 0 auto;
  padding: 40px 20px;
}

/* .loading ============== */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .6);
  color: #fff;
}

/* .form-wrap ============== */
.form-wrap {
  margin: 0 0 40px;
  padding: 0 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
}
.form-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-block: 20px;
}
.form-inner .s-ttl {
  margin: 0;
}

.form-wrap .btns {
  margin-block: 20px;
}

.form-inner input[type="text"],
.form-inner input[type="password"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font: inherit;
}

.form-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}



/* .books ============== */
.books {
  margin: 0;
  padding: 0;
  list-style: none;
}

.books li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}
.books li + li {
  margin-top: 40px;
}
.books .rank {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
}
.books figure {
  width: 38%;
  margin: 0;
  padding: 20px;
  line-height: 0;
}
.books .info {
  flex: 1;
}
.books .info h3 {
  margin: 0 0 1em;
  font-size: 1em;
  font-weight: bold;
  line-height: 1.2;
}

.books .info .btn-wrap {
  margin-top: 20px;
  text-align: right;
}

/* .reviews ============== */
.reviews-wrap {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 900;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .6);
  overflow: auto;
}
.reviews {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 580px;
  max-height: 100%;
  border-radius: 8px;
  margin: 0 auto;
  padding: 20px;
  background: #fff;
}

.reviews .list-wrap {
  margin-bottom: 20px;
  height: 500px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: auto;
}
.reviews .list {
  margin: 0;
  padding: 0 20px;
  list-style: none;
}
.reviews .list li {
  padding: 20px 10px;
}
.reviews .list li + li {
  border-top: 1px solid #ddd;
}

.reviews .list .info {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 14px;
}

.reviews .list li.self .info .name {
  color: #d00;
  font-weight: bold;
}
