*{
  box-sizing:border-box;
}

html,
body{
  height:100%;
  margin:0;
  display:flex;
  flex-direction:column;
}

body{
  margin:0;
  padding:0;
  background-color:#f4f2f8;
  font-family:"Noto Serif JP", serif;
  color:#111;
  text-align:center;

  min-height:100%;
  overflow-x:hidden;
  scrollbar-width:none;
  -ms-overflow-style:none;
}

body::-webkit-scrollbar,
html::-webkit-scrollbar{
  display:none;
}

.site-banner{
  background:linear-gradient(135deg, #dcd6f7, #e7e9f9, #f0f1f6);
  box-shadow:0 2px 6px rgba(0,0,0,0.05);
  color:#111;
  font-size:1rem;
  height:6%;
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:1000;

  display:flex;
  justify-content:center;
  align-items:center;
  text-align:center;
}

header{
  background-color:transparent;
  color:black;
  height:23%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  width:90%;
  margin:0 auto;
  box-sizing:border-box;
  margin-top:6%;
}

h1{
  width:100%;
  text-align:center;
  font-size:2rem;
  font-weight:600;
  margin:0 0 10px 0;
  box-sizing:border-box;
}

h4{
  width:100%;
  margin:0 0 12px;

  text-align:right;

  font-size:0.85rem;
  font-weight:400;
}

h4 a{
  color:#333;
  text-decoration:none;
  transition:.2s;
}

.sub-links{
  margin:0 0 10px;
  display:flex;
  justify-content:flex-end;
  gap:24px;
  font-size:0.85rem;
  font-weight:400;
}

.paw-nav{
  position:fixed;
  right:60px;
  bottom:60px;
  z-index:1000;
  list-style:none;
  margin:0;
  padding:0;
}

.paw-nav li{
  display:inline-block;
}

.paw-nav a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:2.5rem;
  color:#444;
  text-decoration:none;
  transition:transform 0.25s ease, color 0.25s ease;
}

.paw-nav a:hover{
  transform:scale(1.3) rotate(-10deg);
  color:#7d6bc5;
}

main{
  flex:1;
  width:100%;
  box-sizing:border-box;
}

footer{
  background:#f9f9f9;
  color:#444;
  font-size:0.8rem;
  font-family:"Noto Serif JP", serif;
  font-weight:300;
  height:5%;
  width:100%;

  display:flex;
  justify-content:center;
  align-items:center;

  border-top:none;
  box-shadow:0 -2px 6px rgba(0,0,0,0.08);
}

footer .footer-inner{
  opacity:0.8;
}

a{
  color:inherit;
  text-decoration:none;
}

/* =========================
   LAYOUT
========================= */

.layout{
  width:min(1400px,95%);
  margin:0 auto;
  padding:24px 0 40px;
  text-align:left;
  display:grid;
  grid-template-columns:260px 1fr;
  gap:24px;
  align-items:start;
}

/* =========================
   FILTER
========================= */

.filter-panel{
  position:sticky;
  top:20px;

  width:100%;
  margin:0;
  padding:18px;

  background:#fff;
  border-radius:16px;
  box-shadow:0 4px 14px rgba(0,0,0,.06);
  font-family:'Noto Serif JP', serif;
}

.filter-section{
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid #eee;
}

.filter-section.first{
  margin-top:0;
  padding-top:0;
  border-top:none;
}

.filter-label{
  margin-bottom:8px;
  font-size:12px;
  font-weight:700;
  color:#888;
  letter-spacing:.08em;
}

.filter-row{
  display:flex;
  flex-direction:column;
  gap:10px;
}

input,
select,
button{
  height:40px;
  padding:0 12px;

  border:1px solid #ddd;
  border-radius:8px;
  background:#fff;

  font-size:14px;
  font-family:'Noto Serif JP', serif;
}

input,
select{
  width:100%;
}

button{
  cursor:pointer;
  transition:.2s;
}

button:hover{
  background:#f0f0f0;
}

/* 並び替え＋矢印 */

.sort-control{
  display:flex;
  gap:8px;
}

