/* Theme picker polish: readability, selected state, and accurate theme swatches */
.site-theme-panel {
  color: #173f35 !important;
}
.site-theme-title {
  color: #173f35 !important;
  font-size: 1.35rem !important;
  letter-spacing: 0 !important;
}
.site-theme-close {
  color: #8a5f12 !important;
  border: 2px solid rgba(201, 144, 42, .42) !important;
  background: rgba(255,255,255,.76) !important;
  font-weight: 900 !important;
  opacity: 1 !important;
  cursor: pointer;
}
.site-theme-close:hover,
.site-theme-close:focus-visible {
  color: #173f35 !important;
  border-color: #c8902a !important;
  outline: none;
}
.site-theme-section {
  color: #216958 !important;
  font-size: .86rem !important;
  font-weight: 900 !important;
  letter-spacing: .18em !important;
  margin: 1rem 0 .65rem !important;
}
.site-theme-card {
  position: relative;
  color: #173f35 !important;
  background: rgba(255,255,255,.72) !important;
  border: 1.5px solid rgba(23,63,53,.16) !important;
  line-height: 1.25 !important;
  cursor: pointer;
}
.site-theme-card:hover {
  background: rgba(255,255,255,.92) !important;
  border-color: rgba(23,63,53,.42) !important;
  transform: translateY(-1px);
}
.site-theme-card.active,
.site-theme-card[aria-pressed="true"] {
  background: #fffdf8 !important;
  border: 3px solid #c8902a !important;
  box-shadow: 0 0 0 4px rgba(201,144,42,.18), 0 12px 26px rgba(28,21,6,.14) !important;
}
.site-theme-card.active::after,
.site-theme-card[aria-pressed="true"]::after {
  content: "✓";
  position: absolute;
  top: .45rem;
  right: .55rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #c8902a;
  color: #fff;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1;
}
.site-theme-name {
  color: #173f35 !important;
  font-size: 1rem !important;
  font-weight: 900 !important;
  line-height: 1.18 !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
}
.site-theme-desc {
  color: #405852 !important;
  font-size: .82rem !important;
  font-weight: 650 !important;
  line-height: 1.28 !important;
  text-shadow: none !important;
}
.site-theme-swatch {
  width: 38px !important;
  height: 38px !important;
  border: 2px solid rgba(255,255,255,.9) !important;
  box-shadow: inset 0 0 0 1px rgba(23,63,53,.16), 0 5px 14px rgba(0,0,0,.2) !important;
}
.swatch-pouri {
  background: radial-gradient(circle at 34% 28%, #6f6a5a 0%, #2d2b24 34%, #0b0b08 70%, #050503 100%) !important;
}
@media (max-width: 720px) {
  .site-theme-grid { grid-template-columns: 1fr !important; }
  .site-theme-panel { padding: 1rem !important; }
}
@media(max-width:768px){.shell{padding:0 1rem 2rem}header{padding:2rem 0 1.5rem}h1{font-size:clamp(1.8rem,5vw,3rem)}h2{font-size:1.5rem;margin:0 0 0.8rem}.hero-card{padding:1.2rem;border-radius:10px}.word-grid,.grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:0.8rem}.word-card{padding:0.9rem}.word-card h3{font-size:1.3rem}.label{font-size:0.65rem}.tile{padding:1rem}.tile .icon{font-size:1.5rem}.tile h3{font-size:1rem}.section{margin:1.5rem 0}.intro{columns:1;margin:1rem 0}.footer{grid-template-columns:1fr;gap:1.5rem;padding:1.5rem 0}}@media(max-width:640px){.shell{padding:0 0.8rem 1.5rem}header{padding:1.5rem 0 1rem}h1{font-size:clamp(1.5rem,4vw,2.2rem)}h2{font-size:1.3rem;margin:0 0 0.7rem}.ornament{font-size:0.7rem}.hero-card{padding:1rem;border-radius:8px}.hero-card h2{font-size:1.3rem}.word-grid,.grid{grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:0.6rem}.word-card{padding:0.8rem}.word-card h3{font-size:1.1rem;margin:0.3rem 0}.label{font-size:0.6rem;letter-spacing:0.1em}.pron{font-size:0.8rem;margin:0.1rem 0}.example{font-size:0.85rem;margin-top:0.5rem;padding-top:0.5rem;border-top:0.5px solid}.pill{padding:0.15rem 0.4rem;font-size:0.65rem;margin:0.05rem 0.1rem}.fav-btn{width:1.8rem;height:1.8rem;font-size:1rem;top:0.5rem;right:0.5rem}.tile{padding:0.8rem}.tile .icon{font-size:1.2rem}.tile h3{font-size:0.9rem;margin:0.3rem 0}.tile p{font-size:0.85rem}.breadcrumbs{font-size:0.8rem;margin-bottom:0.8rem}.sub{font-size:0.95rem}.section{margin:1rem 0}.intro{columns:1;margin:0.8rem 0}.footer{grid-template-columns:1fr;gap:1rem;padding:1rem 0}.footer h3,.footer h4{font-size:1rem;margin:0 0 0.5rem}.footer p{font-size:0.85rem;margin:0 0 0.3rem}.footer small{font-size:0.75rem}.footer a{font-size:0.85rem;margin:0.3rem 0}}@media(max-width:480px){.shell{padding:0 0.6rem 1rem}header{padding:1rem 0 0.8rem}h1{font-size:clamp(1.3rem,3.5vw,1.8rem)}h2{font-size:1.1rem;margin:0 0 0.6rem}.hero-card{padding:0.9rem;margin-bottom:1.2rem}.word-grid,.grid{grid-template-columns:1fr;gap:0.5rem}.word-card{padding:0.7rem}.word-card h3{font-size:1rem}.label{font-size:0.55rem}.pill{padding:0.12rem 0.3rem;font-size:0.6rem}.fav-btn{width:1.6rem;height:1.6rem;font-size:0.9rem}.tile{padding:0.7rem}.tile .icon{font-size:1rem}.tile h3{font-size:0.85rem}.section{margin:0.8rem 0}.rule{width:80px;height:1px;margin:0.8rem auto}.footer{grid-template-columns:1fr;gap:0.8rem;padding:0.8rem 0}.footer h3,.footer h4{font-size:0.95rem;margin:0 0 0.4rem}}
/* Dark theme footer styling */
html[data-theme="rangi"] .footer,
body[data-theme="rangi"] .footer {
  color: #B7D5E5 !important;
  border-top-color: rgba(122,184,214,.28) !important;
}
html[data-theme="rangi"] .footer a {
  color: #7AB8D6 !important;
}
html[data-theme="kawakawa"] .footer,
body[data-theme="kawakawa"] .footer {
  color: #A6D8CA !important;
  border-top-color: rgba(53,163,131,.3) !important;
}
html[data-theme="kawakawa"] .footer a {
  color: #35A383 !important;
}
html[data-theme="atea"] .footer,
body[data-theme="atea"] .footer {
  color: #E0CF9B !important;
  border-top-color: rgba(216,179,90,.32) !important;
}
html[data-theme="atea"] .footer a {
  color: #D8B35A !important;
}
html[data-theme="awhio"] .footer,
body[data-theme="awhio"] .footer {
  color: #C8B8F1 !important;
  border-top-color: rgba(156,124,224,.32) !important;
}
html[data-theme="awhio"] .footer a {
  color: #9C7CE0 !important;
}

/* Favorite button dark theme styling */
html[data-theme="rangi"] .fav-btn,
body[data-theme="rangi"] .fav-btn {
  background: rgba(80,120,110,.5) !important;
  color: var(--atea) !important;
  border-color: var(--border) !important;
}
html[data-theme="kawakawa"] .fav-btn,
body[data-theme="kawakawa"] .fav-btn {
  background: rgba(60,110,95,.5) !important;
  color: var(--atea) !important;
  border-color: var(--border) !important;
}
html[data-theme="atea"] .fav-btn,
body[data-theme="atea"] .fav-btn {
  background: rgba(120,100,60,.4) !important;
  color: var(--atea) !important;
  border-color: var(--border) !important;
}
html[data-theme="awhio"] .fav-btn,
body[data-theme="awhio"] .fav-btn {
  background: rgba(100,80,130,.4) !important;
  color: var(--atea) !important;
  border-color: var(--border) !important;
}
