body {
  position: relative;
  user-select: none;
}
html {
  font-size: 16px;
  line-height: 1.5;
}
#page-width {
  width: 400px;
}
#header {
  max-width: 400px;
}
/***********************
　　検索窓エリア
************************/
#search-area {
  position: relative;
  margin: 16px 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
#search-area .keywords {
  width: 200px;
  border: solid gray 1px;
}
#search-area input {
  margin: 0;
  padding: 4px;
  line-height: 1.4rem;
  height: 24px;
}
#search-area .selectbox {
  padding: 4px;
  line-height: 1.4rem;
  height: 24px;
  font-size: 0.8rem;
}
	
input:-webkit-autofill {/*オートコンプリートを使用した際に背景色が勝手に変わるやつの対策*/
    box-shadow: 0 0 0 1000px white inset;
}

#search-area #fake-btn {
  display: inline-block;
  cursor: pointer;
  border: none;
  padding: 0 8px;
  width: 52px;
  height: 24px;
  line-height: 24px;
  font-size: 0.8rem;
  font-weight: bold;
  background-color: #eb6100;
  color: #fff;
  outline : none;
  border-radius: 0 6px 6px 0;
}
#search-area #fake-btn:hover {
  background-color: orange;
}

/***********************
　　ブックマークエリア & おすすめエリア
************************/
h2, h3 {/*common-styleの影響を消してる*/
  border: none;
  margin: 0;
  padding: 0;
}
#link-area {
  width: 100%;
  min-height: 544px;
  margin-bottom: 32px;
}
#category-area {
  width: 100%;
  height: 100%;
  border: solid 1px #aaa;
}
#category-area .section-title {
  background-color: #222;
  width: 100%;
  height: 18px;
  line-height: 18px;
  font-size: 0.6rem;
  font-weight: bold;
  color: white;
  text-align: center;
}
#category-area .split{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
}
#category-area button {
  display: block;
  width: 100%;
  height: 20px;
  font-size: 0.6rem;
  font-weight: bold;
  border-top: solid 1px white;
  border-left: solid 1px white;
  border-right: solid 1px #aaa;
  border-bottom: solid 1px #aaa;
}
#category-area button:hover {
  cursor: pointer;
  background-color: orange;
}
#category-area button[disabled] {
  color: #d2d5db;
  background: #6c7589;
  cursor: default;
  border: 0;
}

#bookmark-area {
  width: 100%;
  min-height: 600px;
  border: solid 1px #aaa;
  position: relative;
}

#category-area #cat-area-title,
#bookmark-area #home-title,
#folder-area .folder-title {
  width: 100%;
  height: 24px;
  line-height: 24px;
  font-size: 0.8rem;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #37a;
  color: white;
}
#folder-area .folder-title {
  background-color: #222;
}

#home-area,
#folder-bookmark-area {
  padding: 16px 12px;
  width: 100%;
  height: calc(100% - 28px);
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(auto-fill, 84px);
  grid-gap: 16px 12px;
}
#folder-bookmark-area {
  width: 100%;
  outline: solid 1px #aaa;
}

.bookmark {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  text-align: center;  
  box-sizing: content-box;/*borderの影響を小さくするため*/
  user-select: none;
}
.bookmark:hover {
  background-color: #ecf3ff;
}
.bookmark .icon {
  margin: 10% auto 0 auto;
  width: 50%;
  aspect-ratio: 1/1;
  border-radius: 10%;
}
.bookmark .title {
  margin: 4px 0 0 0;
  width: 100%;
  height: 36px;
  overflow: hidden;
  text-align: center;
  font-size: 0.6rem;
  line-height: 0.9rem;
}
.bookmark .wrap {/*マウス反応用*/
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  position: absolute;
  z-index: 1;
}
.bookmark .edit-btn {
  position: absolute;
  width: 16px;
  height: 16px;
  top: 2px;
  right: 2px;
  border-radius: 8px;
  z-index: 3;
  visibility: hidden;
  background-image:url("../images/edit-btn.png");
  background-size: 16px;
}
.bookmark:hover .edit-btn{
  visibility: visible;
}
/*フォルダー関係*/
#folder-wrap {
  width: 100%;
  height: 100%;
  z-index: 100;
  position: absolute;
  top: 0;
  left: 0;
  background-color: rgba(160, 160, 160, 0.7);
  animation-name: zoomInAnime;
  animation-duration: 0.15s;
  animation-fill-mode: forwards;
}
@keyframes zoomInAnime{
  from {
    transform: scale(0.1);
  }
  to {
      transform: scale(1);
  }
}
@keyframes zoomDownInAnime{
  from {
    transform: scale(1);
  }
  to {
    transform: scale(0.01);
  }
}

