.kevh-vocab {
  --kevh-border: #d9e2ec;
  --kevh-bg: #f7fafc;
  --kevh-text-soft: #5b6775;
  width: 100%;
  margin: 1.5rem 0;
}

.kevh-toolbar {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.kevh-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.kevh-filter-group {
  display: grid;
  gap: .55rem;
}

.kevh-filter-heading {
  display: block;
  color: #344054;
  font-size: .88rem;
  font-weight: 700;
}

.kevh-level-name {
  display: block;
  margin-bottom: .18rem;
  color: #285f8f;
  font-size: .82rem;
  font-weight: 700;
}

.kevh-vocab .kevh-filters button.kevh-filter {
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 1px solid var(--kevh-border) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  background-image: none !important;
  color: #263442 !important;
  -webkit-text-fill-color: #263442 !important;
  padding: .5rem .85rem !important;
  margin: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  text-transform: none !important;
  text-decoration: none !important;
  opacity: 1 !important;
  cursor: pointer !important;
  font: inherit !important;
  font-size: .92rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

html body .kevh-vocab .kevh-filters button.kevh-filter .kevh-filter-label {
  color: #263442 !important;
  -webkit-text-fill-color: #263442 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.kevh-vocab .kevh-filters button.kevh-filter:hover,
.kevh-vocab .kevh-filters button.kevh-filter:focus-visible {
  border-color: #2f6ea5 !important;
  background: #f2f7fb !important;
  background-image: none !important;
  color: #174f7c !important;
  -webkit-text-fill-color: #174f7c !important;
}

html body .kevh-vocab .kevh-filters button.kevh-filter:hover .kevh-filter-label,
html body .kevh-vocab .kevh-filters button.kevh-filter:focus-visible .kevh-filter-label {
  color: #174f7c !important;
  -webkit-text-fill-color: #174f7c !important;
}

.kevh-vocab .kevh-filters button.kevh-filter.is-active {
  border-color: #2f6ea5 !important;
  background: #2f6ea5 !important;
  background-image: none !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 700 !important;
}

html body .kevh-vocab .kevh-filters button.kevh-filter.is-active .kevh-filter-label {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
}

.kevh-count {
  margin: .5rem 0 .75rem;
  color: var(--kevh-text-soft);
  font-size: .95rem;
}

.kevh-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--kevh-border);
  border-radius: 10px;
  background: #fff;
}

.kevh-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  min-width: 640px;
}

.kevh-table th,
.kevh-table td {
  padding: .8rem .85rem;
  border-bottom: 1px solid var(--kevh-border);
  text-align: left;
  vertical-align: top;
}

.kevh-table thead th {
  background: var(--kevh-bg);
  font-weight: 700;
}

.kevh-table tbody tr:last-child td {
  border-bottom: 0;
}

.kevh-word {
  width: 28%;
  font-weight: 700;
}

.kevh-meaning {
  width: 45%;
}

.kevh-theme-cell {
  width: 27%;
}

.kevh-theme-name,
.kevh-subtheme,
.kevh-source {
  display: block;
}

.kevh-subtheme {
  margin-top: .2rem;
  color: var(--kevh-text-soft);
  font-size: .82rem;
}

.kevh-source {
  margin-top: .35rem;
  font-size: .82rem;
}

.kevh-empty,
.kevh-message {
  padding: 1rem;
  border: 1px solid var(--kevh-border);
  border-radius: 8px;
  background: var(--kevh-bg);
}

@media (max-width: 640px) {
  .kevh-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .kevh-table {
    min-width: 0;
    display: block;
  }

  .kevh-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .kevh-table tbody,
  .kevh-table tr,
  .kevh-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .kevh-table tr {
    margin-bottom: .75rem;
    border: 1px solid var(--kevh-border);
    border-radius: 9px;
    background: #fff;
    overflow: hidden;
  }

  .kevh-table td {
    border-bottom: 0;
    padding: .55rem .75rem;
  }

  .kevh-word {
    padding-top: .75rem !important;
    font-size: 1.05rem;
  }

  .kevh-theme-cell {
    padding-bottom: .75rem !important;
    color: var(--kevh-text-soft);
    font-size: .86rem;
  }
}

/* ==================================================
   FREE MEMBER GATE (v1.2)
================================================== */

.kevh-anchor {
  position: relative;
  top: -12px;
}

.kevh-member-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: .8rem 1rem;
  border: 1px solid #bfe8d4;
  border-radius: 12px;
  background: #effaf5;
}

