* {
  box-sizing: border-box;
}
/*
a {
  color: red;
  font-weight: bold;
  font-size: 20px;
}

a:link {
  color: rgb(0, 255, 174);
  font-weight: bold;
  font-size: 20px;
}*/

.collapse-bar {
  display: flex;
  justify-content: flex-end;
  padding: 8px 0;
  margin-bottom: 10px;
}

.collapse-bar:has(#toggle-intro:checked) + #intro-content {
  display: none;
}

.collapse-label {
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.collapsed {
  display: none !important;
}

.search-container {
  margin: 15px 0;
  display: flex;
  justify-content: center;
}

#charSearchInput {
  width: 100%;
  font-family: 'Josefin Sans', Arial, sans-serif;
  max-width: 400px;
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
  outline: none;
}

.head {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1550px;
  margin: 0 auto;
  gap: 8px;
  padding: 8px;
  width: 100%;
}

.head img {
  max-width: 100%;
  height: auto;
  display: block;
}

.tier-section {
  width: 100%;
  max-width: 1550px;
  margin: 0 auto 24px auto;
  padding: 0 10px;
}

.tiers {
  width: 100%;
  display: block;
}

.tiers a {
  width: 100%;
  display: block; 
}

.tier-banner {
  width: 100%;
  height: auto;
  display: block;
}

.charicon {
  width: 135px;
  height: 135px;
}

body.small-icons .charicon {
  width: 75px;
  height: 75px;
}

body.small-icons .cname {
  max-width: 75px;
  font-size: 10px;
  padding: 2px 1px;
  min-height: unset;
  line-height: 1.1;
}

body.small-icons .expl {
  max-width: 75px;
  font-size: 9px;
  padding: 4px 1px;
}
/* tier row: colors behind the tiers*/
.tier-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  padding: 16px;
  width: 100%;
  max-width: 1550px; 
  margin: 0 auto 28px auto;    
}

#EX {
  background-color: rgba(333, 10, 91, 0.4);
}

#SS {
  background-color: rgba(108, 75, 174, 0.75);
}

#S {
  background-color: rgba(244, 204, 204, 0.4);
}

#A {
  background-color: rgba(240, 175, 110, 0.4);
}

#B {
  background-color: rgba(182, 215, 168, 0.5);
}

#C {
  background-color: rgba(135, 197, 255, 0.6);
}

#D {
  background-color: rgba(106, 65, 219, 0.5);
}

#E {
  background-color: rgba(240, 191, 141, 0.5);
}

#Yukkuri {
  background-color: rgba(11, 83, 148, 0.5);
}

/* Custom Tier Opacities for Light Mode */
:root:has(#mode_light:checked) #EX {
  background-color: rgba(255, 10, 91, 0.6);
}

:root:has(#mode_light:checked) #SS {
  background-color: rgba(108, 75, 174, 0.85);
}

:root:has(#mode_light:checked) #S {
  background-color: rgba(244, 204, 204, 0.65);
}

:root:has(#mode_light:checked) #A {
  background-color: rgba(234, 136, 38, 0.5);
}

:root:has(#mode_light:checked) #B {
  background-color: rgba(118, 194, 86, 0.7);
}

:root:has(#mode_light:checked) #C {
  background-color: rgba(135, 197, 255, 0.75);
}

:root:has(#mode_light:checked) #D {
  background-color: rgba(106, 65, 219, 0.6);
}

:root:has(#mode_light:checked) #E {
  background-color: rgba(240, 191, 141, 0.7);
}

:root:has(#mode_light:checked) #Yukkuri {
  background-color: rgba(11, 83, 148, 0.7);
}

/*custom*/

:root:has(#mode_medi:checked) .tier-row {
  background-color: rgba(11, 0, 10, 0.75);
}

:root:has(#mode_mami:checked) .tier-row {
  background-color: rgba(11, 5, 0, 0.75);
}

.tier-group {
  scroll-margin-top: 80px;
}

.introtext {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  background-color: rgba(45, 99, 154, 0.75);
  font-family: 'Josefin Sans', Arial, sans-serif;
  border: 2px solid #000000;
  text-align: center;
}

