
*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Hiragino Sans","Meiryo",sans-serif;
  background: #f9f9f9;
  color: #333;
}


header {
  background: linear-gradient(90deg, #9370db, #87ceeb);
  min-height: 100px;
  display: flex;
  align-items: center;      
  justify-content: center;  
  position: relative;
  color: #fff;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 30px;
  font-weight: bold;
  z-index: 2;
}

header h1 a {
  text-decoration: underline;
  text-underline-offset: 6px;           
  text-decoration-thickness: 1px;       
  text-decoration-color: rgba(255,255,255,0.6); 
  color: #fff;
}

header h1 a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(255,255,255,0.8); 
}




.menu-toggle {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  display: none; 
  z-index: 4;
}


nav {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
}
nav .nav-root {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}
nav .nav-root > li {
  position: relative;
}


nav .nav-root > li > a {
  padding: 6px 12px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.6);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  display: inline-block;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  line-height: 1;
}
nav .nav-root > li > a:hover {
  background: rgba(255,255,255,0.2);
}


nav .has-sub .dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: #fff;
  color: #333;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  padding: 8px 0;
}
nav .has-sub:hover .dropdown,
nav .has-sub:focus-within .dropdown {
  display: block;
  z-index: 5;
}
nav .dropdown li {
  list-style: none;
}
nav .dropdown a {
  display: block;
  padding: 10px 14px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
}
nav .dropdown a:hover {
  background: #6a5acd;
  color: #fff;
}





@media screen and (max-width: 768px) {
  header { min-height: 100px; }
  header h1 { font-size: 22px; }

  
  nav {
    display: none;              
    position: absolute;
    top: 60px;
    right: 12px;
    width: 260px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
    padding: 8px 0;
  }
  nav.active { display: block !important; }

  
  nav .nav-root {
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
  }
  nav .nav-root > li {
    border-bottom: 1px solid #eee;
  }
  nav .nav-root > li:last-child { border-bottom: none; }

  
  nav .nav-root > li > a {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 16px;
    margin: 0;
    border: 0;
    border-radius: 0;
    color: #333;
    background: #fff;
    font-size: 15px;
    line-height: 1;
  }
  nav .nav-root > li > a:hover,
  nav .nav-root > li > a:active {
    background: #6a5acd;
    color: #fff;
  }

  
  nav .has-sub .dropdown {
    position: static;
    display: block;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    background: #fff;
  }
  nav .has-sub .dropdown li {
    border-top: 1px solid #f2f2f2;
  }
  nav .has-sub .dropdown a {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 16px 0 28px;  
    color: #333;
    background: #fff;
    font-size: 14px;
  }
  nav .has-sub .dropdown a:hover,
  nav .has-sub .dropdown a:active {
    background: #f0eaff;       
    color: #333;
  }

  .menu-toggle {
    display: block;
    right: 8px;
  }
}


.hero {
  margin-top: 40px;
  text-align: center;
  padding: 40px 15px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.hero h2 { font-size: 22px; margin-bottom: 20px; }
.hero .tarot-card {
  width: 160px;
  margin: 20px auto;
  display: block;
  transition: transform 0.3s ease;
}
.hero .tarot-card:hover { transform: rotateY(180deg) scale(1.1); }


section {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 15px;
}
section h2 {
  border-left: 5px solid #6a5acd;
  padding-left: 10px;
  font-size: 20px;
  margin-bottom: 20px;
}


.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(150px,1fr));
  gap: 15px;
}
.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: center;
  padding: 20px;
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-5px); }
.card i { font-size: 24px; color: #6a5acd; margin-bottom: 10px; }


footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}
footer a { color: #fff; text-decoration: underline; }


.page-header {
  max-width: 1000px;
  margin: 40px auto 20px;
  padding: 0 15px;
  text-align: center;
}
.page-header h2 {
  font-size: 24px;
  margin-bottom: 10px;
  color: #333;
}
.page-header p {
  font-size: 14px;
  color: #555;
}


.category-list {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
grid-template-columns: 1fr; 
  gap: 20px;
}


.category-list .item a {
  display: block;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 20px;
  text-decoration: none;  
  color: inherit;         
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}


.category-list .item a:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  background: #f5f5ff; 
}


.category-list h3 {
  font-size: 16px;
  margin: 0 0 12px;
  color: #333;
}


.category-list .meta {
  display: flex;
  justify-content: space-between; 
  align-items: center;
  font-size: 12px;
  color: #666;
}


.category-list .source {
  font-size: 12px;
  color: #666;
}


.category-list .tag {
  background: #6a5acd;
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}





a { text-decoration: none; color: inherit; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }



@media screen and (min-width: 769px) {
  nav li {
    position: relative; 
  }

  nav li ul {
    display: none;              
    position: absolute;
    top: 100%;                  
    left: 0;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border-radius: 4px;
    min-width: 200px;
    padding: 0;
    margin: 0;
    z-index: 100;               
  }

  nav li:hover > ul {
    display: block; 
  }

  nav li ul li {
    border-bottom: 1px solid #eee;
  }

  nav li ul li:last-child {
    border-bottom: none;
  }

  nav li ul a {
    display: block;
    padding: 10px 15px;
    color: #333;
    background: #fff;
    text-decoration: none;
    white-space: nowrap;
  }

  nav li ul a:hover {
    background: #6a5acd;
    color: #fff;
  }
}


#category {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 15px;
}
#category h2 {
  border-left: 5px solid #6a5acd;
  padding-left: 10px;
  font-size: 20px;
  margin-bottom: 20px;
}
#category .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}
#category .card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: center;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#category .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
#category .card i {
  font-size: 28px;
  color: #6a5acd;
  margin-bottom: 10px;
}
#category .card p {
  margin: 0;
  font-size: 15px;
}
#category .card a {
  display: block;
  text-decoration: none;
  color: #333;
}
#category .card a:hover {
  color: #6a5acd;
  text-decoration: none;
}


.ranking-list {
  list-style: none;
  counter-reset: rank;
  padding: 0;
  margin: 0;
}

.ranking-list li {
  counter-increment: rank;
  margin-bottom: 12px;
}



.ranking-card {
  display: block;
  position: relative;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 16px 16px 16px 56px;  
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-height: 60px; 
}

.ranking-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  background: #f5f5ff;
  text-decoration: none;
}


.ranking-card::before {
  content: counter(rank);
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%); 
  background: #6a5acd;
  color: #fff;
  font-weight: bold;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}


.ranking-card h3 {
  font-size: 15px;
  margin: 0 0 6px;
  font-weight: bold;
  color: #333;
  line-height: 1.4;
  word-break: break-word;
}


.ranking-card .source {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #666;
}





#ranking .more {
  text-align: right;
  margin-top: 10px;
}
#ranking .more a {
  font-size: 14px;
  color: #6a5acd;
  text-decoration: none;
}
#ranking .more a:hover {
  text-decoration: underline;
}


#ranking .more-link {
  display: inline-block;
  margin: 15px auto 0;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: bold;
  color: #6a5acd;
  border: 2px solid #6a5acd;
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.3s ease;
}

#ranking .more-link:hover {
  background: #6a5acd;
  color: #fff;
}


#ranking p {
  text-align: center;
  margin: 0;
}


@media screen and (min-width: 1025px) {
  nav ul.nav-root {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  
    gap: 10px 20px;
    justify-content: center;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    max-width: 900px;                       
  }

  nav ul.nav-root li {
    margin: 0;
    text-align: center;
  }

  nav ul.nav-root li a {
    display: inline-block;
    min-width: 120px;                       
    max-width: 200px;                       
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
  }

  nav ul.nav-root li a:hover {
    background: rgba(255,255,255,0.2);
  }
}


.card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: center;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;   
  color: inherit;          
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  background: #f5f5ff;
  text-decoration: none;   
}

.card i {
  font-size: 24px;
  color: #6a5acd;
  margin-bottom: 10px;
}

.card p {
  margin: 0;
  font-size: 15px;
}


.ranking-list li::before {
  z-index: 2;
}


.ranking-card {
  position: relative;
  z-index: 1;
}




.hidden { display: none; }


.more {
  text-align: center;
  margin: 20px 0;
}
.more button {
  display: inline-block;
  padding: 8px 18px;
  border: 2px solid #6a5acd;
  border-radius: 25px;
  font-size: 14px;
  font-weight: bold;
  color: #6a5acd;
  background: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}
.more button:hover {
  background: #6a5acd;
  color: #fff;
}


.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.top-link {
  display: inline-block;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: bold;
  color: #6a5acd;
  border: 2px solid #6a5acd;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.top-link:hover {
  background: #6a5acd;
  color: #fff;
}




.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px; 
  padding: 8px 18px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}


.more-btn {
  background: #6a5acd;
  color: #fff;
  border: 2px solid #6a5acd;
}
.more-btn:hover {
  background: #5b4ab8;
  border-color: #5b4ab8;
}


.top-btn {
  background: #fff;
  color: #6a5acd;
  border: 2px solid #6a5acd;
}
.top-btn:hover {
  background: #f0eaff;
}



.action-btn.top-btn {
  display: inline-block;
  margin: 15px auto 0;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: bold;
  color: #333;
  border: 2px solid #333;
  border-radius: 25px;
  background: #fff;
  text-decoration: none; 
  transition: all 0.3s ease;
}

.action-btn.top-btn:hover {
  background: #333;
  color: #fff;
  text-decoration: none; 
}



#major-arcana .card img {
  width: 160px !important;   
  height: auto !important;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  display: block;
  margin: 0 auto;
}


.tarot-figure img,
.card-detail img.tarot-card-img,
.card-detail figure img {
  max-width: 250px !important;  
  width: 100% !important;        
  height: auto !important;
  display: block;
  margin: 0 auto 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}



@media screen and (max-width: 768px) {
  .page-header p {
    text-align: left;
  }
}