.kevh-member-status > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
  color: #526574;
  font-size: .9rem;
}

.kevh-member-status strong {
  color: #1d5138;
}

.kevh-member-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #31a66a;
  box-shadow: 0 0 0 4px rgba(49,166,106,.12);
}

.kevh-vocab a.kevh-logout,
.kevh-vocab a.kevh-logout:visited {
  flex: 0 0 auto;
  padding: .42rem .72rem;
  border: 1px solid #c8d5df;
  border-radius: 999px;
  background: #fff;
  color: #3d5568 !important;
  text-decoration: none !important;
  font-size: .82rem;
  font-weight: 700;
}

.kevh-guest-filter-note {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .9rem;
  padding: .72rem .9rem;
  border-radius: 10px;
  background: #eef7ff;
  color: #3e6077;
  font-size: .88rem;
  font-weight: 600;
}

.kevh-mini-lock {
  flex: 0 0 auto;
}

.kevh-guest-count span {
  color: #7c8995;
  font-size: .88rem;
}

.kevh-table-wrap.kevh-is-locked {
  position: relative;
  overflow: hidden;
}

.kevh-locked-row td {
  height: 58px;
  pointer-events: none;
}

.kevh-placeholder {
  display: block;
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(90deg,#dbe4eb 0%,#eef2f5 50%,#dbe4eb 100%);
  filter: blur(4px);
  opacity: .9;
}

.kevh-placeholder-word {
  width: 62%;
}

.kevh-placeholder-meaning {
  width: 78%;
}

.kevh-placeholder-theme {
  width: 72%;
}

.kevh-lock-layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 230px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 38px 16px 18px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,.78) 30%, rgba(255,255,255,.98) 68%);
  pointer-events: none;
}

.kevh-lock-card {
  width: min(470px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: 18px 20px;
  border: 1px solid #c8e3f6;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(28,78,111,.14);
  text-align: center;
  pointer-events: auto;
}

.kevh-lock-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-top: -38px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #138bd0;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(19,139,208,.22);
}

.kevh-lock-card strong {
  margin-top: .1rem;
  color: #1f4057;
  font-size: 1.05rem;
}

.kevh-lock-card > span:not(.kevh-lock-icon) {
  color: #677989;
  font-size: .88rem;
}

.kevh-vocab a.kevh-register-cta,
.kevh-vocab a.kevh-register-cta:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: .35rem;
  padding: .7rem 1.15rem;
  border-radius: 999px;
  background: #138bd0;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-decoration: none !important;
  font-size: .9rem;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(19,139,208,.18);
}

.kevh-vocab a.kevh-register-cta:hover {
  background: #087fc2;
  color: #fff !important;
}

.kevh-member-gate {
  margin-top: 1.5rem;
  padding: 24px;
  border: 1px solid #d7e5ef;
  border-radius: 18px;
  background: linear-gradient(135deg,#f0f9ff 0%,#fffdf1 100%);
}

.kevh-member-intro {
  margin-bottom: 1rem;
  text-align: center;
}

.kevh-free-badge {
  display: inline-block;
  margin-bottom: .55rem;
  padding: .28rem .7rem;
  border-radius: 999px;
  background: #ffd84d;
  color: #594700;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.kevh-member-intro h3 {
  margin: 0 0 .35rem !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: #22445d !important;
  font-size: 1.35rem !important;
  font-weight: 850 !important;
  line-height: 1.4 !important;
}

.kevh-member-intro h3::before,
.kevh-member-intro h3::after {
  content: none !important;
}

.kevh-member-intro p {
  margin: 0 !important;
  color: #667b8d;
  font-size: .92rem;
}

.kevh-auth-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
}

.kevh-auth-card {
  padding: 19px;
  border: 1px solid #dce7ee;
  border-radius: 14px;
  background: rgba(255,255,255,.95);
}

.kevh-register-card {
  border-color: #b9ddf4;
  box-shadow: inset 0 3px 0 #45a9df;
}

.kevh-auth-card h4 {
  margin: 0 0 .25rem !important;
  color: #29485d !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
}

.kevh-auth-card > p {
  margin: 0 0 .9rem !important;
  color: #758593;
  font-size: .82rem;
  line-height: 1.55;
}

.kevh-auth-form {
  display: grid;
  gap: .7rem;
}

.kevh-auth-form label {
  display: grid;
  gap: .35rem;
  margin: 0 !important;
}