.formresponse {
  font-size: 15px;
  line-height: 1.5;
  max-width: 1400px;
  margin: 10px auto;
  width: 100%;
  background-color: rgba(18, 10, 35, 0.85);
  color: #ffffff;
  font-family: 'Josefin Sans', Arial, sans-serif;
  border: 2px solid #000000;
  text-align: justify;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.Important-Links {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  font-size: 20px;
  gap: 8px;
  color: #fff;
  width: 100%;
  max-width: 1550px;
  margin: 8px auto;
  padding: 0 10px;
}

.link-btn {
  flex: 1 1 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: #ffffff;
  background-color: #890160;
  padding: 10px 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.link-btn:hover {
  background-color: #bc1189;
  transform: scale(1.03);
}

:root:has(#mode_medi:checked) .link-btn {
  background-color: rgba(74, 4, 4, 0.75);
}

:root:has(#mode_mami:checked) .link-btn {
  background-color: rgba(155, 109, 19, 0.75);
}

:root:has(#mode_medi:checked) .link-btn:hover {
  background-color: rgba(146, 9, 9, 0.75);
  transform: scale(1.05);
}

:root:has(#mode_mami:checked) .link-btn:hover {
  background-color: rgba(218, 153, 25, 0.75);
  transform: scale(1.05);
}

.f-tier-section {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  background-color: #999999;
  color: #000000;
  font-family: 'Josefin Sans', Arial, sans-serif;
  border: 2px solid #000000;
}

.f-tier-title {
  font-size: clamp(28px, 6vw, 56px);
  font-weight: bold;
  text-align: center;
  padding: 15px 10px 5px 10px;
}

.f-tier-desc {
  text-align: center;
  font-weight: bold;
  font-size: 16px;
  line-height: 1.4;
  padding: 15px;
  border-top: 2px solid #000000;
}

.f-tier-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.f-tier-col {
  padding: 12px 8px;
  border: 2px solid #000000;
  font-size: 16px;
  line-height: 1.5;
  vertical-align: top;
}

@media (max-width: 768px) {
  .f-tier-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .f-tier-grid { grid-template-columns: repeat(1, 1fr); }
}

.cname {
  font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
  font-weight: bold;
  width: 100%;
  max-width: 135px;
  height: 36px;
  margin: 4px auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-sizing: border-box;
}

#EX .cname {
  background-color: rgba(333, 10, 91, 0.7);
}

#SS .cname {
  background-color: rgba(56, 2, 100, 0.75);
}

#S .cname {
  background-color: rgba(222, 0, 0, 0.75);
}

#A .cname {
  background-color: rgba(255, 139, 16, 0.8);
}

#B .cname {
  background-color: rgba(75, 167, 35, 0.75);
}

#C .cname {
  background-color: rgba(16, 99, 173, 0.8);
}

#D .cname {
  background-color: rgba(32, 4, 109, 0.5);
}

#E .cname {
  background-color: rgba(188, 128, 68, 0.8);
}

#Yukkuri .cname {
  background-color: rgba(12, 115, 204, 0.8);
}

:root:has(#mode_medi:checked) .cname {
  background-color: rgba(74, 4, 4, 0.75);
}

:root:has(#mode_mami:checked) .cname {
  background-color: rgba(155, 109, 19, 0.75);
}

.expl, .tier-expl {
  font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  background-color: #660000;
  color: #ffffff;
  padding: 10px 2px;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  max-width: 1550px;
  display: block;
  margin-top: 8px;
  margin-bottom: 0px;
  margin-left: auto;
  margin-right: auto;
}

.expl label:hover {
  background-color: #8a0000;
  transform: scale(1.05);
}

:root:has(#mode_medi:checked) :is(.expl, .tier-expl) {
  background-color: rgba(74, 4, 4, 0.75);
}

:root:has(#mode_mami:checked) :is(.expl, .tier-expl) {
  background-color: rgba(121, 81, 0, 0.75);
}

