textarea {
  width: 100%;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font: inherit;
  font-size: 0.9375rem;
  padding: 14px 16px;
  resize: vertical;
  min-height: 140px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea:focus {
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--md-sys-color-primary) 22%, transparent);
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap textarea {
  padding-right: 96px;
}

.password-toggle-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 72px;
  padding: 8px 12px;
}

.strength-summary {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.strength-summary__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.strength-label {
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface-variant);
}

.strength-value {
  font-size: 1.125rem;
  font-weight: 700;
}

.strength-meter {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: var(--md-sys-color-outline-variant);
  overflow: hidden;
}

.strength-meter__bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--md-sys-color-primary);
  transition: width 0.25s ease;
}

.strength-meter__bar.is-very-weak {
  width: 20%;
  background: #c53b3b;
}

.strength-meter__bar.is-weak {
  width: 40%;
  background: #d97706;
}

.strength-meter__bar.is-medium {
  width: 60%;
  background: #ca8a04;
}

.strength-meter__bar.is-strong {
  width: 80%;
  background: #2f88d9;
}

.strength-meter__bar.is-very-strong {
  width: 100%;
  background: #15803d;
}

.strength-score-text {
  margin: 10px 0 0;
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface-variant);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.result-box {
  padding: 18px;
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.result-box__title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

.criteria-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.criteria-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--md-sys-color-on-surface);
}

.criteria-list__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  min-width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
}

.criteria-list__icon.is-ok {
  background: color-mix(in srgb, #15803d 14%, white);
  color: #15803d;
}

.criteria-list__icon.is-ng {
  background: color-mix(in srgb, var(--error) 12%, white);
  color: var(--error);
}

.result-details {
  margin: 0;
}

.result-details__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.result-details__row:first-child {
  padding-top: 0;
}

.result-details__row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.result-details dt {
  margin: 0;
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface-variant);
}

.result-details dd {
  margin: 0;
  text-align: right;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

.result-box--advice {
  margin-top: 0;
}

.result-advice {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--md-sys-color-on-surface-variant);
}

@media (max-width: 600px) {
  .result-grid {
    grid-template-columns: 1fr;
  }

  .password-input-wrap textarea {
    padding-right: 16px;
  }

  .password-toggle-btn {
    position: static;
    margin-top: 12px;
  }

  .strength-summary__head {
    flex-direction: column;
    align-items: flex-start;
  }}