#folder-area {
  width: 100%;
  height: 100%;
  background-color: white;
  position: absolute;
  top: 0;
  left: 0;
}

#folder-area .close-btn {
  width: 20px;
  height: 20px;
  border: solid 1px white;
  border-radius: 6px;
  position: absolute;
  top: 4px;
  right: 4px;
}
.batsu {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
}
.batsu::before, .batsu::after { /* 共通設定 */
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px; /* 棒の幅（太さ） */
  height: 14px; /* 棒の高さ */
  background: #fff;
}
.batsu::before {
  transform: translate(-50%,-50%) rotate(45deg);
}
.batsu::after {
  transform: translate(-50%,-50%) rotate(-45deg);
}

/*編集入力関係*/
#edit-wrap {
  width: 100%;
  height: 100%;
  z-index: 100;
  position: absolute;
  top: 0;
  left: 0;
}

#edit-wrap .menu {
  width: 120px;
  height: auto;
  z-index: 110;
  background-color: white;
  border: solid 1px black;
  position: absolute;
  box-shadow: 2px 2px 4px;
  user-select: none;
}

#edit-wrap .menu .item {
  display: block;
  width: 100%;
  height: 100%;
  font-size: 0.9rem;
  border-bottom: solid 1px black;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}
#edit-wrap .menu .item:hover {
  background-color: lightgray;
}
#edit-wrap .menu li:last-child {
  border-bottom: none;
}

#edit-wrap #cover {
  width: 100%;
  height: 100%;
  background-color: rgba(255,255,255, 0.8);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
#edit-wrap .input-area {
  width:100%;
  height: 270px;
  background-color: white;
  border: solid 1px black;
  border-radius: 16px;
  position: relative;
  text-align: center;
  box-shadow: 2px 2px 4px;
  user-select: none;
}
#edit-wrap .input-area .area{
  margin: 60px auto 0 auto;
  width: 90%;
  display: flex;
  justify-content: space-between;
}
#edit-wrap .input-area input {
  display: inline-block;
  line-height: 1.2rem;
  height: 24px;
  width: 80%;
}
#edit-wrap .input-area label {
  display: inline-block;
  line-height: 1.2rem;
  margin-right: 8px;
  vertical-align: text-bottom;
  font-weight: bold;
}
#edit-wrap .input-area button {
  font-size: 0.8rem;
  line-height: 1rem;
  position: absolute;
  bottom: 20px;
}
#edit-wrap .input-area .ok {
  left: 30%;
}
#edit-wrap .input-area .cancel {
  right: 30%;
}
#edit-wrap .input-area .error-msg {
  font-size: 0.8rem;
  width: 70%;
  margin: 0 auto;
}


/*新規ブックマーク入力エリア*/
#input-area {
  width:100%;
  height: 32px;
  display: flex; 
  justify-content: right; 
  align-items: center;  
  user-select: none;
  padding-right: 4px;
  background-color: #222;
}
/*ボタンのデザイン変更*/
#input-area button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: 0;
  height: 24px;
  line-height: 24px;
  margin: 0 0 0 4px;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: bold;
  background-color: #eb6100;
  color: white;
  border-radius: 4px;
}

#input-area button:hover {
  cursor: pointer;
  background-color: orange;
}

#input-area button[disabled] {
    color: #d2d5db;
    background: #6c7589;
    cursor: not-allowed;
}

#bkmrk-explain {
  display: none;
  width: 100%;
  height: 100%;
  z-index: 100;
  background-color: rgba(0,0,0, 0.8);
  position: fixed;
  top: 0;
  left: 0;
}

#bkmrk-explain .area {
  margin: 32px auto;
  padding: 24px;
  width: 100%;
  min-height: 200px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  border-radius: 16px;
  background-color: white;
}
#bkmrk-explain .area h3 {
  text-align: center;
  margin: 24px 0 8px 0;
  font-size: 1.2rem;
}
#bkmrk-explain .area p {
  font-size: 0.8rem;
  line-height: 1.2rem;
  margin-bottom: 8px;
}
#bkmrk-explain .reset {
  border: solid 1px gray;
  border-radius: 4px;
  padding: 0 4px;
  cursor: pointer;
}
#bkmrk-explain .center {
  margin-top: 32px;
  text-align: center;
}
#bkmrk-explain .close {
  display: inline-block;
  border: solid 1px gray;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: bold;
}

.article {
  padding: 8px;
  border-radius: 8px;
  border: dotted 1px gray;
  font-size: 0.8rem;
}