:root:has(#mode_mami:checked) .expl label:hover {
  background-color: rgba(153, 105, 9, 0.75);
  transform: scale(1.05);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.filter-group h1 {
  width: 100%;
  text-align: center;
}

.filter-group input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.filter-group label {
  font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: bold;
  color: #ffffff;
  background-color: #006655;
  border: 2px solid transparent;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-block;
  transition: background 0.2s, transform 0.15s;
}

.filter-group label:hover {
  background-color: #009178;
  transform: scale(1.05);
}

.filter-group input[type="checkbox"]:checked + label {
  background-color: #c3f5ff;
  color: #006655;
  border: 2px solid #006655;
}

:root:has(#mode_medi:checked) .filter-group label {
  background-color: rgba(74, 4, 4, 0.75);
}

:root:has(#mode_mami:checked) .filter-group label {
  background-color: rgba(155, 109, 19, 0.75);
}

:root:has(#mode_medi:checked) label:hover {
  background-color: rgba(146, 9, 9, 0.75);
  transform: scale(1.05);
}

:root:has(#mode_mami:checked) label:hover {
  background-color: rgba(218, 153, 25, 0.75);
  transform: scale(1.05);
}

:root:has(#mode_medi:checked) .filter-group input[type="checkbox"]:checked + label {
  background-color: #ac8fb1;
  color: rgba(74, 4, 4, 0.75);
  border: 2px solid rgba(74, 4, 4, 0.75);
}

:root:has(#mode_mami:checked) .filter-group input[type="checkbox"]:checked + label {
  background-color: #b1a18f;
  color: rgba(155, 109, 19, 0.75);
  border: 2px solid rgba(155, 109, 19, 0.75);
}

.tier-nav {
  font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
  padding: 12px 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.tier-nav h2 {
  width: 100%;
  text-align: center;
}

.jtt {
  text-align: center;
  margin: 20px 0;
}

.tier-nav button, 
.tier-nav-btn {
  font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: bold;
  color: #ffffff;
  background-color: #984700;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s, transform 0.15s;
}

.tier-nav button:hover, 
.tier-nav-btn:hover {
  background-color: #c1610c;
  transform: scale(1.05);
}

:root:has(#mode_medi:checked) :is(.tier-nav button, .tier-nav-btn) {
  background-color: rgba(74, 4, 4, 0.75);
}

:root:has(#mode_mami:checked) :is(.tier-nav button, .tier-nav-btn) {
  background-color: rgba(155, 109, 19, 0.75);
}

:root:has(#mode_medi:checked) :is(.tier-nav button, .tier-nav-btn):hover {
  background-color: rgba(218, 153, 25, 0.75);
  transform: scale(1.05);
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 500px;
  margin: 8px auto 2px auto;
}

.toggle-row #size-toggle-btn,
.toggle-row #expl-toggle-btn {
  color: #ffffff;
  background-color: #4e0066;
  width: auto;
  flex: 1 1 auto;
  max-width: none;
  font-size: 15px;
  padding: 8px 10px;
  margin: 0;
}

.toggle-row button:hover {
  background-color: #720793;
  transform: scale(1.05);
}

:root:has(#mode_medi:checked) :is(.toggle-row #size-toggle-btn, .toggle-row #expl-toggle-btn) {
  background-color: rgba(74, 4, 4, 0.75);
}

:root:has(#mode_mami:checked) :is(.toggle-row #size-toggle-btn, .toggle-row #expl-toggle-btn) {
  background-color: rgba(155, 109, 19, 0.75);
}

:root:has(#mode_medi:checked) .toggle-row button:hover {
  background-color: rgba(146, 9, 9, 0.75);
  transform: scale(1.05);
}

:root:has(#mode_mami:checked) .toggle-row button:hover {
  background-color: rgba(218, 153, 25, 0.75);
  transform: scale(1.05);
}

.visually-hidden-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.filters-toggle-label {
  display: block;
  width: 100%;
  max-width: 500px;
  margin: 8px auto;
  font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  background-color: #660000;
  color: #ffffff;
  padding: 10px 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.filters-toggle-label:hover {
  background-color: #8a0000;
}

.filters-panel {
  overflow: hidden;
  max-height: 3000px;
  transition: max-height 0.3s ease, opacity 0.2s ease;
  opacity: 1;
}

.filters-panel.is-collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  margin: 0;
}

.button.primary {
  font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
    background-color: #660000;
  color: #ffffff;
  padding: 10px 2px;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  max-width: 500px;
  display: block;
  margin-top: 8px;
  margin-bottom: 2px;
  margin-left: auto;
  margin-right: auto;
}

.expl:hover{
  background-color: rgba(102, 0, 0, 0.5);
}

.modal {
  display: none; 
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow: hidden; 
}

.con {
  background-color: #222222;
  color: #fff;
  border: 2px solid #591339;
  border-radius: 8px;
  padding: 20px;
  margin: 5% auto;
  width: 90%;
  max-width: 1000px;
  max-height: 80vh;                 
  overflow-y: auto;                  
  -webkit-overflow-scrolling: touch; 
}

.close-btn {
  color: #aa0000;
  float: left;
  font-size: 80px;
  font-weight: bold;
  cursor: pointer;
  line-height: 0.8;
  margin-bottom: 15px;
  margin-right: 15px;
}

.close-btn:hover {
  color: #fff;
}

.sub-header,
.modal-p {
  clear: both;
}
/* Core setup for text blocks inside the overlay container */
.modal-p {
  font-family: "Josefin Sans", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 14px;
  color: #e0e0e0;
}

/* Master class shared by all subsection headers */
.sub-header {
  font-family: "Josefin Sans", sans-serif;
  font-weight: bold;
  font-size: 12px;
  padding: 5px 10px;
  margin-top: 20px;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

/* 🟢 Pro*/
.header-pro {
  background-color: #1b4332;
  color: #fff;
  border-left: 4px solid #52b788;
  font-weight: bold;
  font-size: 16px;
}

.header-boon {
  background-color: #1d5a68;
  color: #fff;
  border-left: 4px solid #89ccff;
}

/* 🟡 Mixed */
.header-mixed {
  background-color: #ffb703;
  color: #fff;
  border-left: 4px solid #ffb703;
  font-weight: bold;
  font-size: 16px;
}

/* 🔴 Cons */
.header-con {
  background-color: #5c1d1d;
  color: #fff;
  border-left: 4px solid #fca5a5;
  font-weight: bold;
  font-size: 16px;
}
.header-nitpick {
  background-color: #d98601;
  color: #fff;
  border-left: 4px solid #fcbc81;
}


/* Extra */
.header-extra {
  background-color: #7b7a7a;
  color: #fff;
  border-left: 4px solid #797979;
  font-weight: bold;
  font-size: 16px;
}

/* Bullet list spacing */
.modal-list {
  font-family: "Josefin Sans", sans-serif;
  font-size: 13px;
  line-height: 1.6;
  padding-left: 20px;
  margin-bottom: 16px;
  color: #e0e0e0;
}
.modal-list li {
  margin-bottom: 6px;
}

:root {
  --bg: rgba(217, 210, 233, 0.85); 
  --fg: #20124D;
  --bg-img: url("tower.png");
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: rgba(32, 18, 77, 0.85);
    --fg: #fff;
    --bg-img: url("cavern.png");
  }
}

:root:has(#mode_dark:checked) {
  --bg: rgba(32, 18, 77, 0.85);
  --fg: #fff;    
  --bg-img: url("cavern.png");
}

:root:has(#mode_light:checked) {   
  --bg: rgba(218, 206, 255, 0.95); 
  --fg: #09031d;
  --bg-img: url("tower.png");
}

:root:has(#mode_light:checked) .cname {
  color: #d9d2e9;
}
/*
extra
extra
extra
*/
:root:has(#mode_medi:checked) {
  --bg: rgba(29, 3, 51, 0.963);
  --fg: #f0dede;
  --bg-img: url("medicine card.png");
  --bg-opacity: 0.2;
}

:root:has(#mode_mami:checked) {
  --bg: rgba(37, 14, 9, 0.9);
  --fg: #e8e7cf;
  --bg-img: url("mamiran.png");
  --bg-opacity: 0.2;
}

body::before {
  content: "";
  position: fixed;
  top: -15vh;
  left: 0;
  width: 100vw;
  height: 130vh;
  background: var(--bg-img) no-repeat center top;
  background-size: cover;
  opacity: var(--bg-opacity, 0.5);
  z-index: -1;
  pointer-events: none;
  transform: translateY(var(--parallax-offset, 0px));
  will-change: transform;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
  font-size: 14px;
  transition: background-color 0.3s, color 0.3s;
  isolation: isolate;
}

.theme-toggle {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  max-width: 500px;
  margin: 12px auto;
  padding: 0 10px;
}

.theme-toggle input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-toggle label {
  flex: 1 1 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Josefin Sans", Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: bold;
  color: #ffffff;
  background-color: #4e0066;
  padding: 10px 8px;
  text-decoration: none;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s, transform 0.15s;
}

.theme-toggle label:hover {
  background-color: #720793;
  transform: scale(1.03);
}

.theme-toggle input[type="radio"]:checked + label {
  background-color: #bc1189;
  border: 2px solid #ffffff;
}

:root:has(#mode_medi:checked) .theme-toggle label {
  background-color: rgba(74, 4, 4, 0.75);
}

:root:has(#mode_mami:checked) .theme-toggle label {
  background-color: rgba(155, 109, 19, 0.75);
}

:root:has(#mode_medi:checked) .theme-toggle label:hover {
  background-color: rgba(146, 9, 9, 0.75);
  transform: scale(1.05);
}

:root:has(#mode_mami:checked) .theme-toggle label:hover {
  background-color: rgba(218, 153, 25, 0.75);
  transform: scale(1.05);
}

:root:has(#mode_medi:checked) .theme-toggle input[type="radio"]:checked + label {
  background-color: #b12b2b;
  border: 2px solid #ffffff;
}

:root:has(#mode_mami:checked) .theme-toggle input[type="radio"]:checked + label {
  background-color: #9c912a;
  border: 2px solid #ffffff;
}

.tier-toggle-bar {
  background-color: rgba(0, 0, 0, 0.4);
  color: #ffffff;
  font-family: "Josefin Sans", Arial, sans-serif;
  font-weight: bold;
  text-align: center;
  padding: 6px 12px;
  margin: 4px auto 12px auto; 
  max-width: 700px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.tier-toggle-bar:hover {
  background-color: rgba(0, 0, 0, 0.65);
}

.Qs {
  color: rgb(167, 61, 130);
  font-weight: bold;
  font-size: 20px;
}

.expl-container {
  display: flex;
  flex-direction: row;
  gap: 8px;
  width: 100%;
  max-width: 1550px;
  margin: 8px auto;
  padding: 0 10px;
}

.expl-container .tier-expl {
  background-color: #036600;
  flex: 1;      
  width: auto;  
  margin: 0; 
}

.expl-container .tier-expl:hover {
  background-color: #0d9e08;
  transform: scale(1.05);
}

:root:has(#mode_medi:checked) .expl-container .tier-expl {
  background-color: rgba(74, 4, 4, 0.75);
}

:root:has(#mode_mami:checked) .expl-container .tier-expl {
  background-color: rgba(155, 109, 19, 0.75);
}

:root:has(#mode_medi:checked) .expl-container .tier-expl:hover {
  background-color: rgba(146, 9, 9, 0.75);
  transform: scale(1.05);
}

:root:has(#mode_mami:checked) .expl-container .tier-expl:hover {
  background-color: rgba(218, 153, 25, 0.75);
  transform: scale(1.05);
}

@media (max-width: 600px) {
  .expl-container {
    flex-direction: column;
  }
}

.tier-divider {
  border: none;
  height: 3px;
  background-color: #aa0000;
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
  border-radius: 2px;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .Important-Links {
    flex-direction: column;
    width: 100%;
    padding: 0 12px;
  }

  .link-btn {
    width: 100%;
    min-height: 48px;
  }
}