.sort-control select{
  flex:1;
  min-width:0;
}

.sort-control button{
  flex:0 0 44px;
  width:44px;
  padding:0;
}

/* システムボタン */

.systemTabs{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.systemTabs button{
  width:100%;
  text-align:left;
}

.systemTabs button.active{
  background:#7d6bc5;
  border-color:#7d6bc5;
  color:#fff;
}

#skillSearch{
  margin-top:0;
}

.search-wrapper{
  position:relative;
  width:100%;
  margin-top:10px;
}

.search-wrapper input{
  width:100%;
  display:block;
  padding-right:34px;
}

.clear-search-btn{
  position:absolute;
  right:10px;
  top:50%;

  transform:translateY(-50%);

  width:22px;
  height:22px;
  min-width:22px;

  padding:0;
  margin:0;

  display:flex;
  align-items:center;
  justify-content:center;

  border:none;
  background:transparent;

  color:#999;
  font-size:16px;
  line-height:1;

  cursor:pointer;
  visibility:hidden;
}

.hidden{
  display:none !important;
}

/* =========================
   RESULT
========================= */

.result-area{
  min-width:0;
}

#count{
  margin-bottom:14px;
  color:#666;
  font-size:14px;
}

#characterList{
  width:100%;
}

.value-group{
  margin-bottom:30px;
}

.kana-group {
  margin-bottom: 30px;
}

.group-header{
  display:flex;
  align-items:center;
  gap:12px;

  margin-bottom:12px;

  font-size:1rem;
  font-weight:700;
  color:#111;
}

.group-header::after{
  content:"";
  flex:1;
  height:1px;
  background:rgba(0,0,0,0.25);
}

.group-header span{
  font-size:12px;
  font-weight:400;
  color:#999;
}

.group-characters{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
  gap:8px 24px;
}

.member-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px 24px;
}

.member {
    min-width: 0;
    display: block;
    line-height: 1.5;
    overflow-wrap: anywhere;
    color: #222;
    text-decoration: none;
}

.character-row{
  min-height:32px;
  display:flex;
  align-items:flex-start;
}

.character-row .name{
  width:100%;
  min-width:0;
}

.character-row .name a,
.character-row .name a:visited{
  display:-webkit-box;

  overflow:hidden;

  -webkit-box-orient:vertical;
  -webkit-line-clamp:1;

  line-height:1.5;
  max-height:1.5em;

  color:#222;
  text-decoration:none;
}

.character-row .name:hover a{
  -webkit-line-clamp:3;
  max-height:4.5em;

  color:#222;
  text-decoration:none;
}


/* =========================
   MOBILE
========================= */
@media (max-width: 1024px) {
  .site-banner {
    position: fixed;    
    top: 0;
    left: 0;
    right: 0;
    height: auto;  
    white-space: normal;   
    padding: 0.8rem 1rem;  
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1000;
    flex-wrap: wrap;    
  }

  header {
    margin-top: 70px;
    height: auto;
    padding: 24px 0 18px;
  }

  .layout {
    width: min(1100px, 94%);
    grid-template-columns: 240px 1fr;
    gap: 20px;
  }

  .paw-nav {
    right: 25px;
    bottom: 35px;
  }

  .paw-nav a {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
.site-banner {
  font-size: 0.6rem;
  padding: 0.1rem 0.5rem;
  height: 50px;
  box-sizing: border-box; 
}

  header {
    margin-top: 72px;
    padding: 18px 0 14px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .layout {
    display: block;
    width: 80%;
    margin: 0 auto;
    padding: 16px 0 40px;
  }

  .filter-panel {
    position: static;
    margin-bottom: 24px;
  }

  .result-area {
    width: 94%;
    margin: 0 auto;
  }

  .sub-links,
  h4 {
    justify-content: flex-end;
    gap: 24px;
  }

  .member-list {
    grid-template-columns: 1fr;
  }

  .group-characters {
    grid-template-columns: 1fr;
  }

  .paw-nav {
    right: 20px;
    bottom: 30px;
  }

  .paw-nav a {
    font-size: 1.8rem;
  }
}