.kevh-auth-form label > span {
  color: #4b6172;
  font-size: .8rem;
  font-weight: 700;
}

.kevh-vocab .kevh-auth-form input[type="email"],
.kevh-vocab .kevh-auth-form input[type="text"],
.kevh-vocab .kevh-auth-form input[type="password"] {
  width: 100% !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: .65rem .75rem !important;
  border: 1px solid #ccd8e1 !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #263746 !important;
  -webkit-text-fill-color: #263746 !important;
  box-shadow: none !important;
  font: inherit !important;
  font-size: .92rem !important;
}

.kevh-vocab .kevh-auth-form input:focus {
  border-color: #299ad6 !important;
  outline: 3px solid rgba(41,154,214,.13) !important;
}

.kevh-vocab button.kevh-auth-button {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 100% !important;
  min-height: 44px !important;
  margin: .15rem 0 0 !important;
  padding: .65rem .85rem !important;
  border-radius: 9px !important;
  box-shadow: none !important;
  cursor: pointer !important;
  font: inherit !important;
  font-size: .9rem !important;
  font-weight: 800 !important;
}

.kevh-vocab button.kevh-auth-primary {
  border: 1px solid #138bd0 !important;
  background: #138bd0 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.kevh-vocab button.kevh-auth-secondary {
  border: 1px solid #7890a1 !important;
  background: #fff !important;
  color: #385266 !important;
  -webkit-text-fill-color: #385266 !important;
}

.kevh-lost-password {
  justify-self: start;
  color: #5f788a !important;
  font-size: .78rem;
}

.kevh-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.kevh-auth-notice {
  margin: 0 0 1rem;
  padding: .75rem .9rem;
  border-radius: 9px;
  font-size: .88rem;
  font-weight: 650;
}

.kevh-auth-success {
  border: 1px solid #b7e4cb;
  background: #effaf4;
  color: #256044;
}

.kevh-auth-error {
  border: 1px solid #f0c4c4;
  background: #fff2f2;
  color: #8b3030;
}

@media (max-width: 640px) {
  .kevh-member-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .kevh-auth-grid {
    grid-template-columns: 1fr;
  }

  .kevh-member-gate {
    padding: 18px 13px;
    border-radius: 14px;
  }

  .kevh-lock-layer {
    min-height: 260px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .kevh-locked-row {
    display: block !important;
    filter: blur(2px);
    opacity: .62;
  }

  .kevh-locked-row td {
    display: block !important;
    height: auto;
    padding: .5rem .75rem !important;
  }

  .kevh-lock-card {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* ==================================================
   NEXTEND SOCIAL LOGIN / GOOGLE (v1.2.1)
================================================== */

.kevh-google-login {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin: 1.2rem 0 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid #dbe7f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(36, 76, 104, .06);
}

.kevh-google-copy {
  min-width: 0;
}

.kevh-google-copy strong,
.kevh-google-copy span {
  display: block;
}

.kevh-google-copy strong {
  margin-bottom: .22rem;
  color: #263b50;
  font-size: .98rem;
}

.kevh-google-copy span {
  color: #6b7c8b;
  font-size: .84rem;
  line-height: 1.55;
}

.kevh-nextend-google {
  flex: 0 0 auto;
  min-width: 220px;
}

/* Nextend自身のボタンデザインを壊さず、幅だけ英単語帳に合わせる */
.kevh-nextend-google .nsl-container,
.kevh-nextend-google .nsl-container-block,
.kevh-nextend-google .nsl-container-buttons {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

.kevh-nextend-google .nsl-button {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.kevh-auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: .7rem 0 1rem;
  color: #8794a0;
  font-size: .8rem;
  font-weight: 700;
}

.kevh-auth-divider::before,
.kevh-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8ee;
}

.kevh-auth-divider span {
  flex: 0 0 auto;
}

@media (max-width: 700px) {
  .kevh-google-login {
    align-items: stretch;
    flex-direction: column;
    gap: .8rem;
    padding: .95rem;
  }

  .kevh-nextend-google {
    width: 100%;
    min-width: 0;
  }
}

/* ==================================================
   GUEST FILTERING (v1.2.2)
================================================== */

.kevh-vocab.kevh-is-loading .kevh-table {
  opacity: .58;
  transition: opacity .15s ease;
}

.kevh-vocab.kevh-is-loading .kevh-filter {
  cursor: progress !important;
}

.kevh-lock-layer[hidden],
.kevh-locked-row[hidden] {
  display: none !important;
}
